summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--monitor_fdpass.c6
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 73760b809..876055383 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,13 @@
26 existing file. Users who depended on this should adjust their sftp(1) 26 existing file. Users who depended on this should adjust their sftp(1)
27 usage. 27 usage.
28 ok deraadt@ markus@ 28 ok deraadt@ markus@
29 - deraadt@cvs.openbsd.org 2008/03/24 16:11:07
30 [monitor_fdpass.c]
31 msg_controllen has to be CMSG_SPACE so that the kernel can account for
32 each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len). This
33 works now that kernel fd passing has been fixed to accept a bit of
34 sloppiness because of this ABI repair.
35 lots of discussion with kettenis
29 36
3020080315 3720080315
31 - (djm) [regress/test-exec.sh] Quote putty-related variables in case they are 38 - (djm) [regress/test-exec.sh] Quote putty-related variables in case they are
@@ -3794,4 +3801,4 @@
3794 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3801 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3795 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3802 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3796 3803
3797$Id: ChangeLog,v 1.4885 2008/03/26 23:59:57 djm Exp $ 3804$Id: ChangeLog,v 1.4886 2008/03/27 00:01:15 djm Exp $
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index 18ae6248a..cab538bc9 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_fdpass.c,v 1.16 2008/03/15 16:19:02 deraadt Exp $ */ 1/* $OpenBSD: monitor_fdpass.c,v 1.17 2008/03/24 16:11:07 deraadt Exp $ */
2/* 2/*
3 * Copyright 2001 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2001 Niels Provos <provos@citi.umich.edu>
4 * All rights reserved. 4 * All rights reserved.
@@ -63,7 +63,7 @@ mm_send_fd(int sock, int fd)
63 msg.msg_accrightslen = sizeof(fd); 63 msg.msg_accrightslen = sizeof(fd);
64#else 64#else
65 msg.msg_control = (caddr_t)&cmsgbuf.buf; 65 msg.msg_control = (caddr_t)&cmsgbuf.buf;
66 msg.msg_controllen = CMSG_LEN(sizeof(int)); 66 msg.msg_controllen = sizeof(cmsgbuf.buf);
67 cmsg = CMSG_FIRSTHDR(&msg); 67 cmsg = CMSG_FIRSTHDR(&msg);
68 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); 68 cmsg->cmsg_len = CMSG_LEN(sizeof(int));
69 cmsg->cmsg_level = SOL_SOCKET; 69 cmsg->cmsg_level = SOL_SOCKET;
@@ -121,7 +121,7 @@ mm_receive_fd(int sock)
121 msg.msg_accrightslen = sizeof(fd); 121 msg.msg_accrightslen = sizeof(fd);
122#else 122#else
123 msg.msg_control = &cmsgbuf.buf; 123 msg.msg_control = &cmsgbuf.buf;
124 msg.msg_controllen = CMSG_LEN(sizeof(int)); 124 msg.msg_controllen = sizeof(cmsgbuf.buf);
125#endif 125#endif
126 126
127 if ((n = recvmsg(sock, &msg, 0)) == -1) { 127 if ((n = recvmsg(sock, &msg, 0)) == -1) {