summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-29 18:36:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-29 18:36:01 +0000
commit40bcb62b105c1d656ffb72880e71291f8f1e0321 (patch)
treeee2d137fb551ef87bf8a8158069b915e75b7821e
parent5f7c25427c6bfc5efec635558dcedf68795199f0 (diff)
For fd passing, at externalize time we are dealing with int[] not pointer[],
so we need to correct the mbuf length using CMSG_LEN() not CMSG_SPACE() test case was sparc64 sending 2 (or more) descriptors ok millert thib
-rw-r--r--sys/kern/uipc_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 09097eea4be..e9fd18d44d6 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.35 2007/09/07 15:00:20 art Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.36 2007/10/29 18:36:00 deraadt Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -717,7 +717,7 @@ restart:
*/
memcpy(CMSG_DATA(cm), fdp, nfds * sizeof(int));
cm->cmsg_len = CMSG_LEN(nfds * sizeof(int));
- rights->m_len = CMSG_SPACE(nfds * sizeof(int));
+ rights->m_len = CMSG_LEN(nfds * sizeof(int));
out:
fdpunlock(p->p_fd);
free(fdp, M_TEMP);