Why is max groups set so low (16)?
Bruce Evans
bde at zeta.org.au
Tue Nov 25 18:37:21 PST 2003
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
More information about the freebsd-standards
mailing list