- deraadt@cvs.openbsd.org 2008/03/24 16:11:07
[monitor_fdpass.c] msg_controllen has to be CMSG_SPACE so that the kernel can account for each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len). This works now that kernel fd passing has been fixed to accept a bit of sloppiness because of this ABI repair. lots of discussion with kettenis
This commit is contained in:
parent
7a3e1d0bc9
commit
e241e85ad3
|
@ -26,6 +26,13 @@
|
|||
existing file. Users who depended on this should adjust their sftp(1)
|
||||
usage.
|
||||
ok deraadt@ markus@
|
||||
- deraadt@cvs.openbsd.org 2008/03/24 16:11:07
|
||||
[monitor_fdpass.c]
|
||||
msg_controllen has to be CMSG_SPACE so that the kernel can account for
|
||||
each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len). This
|
||||
works now that kernel fd passing has been fixed to accept a bit of
|
||||
sloppiness because of this ABI repair.
|
||||
lots of discussion with kettenis
|
||||
|
||||
20080315
|
||||
- (djm) [regress/test-exec.sh] Quote putty-related variables in case they are
|
||||
|
@ -3794,4 +3801,4 @@
|
|||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||
|
||||
$Id: ChangeLog,v 1.4885 2008/03/26 23:59:57 djm Exp $
|
||||
$Id: ChangeLog,v 1.4886 2008/03/27 00:01:15 djm Exp $
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: monitor_fdpass.c,v 1.16 2008/03/15 16:19:02 deraadt Exp $ */
|
||||
/* $OpenBSD: monitor_fdpass.c,v 1.17 2008/03/24 16:11:07 deraadt Exp $ */
|
||||
/*
|
||||
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
|
||||
* All rights reserved.
|
||||
|
@ -63,7 +63,7 @@ mm_send_fd(int sock, int fd)
|
|||
msg.msg_accrightslen = sizeof(fd);
|
||||
#else
|
||||
msg.msg_control = (caddr_t)&cmsgbuf.buf;
|
||||
msg.msg_controllen = CMSG_LEN(sizeof(int));
|
||||
msg.msg_controllen = sizeof(cmsgbuf.buf);
|
||||
cmsg = CMSG_FIRSTHDR(&msg);
|
||||
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
|
||||
cmsg->cmsg_level = SOL_SOCKET;
|
||||
|
@ -121,7 +121,7 @@ mm_receive_fd(int sock)
|
|||
msg.msg_accrightslen = sizeof(fd);
|
||||
#else
|
||||
msg.msg_control = &cmsgbuf.buf;
|
||||
msg.msg_controllen = CMSG_LEN(sizeof(int));
|
||||
msg.msg_controllen = sizeof(cmsgbuf.buf);
|
||||
#endif
|
||||
|
||||
if ((n = recvmsg(sock, &msg, 0)) == -1) {
|
||||
|
|
Loading…
Reference in New Issue