getgroups() gives wrong result with nss_winbind

Andreas andreas at conectiva.com.br
Fri Sep 17 01:20:07 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

This one is taking some time to end, but it's already way past testing for 64.



More information about the samba-technical mailing list