Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 2003 13:37:15 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "David O'Brien" <obrien@freebsd.org>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: Why is max groups set so low (16)?
Message-ID:  <20031126132013.E72053@gamplex.bde.org>
In-Reply-To: <20031126021321.GA55417@dragon.nuxi.com>
References:  <20031126021321.GA55417@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 25 Nov 2003, David O'Brien wrote:

> After spending 3 hours debugging Samba problems I found the cause of the
> problems is that I am >16 groups and our NGROUPS_MAX is set to 16.  My
> question for this group, is why is NGROUPS_MAX set so low?  Is it because
> NFS_MAXGRPS is 16 as specified in some NFS standard?

It is a compile-time constant, so it can't be changed from its historical
value without breaking binary compatibility.  POSIX specifies only that it
be no smaller than _POSIX_NGROUP_MAX (8) if it exists.

The binary compatibility problems seem to be small.  libc doesn't have any
references at all to NGROUPS_MAX except in man pages, but that is partly
because it mostly misspells NGROUPS_MAX as NGROUPS.  getgroups(2) and
setgroups(2) are limited by whatever the kernel wants, not by their API,
although their documentation says that there is a compile-time limit
(getgroups.2 spells NGROUPS_MAX correctly, but setgroups.2 spells it
NGROUPS).

Bruce



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