- (stevesk) [monitor_fdpass.c] fatal() for UsePrivilegeSeparation=yes
and no fd passing support.
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index eed1dc1..0045977 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -34,6 +34,7 @@
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 @@
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 @@
fd = (*(int *)CMSG_DATA(cmsg));
#endif
return fd;
+#else
+ fatal("%s: UsePrivilegeSeparation=yes not supported",
+ __FUNCTION__);
+#endif
}