summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--monitor_fdpass.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c8dbc70c5..b617a79ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
2 - (tim) [configure.ac] applied a rework of djm's OpenSSL search cleanup patch. 2 - (tim) [configure.ac] applied a rework of djm's OpenSSL search cleanup patch.
3 Now only searches system and /usr/local/ssl (OpenSSL's default install path) 3 Now only searches system and /usr/local/ssl (OpenSSL's default install path)
4 Others must use --with-ssl-dir=.... 4 Others must use --with-ssl-dir=....
5 - (tim) [monitor_fdpass.c] fix for systems that have both
6 HAVE_ACCRIGHTS_IN_MSGHDR and HAVE_CONTROL_IN_MSGHDR. Ie. sys/socket.h has
7 #define msg_accrights msg_control
5 8
620020510 920020510
7 - (stevesk) [auth.c] Shadow account and expiration cleanup. Now 10 - (stevesk) [auth.c] Shadow account and expiration cleanup. Now
@@ -564,4 +567,4 @@
564 - (stevesk) entropy.c: typo in debug message 567 - (stevesk) entropy.c: typo in debug message
565 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 568 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
566 569
567$Id: ChangeLog,v 1.2105 2002/05/11 20:17:42 tim Exp $ 570$Id: ChangeLog,v 1.2106 2002/05/11 22:30:04 tim Exp $
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index 5401ea466..fb97171ff 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -39,13 +39,14 @@ mm_send_fd(int socket, int fd)
39 struct iovec vec; 39 struct iovec vec;
40 char ch = '\0'; 40 char ch = '\0';
41 int n; 41 int n;
42#ifndef HAVE_ACCRIGHTS_IN_MSGHDR 42#if !defined(HAVE_ACCRIGHTS_IN_MSGHDR) || \
43 (defined(HAVE_ACCRIGHTS_IN_MSGHDR) && defined(HAVE_CONTROL_IN_MSGHDR))
43 char tmp[CMSG_SPACE(sizeof(int))]; 44 char tmp[CMSG_SPACE(sizeof(int))];
44 struct cmsghdr *cmsg; 45 struct cmsghdr *cmsg;
45#endif 46#endif
46 47
47 memset(&msg, 0, sizeof(msg)); 48 memset(&msg, 0, sizeof(msg));
48#ifdef HAVE_ACCRIGHTS_IN_MSGHDR 49#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR)
49 msg.msg_accrights = (caddr_t)&fd; 50 msg.msg_accrights = (caddr_t)&fd;
50 msg.msg_accrightslen = sizeof(fd); 51 msg.msg_accrightslen = sizeof(fd);
51#else 52#else
@@ -83,7 +84,8 @@ mm_receive_fd(int socket)
83 struct iovec vec; 84 struct iovec vec;
84 char ch; 85 char ch;
85 int fd, n; 86 int fd, n;
86#ifndef HAVE_ACCRIGHTS_IN_MSGHDR 87#if !defined(HAVE_ACCRIGHTS_IN_MSGHDR) || \
88 (defined(HAVE_ACCRIGHTS_IN_MSGHDR) && defined(HAVE_CONTROL_IN_MSGHDR))
87 char tmp[CMSG_SPACE(sizeof(int))]; 89 char tmp[CMSG_SPACE(sizeof(int))];
88 struct cmsghdr *cmsg; 90 struct cmsghdr *cmsg;
89#endif 91#endif
@@ -93,7 +95,7 @@ mm_receive_fd(int socket)
93 vec.iov_len = 1; 95 vec.iov_len = 1;
94 msg.msg_iov = &vec; 96 msg.msg_iov = &vec;
95 msg.msg_iovlen = 1; 97 msg.msg_iovlen = 1;
96#ifdef HAVE_ACCRIGHTS_IN_MSGHDR 98#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR)
97 msg.msg_accrights = (caddr_t)&fd; 99 msg.msg_accrights = (caddr_t)&fd;
98 msg.msg_accrightslen = sizeof(fd); 100 msg.msg_accrightslen = sizeof(fd);
99#else 101#else
@@ -107,7 +109,7 @@ mm_receive_fd(int socket)
107 fatal("%s: recvmsg: expected received 1 got %d", 109 fatal("%s: recvmsg: expected received 1 got %d",
108 __FUNCTION__, n); 110 __FUNCTION__, n);
109 111
110#ifdef HAVE_ACCRIGHTS_IN_MSGHDR 112#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR)
111 if (msg.msg_accrightslen != sizeof(fd)) 113 if (msg.msg_accrightslen != sizeof(fd))
112 fatal("%s: no fd", __FUNCTION__); 114 fatal("%s: no fd", __FUNCTION__);
113#else 115#else