Mostly to cap the amount of storage to maintain in kernel space, and
for historical reasons.
> 2. What is required to limit the dependence on groups to just GLIBC or
> just the kernel? Is that even possible?
The main problem is programs who do things like:
gid_t mygroups[NGROUPS];
Other than that, it should all be in kernel space. According to
POSIX, the NGROUPS above really should be sysconf(_SC_NGROUPS_MAX) --
NGROUPS_MAX is defined as a *guaranteed minimum* of
sysconf(_SC_NGROUPS_MAX). Obviously there needs to be a kernel ->
libc interface for the sysconf.
FWIW, POSIX specifies:
Application writers should note that {NGROUPS_MAX} is not
necessarily a constant on all implementations.
(glibc has #define NGROUPS NGROUPS_MAX).
> 3. Is there any true advantage to supporting more than 32 groups, or
> creating "meta-groups" to get around the problem?
There probably is.
-hpa
-- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/