summaryrefslogtreecommitdiff
path: root/monitor_fdpass.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2002-04-07 16:39:12 +0000
committerKevin Steves <stevesk@pobox.com>2002-04-07 16:39:12 +0000
commitc3c825575cdae3fd42ceb7709525fe8c0ad43f43 (patch)
treea5c5534021497e3a3985c9ffd02912eac499fd8e /monitor_fdpass.c
parenta44e0351ee8dd45435bf1c887f1aca4933a205b0 (diff)
downloadopenssh-git-c3c825575cdae3fd42ceb7709525fe8c0ad43f43.tar.gz
- (stevesk) [monitor_fdpass.c] fatal() for UsePrivilegeSeparation=yes
and no fd passing support.
Diffstat (limited to 'monitor_fdpass.c')
-rw-r--r--monitor_fdpass.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index eed1dc16..0045977e 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -34,6 +34,7 @@ RCSID("$OpenBSD: monitor_fdpass.c,v 1.2 2002/03/24 17:53:16 stevesk Exp $");
void
mm_send_fd(int socket, int fd)
{
+#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)
struct msghdr msg;
struct iovec vec;
char ch = '\0';
@@ -68,11 +69,16 @@ mm_send_fd(int socket, int fd)
if (n != 1)
fatal("%s: sendmsg: expected sent 1 got %d",
__FUNCTION__, n);
+#else
+ fatal("%s: UsePrivilegeSeparation=yes not supported",
+ __FUNCTION__);
+#endif
}
int
mm_receive_fd(int socket)
{
+#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)
struct msghdr msg;
struct iovec vec;
char ch;
@@ -112,4 +118,8 @@ mm_receive_fd(int socket)
fd = (*(int *)CMSG_DATA(cmsg));
#endif
return fd;
+#else
+ fatal("%s: UsePrivilegeSeparation=yes not supported",
+ __FUNCTION__);
+#endif
}