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

github at samba.org github at samba.org
Fri Oct 5 08:37:12 UTC 2018

There is a new pull request by arichardson against master on the Samba Samba Github repository

https://github.com/arichardson/samba fix-mac-ngroups

Don't use sysconf(_SC_NGROUPS_MAX) MacOS
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

A patch file from https://github.com/samba-team/samba/pull/210.patch is attached
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: github-pr-fix-mac-ngroups-210.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181005/ec78e8b8/github-pr-fix-mac-ngroups-210.patch>

More information about the samba-technical mailing list