getgroups() gives wrong result with nss_winbind

Andreas andreas at conectiva.com.br
Fri Sep 17 01:33:13 GMT 2004


On Fri, Sep 17, 2004 at 09:17:09AM +1000, tridge at samba.org wrote:
> Henrik,
> 
>  > #include <unistd.h>
>  > #include <stdio.h>
>  > 
>  > 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/unpacked/junkcode/maxgroups.c

Ok, it stopped at 65536:

max of 65536 supplementary groups



More information about the samba-technical mailing list