From owner-svn-src-projects@FreeBSD.ORG Thu May 28 18:22:28 2009 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE181106568B; Thu, 28 May 2009 18:22:28 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 573BC8FC29; Thu, 28 May 2009 18:22:28 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n4SIMbDD068814; Thu, 28 May 2009 13:22:37 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n4SIMaDn068813; Thu, 28 May 2009 13:22:36 -0500 (CDT) (envelope-from brooks) Date: Thu, 28 May 2009 13:22:36 -0500 From: Brooks Davis To: Bruce Evans Message-ID: <20090528182236.GC44818@lor.one-eyed-alien.net> References: <200905140650.n4E6oURU079910@svn.freebsd.org> <20090515122400.B15792@delplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rQ2U398070+RC21q" Content-Disposition: inline In-Reply-To: <20090515122400.B15792@delplex.bde.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Thu, 28 May 2009 13:22:37 -0500 (CDT) 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 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 18:22:29 -0000 --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--