Date: Thu, 28 May 2009 13:22:36 -0500 From: Brooks Davis <brooks@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-projects@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r192087 - in projects/ngroups: lib/libc/gen lib/libc/rpc lib/libc/sys usr.bin/id usr.bin/newgrp usr.bin/quota usr.sbin/chown usr.sbin/chroot usr.sbin/jail usr.sbin/jexec usr.sbin/lpr/lpc Message-ID: <20090528182236.GC44818@lor.one-eyed-alien.net> In-Reply-To: <20090515122400.B15792@delplex.bde.org> References: <200905140650.n4E6oURU079910@svn.freebsd.org> <20090515122400.B15792@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--rQ2U398070+RC21q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 15, 2009 at 01:32:52PM +1000, Bruce Evans wrote: > On Thu, 14 May 2009, Brooks Davis wrote: >=20 >> Log: >> Use to value returned by sysconf(_SC_NGROUPS_MAX) in favor of >> NGROUPS_MAX or NGROUPS since POSIX says that NGROUPS_MAX represents a >> lower bound on sysconf(_SC_NGROUPS_MAX). >=20 > Actually, POSIX says that NGROUPS_MAX is identical to > sysconf(_SC_NGROUPS_MAX) if it is defined (and the sysconf() succeeds). > It is _POSIX_NGROUPS_MAX that gives the lower bound. _POSIX_NGROUPS_MAX > is always 8, except under old versions of POSIX that don't require > supplementary groups to be supported, where it is always 0. It is a > bug for a POSIX implementation to define NGROUPS_MAX if its value is > not always identical to sysconf(_SC_NGROUPS_MAX), or for a POSIX > application to use NGROUPS_MAX unconditionally. According to the limits.h section of POSIX.1-2008, NGROUPS_MAX is a Runtime Increasable Value and thus NGROUPS_MAX specifies the minimum value that implementation may use. Given the constraint that the value returned by sysconf(_SC_NGROUPS_MAX) not change during the life of a process, there is probably a practical limitation that the underlying limit be controllable at compile time or by a tunable, but not by sysctl. I'll look over and incorporate your other comments shortly. -- Brooks --rQ2U398070+RC21q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFKHtZsXY6L6fI4GtQRAlkmAJ0V55/s1FYvE8CdJM6C1Ne1YScNDwCeK2Y9 egMaVWNr4iG74kU/1WRIcx8= =iDIW -----END PGP SIGNATURE----- --rQ2U398070+RC21q--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090528182236.GC44818>