[PR PATCH] [Closed]: Don't use sysconf(_SC_NGROUPS_MAX) MacOS

github at samba.org github at samba.org
Fri Oct 5 11:00:22 UTC 2018


There's a closed pull request on the Samba Samba Github repository

Don't use sysconf(_SC_NGROUPS_MAX) MacOS
https://github.com/samba-team/samba/pull/210
Description: On MacOS sysconf(_SC_NGROUPS_MAX) always returns 16. However, this is not
the value used by getgroups(2). MacOS uses nested groups but getgroups(2)
will return the flattened list which can easily exceed 16 groups. In my
testing getgroups() already returns 16 groups on a freshly installed
system. And on a 10.14 system the root user is in more than 16 groups by
default which makes it impossible to run smbd without this change.

See https://bugzilla.samba.org/show_bug.cgi?id=8773


More information about the samba-technical mailing list