getgroups() gives wrong result with nss_winbind
Henrik Nordstrom
hno at squid-cache.org
Thu Sep 16 21:48:19 GMT 2004
On Thu, 16 Sep 2004, Andreas wrote:
> I'm having some strange errors with group membership in samba-3.0.7 (not
> sure about other version).
>
> There is this user (marcia) belonging to over 200 groups. However, when she calls
> getgroups(2), only 64 are returned.
Maybe your OS limit is set to 64..
Try the following to verify your OS limit:
#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);
}
Regards
Henrik
More information about the samba-technical
mailing list