Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2009 12:51:10 +0000
From:      ttw+bsd@cobbled.net
To:        Boris Kochergin <spawk@acm.poly.edu>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Doing away with NGROUPS_MAX in src/sys/sys/syslimits.h?
Message-ID:  <20090323125110.GB8686@holyman.cobbled.net>
In-Reply-To: <20090323043937.GA61818@zim.MIT.EDU>
References:  <49C6F4F4.5030609@acm.poly.edu> <20090323043937.GA61818@zim.MIT.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23.03-00:39, David Schultz wrote:
[ ... ]
> There's already a kern.ngroups sysctl, but there are many places
> where `ngroups' needs to be used in preference to NGROUPS in the
> kernel. In userland, sysconf(_SC_NGROUPS_MAX) needs to be used in
> preference to NGROUPS_MAX.

you will also note that, as you look at this more, NGROUPS_MAX controls
very little regarding the relevant buffers and, generally, without
reviewing it again to be specific i'd suggest that you may expose a
number of buffer overruns but will most certainally not get the
'correct' behaviour from the change.  i.e. removing NGROUPS_MAX may
remove an error message from setgroups but will not increase the buffer
allocations or alter relevant code to check NGROUPS_MAX correctly.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090323125110.GB8686>