Subject: CVS commit: [netbsd-3] src/sys/kern
To: None <source-changes@NetBSD.org>
From: Matthias Scheler <tron@netbsd.org>
List: source-changes
Date: 09/09/2005 14:17:44
Module Name:	src
Committed By:	tron
Date:		Fri Sep  9 14:17:44 UTC 2005

Modified Files:
	src/sys/kern [netbsd-3]: uipc_syscalls.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #746):
	sys/kern/uipc_syscalls.c: revision 1.94
In adjust_rights() Use CMSG_SPACE() to calculate the number of
filedescriptors passed in this message - the counterpart in
unp_externalize does this as well.
Note that CMSG_SPACE(0) does not make sense, since it does not invoke
the alignment magic - so use CMSG_SPACE(sizeof(int)) and adjust the
calculated total later.
This fixes the postfix conection cache for 64bit platforms. Previously
the number of passed filed descriptors (nfds) would have been
calculeted too high, causing the fdrelease() of uninitialized junk.


To generate a diff of this commit:
cvs rdiff -r1.90.2.3 -r1.90.2.4 src/sys/kern/uipc_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.