Henrik,

> #include
> #include
>
> int main(int argc, char **argv)
> {
> long ngroups_max;
> ngroups_max = sysconf(_SC_NGROUPS_MAX);
> printf("ngroups: %ld\n", ngroups_max);
> }


That limit is not used on all operating systems. For example, glibc on
Linux does not use sysconf for the limit (there are patches to fix
this).

You can find a program that properly tests the max groups limit at:

http://junkcode.samba.org/ftp/unpack...de/maxgroups.c

Cheers, Tridge