summaryrefslogtreecommitdiff
path: root/monitor_fdpass.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-05-02 20:48:21 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-05-02 20:48:21 +1000
commit3c01654deb235191d798a5254561624872a7f010 (patch)
tree71ae1572d4f5440888b9f3ddc1c7ef7512dc7ab6 /monitor_fdpass.c
parenteab4bae03894f07ea556db4d781795c724245af7 (diff)
- (dtucker) Bug #544: ignore invalid cmsg_type on Linux 2.0 kernels,
privsep should now work.
Diffstat (limited to 'monitor_fdpass.c')
-rw-r--r--monitor_fdpass.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index 641ce721..22b7882b 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -113,9 +113,11 @@ mm_receive_fd(int socket)
fatal("%s: no fd", __func__);
#else
cmsg = CMSG_FIRSTHDR(&msg);
+#ifndef BROKEN_CMSG_TYPE
if (cmsg->cmsg_type != SCM_RIGHTS)
fatal("%s: expected type %d got %d", __func__,
SCM_RIGHTS, cmsg->cmsg_type);
+#endif
fd = (*(int *)CMSG_DATA(cmsg));
#endif
return fd;