diff options
author | Kevin Steves <stevesk@pobox.com> | 2002-04-07 16:39:12 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2002-04-07 16:39:12 +0000 |
commit | c3c825575cdae3fd42ceb7709525fe8c0ad43f43 (patch) | |
tree | a5c5534021497e3a3985c9ffd02912eac499fd8e | |
parent | a44e0351ee8dd45435bf1c887f1aca4933a205b0 (diff) |
- (stevesk) [monitor_fdpass.c] fatal() for UsePrivilegeSeparation=yes
and no fd passing support.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | monitor_fdpass.c | 10 |
2 files changed, 13 insertions, 1 deletions
@@ -1,6 +1,8 @@ | |||
1 | 20020407 | 1 | 20020407 |
2 | - (stevesk) HAVE_CONTROL_IN_MSGHDR; not used right now. | 2 | - (stevesk) HAVE_CONTROL_IN_MSGHDR; not used right now. |
3 | Future: we may want to test if fd passing works correctly. | 3 | Future: we may want to test if fd passing works correctly. |
4 | - (stevesk) [monitor_fdpass.c] fatal() for UsePrivilegeSeparation=yes | ||
5 | and no fd passing support. | ||
4 | 6 | ||
5 | 20020406 | 7 | 20020406 |
6 | - (djm) Typo in Suse SPEC file. Fix from Carsten Grohmann | 8 | - (djm) Typo in Suse SPEC file. Fix from Carsten Grohmann |
@@ -8191,4 +8193,4 @@ | |||
8191 | - Wrote replacements for strlcpy and mkdtemp | 8193 | - Wrote replacements for strlcpy and mkdtemp |
8192 | - Released 1.0pre1 | 8194 | - Released 1.0pre1 |
8193 | 8195 | ||
8194 | $Id: ChangeLog,v 1.2034 2002/04/07 16:18:03 stevesk Exp $ | 8196 | $Id: ChangeLog,v 1.2035 2002/04/07 16:39:12 stevesk Exp $ |
diff --git a/monitor_fdpass.c b/monitor_fdpass.c index eed1dc162..0045977e4 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 $"); | |||
34 | void | 34 | void |
35 | mm_send_fd(int socket, int fd) | 35 | mm_send_fd(int socket, int fd) |
36 | { | 36 | { |
37 | #if defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR) | ||
37 | struct msghdr msg; | 38 | struct msghdr msg; |
38 | struct iovec vec; | 39 | struct iovec vec; |
39 | char ch = '\0'; | 40 | char ch = '\0'; |
@@ -68,11 +69,16 @@ mm_send_fd(int socket, int fd) | |||
68 | if (n != 1) | 69 | if (n != 1) |
69 | fatal("%s: sendmsg: expected sent 1 got %d", | 70 | fatal("%s: sendmsg: expected sent 1 got %d", |
70 | __FUNCTION__, n); | 71 | __FUNCTION__, n); |
72 | #else | ||
73 | fatal("%s: UsePrivilegeSeparation=yes not supported", | ||
74 | __FUNCTION__); | ||
75 | #endif | ||
71 | } | 76 | } |
72 | 77 | ||
73 | int | 78 | int |
74 | mm_receive_fd(int socket) | 79 | mm_receive_fd(int socket) |
75 | { | 80 | { |
81 | #if defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR) | ||
76 | struct msghdr msg; | 82 | struct msghdr msg; |
77 | struct iovec vec; | 83 | struct iovec vec; |
78 | char ch; | 84 | char ch; |
@@ -112,4 +118,8 @@ mm_receive_fd(int socket) | |||
112 | fd = (*(int *)CMSG_DATA(cmsg)); | 118 | fd = (*(int *)CMSG_DATA(cmsg)); |
113 | #endif | 119 | #endif |
114 | return fd; | 120 | return fd; |
121 | #else | ||
122 | fatal("%s: UsePrivilegeSeparation=yes not supported", | ||
123 | __FUNCTION__); | ||
124 | #endif | ||
115 | } | 125 | } |