summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-24 16:11:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-24 16:11:09 +0000
commit0bdf18c9edb2e6a9fa89a28e89d11e7b6785b1fd (patch)
treebd0dc86a525e38150bde9f0c3d55ad9dfeb4e6a2 /lib/libc/gen
parent6e48c70f167662c7aec42af9bafc316e322ef92a (diff)
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
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/auth_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c
index 405215c7216..73d5bff7581 100644
--- a/lib/libc/gen/auth_subr.c
+++ b/lib/libc/gen/auth_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth_subr.c,v 1.34 2008/03/15 16:19:02 deraadt Exp $ */
+/* $OpenBSD: auth_subr.c,v 1.35 2008/03/24 16:10:59 deraadt Exp $ */
/*
* Copyright (c) 2000-2002,2004 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -995,7 +995,7 @@ _recv_fd(auth_session_t *as, int fd)
memset(&msg, 0, sizeof(msg));
msg.msg_control = &cmsgbuf.buf;
- msg.msg_controllen = CMSG_LEN(sizeof(int));
+ msg.msg_controllen = sizeof(cmsgbuf.buf);
if (recvmsg(fd, &msg, 0) < 0)
syslog(LOG_ERR, "recvmsg: %m");
else if (msg.msg_flags & MSG_TRUNC)