1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/testsuite
Alex Richardson 2c18a98253 Don't use sysconf(_SC_NGROUPS_MAX) on macOS for getgroups()
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.
Setting _DARWIN_UNLIMITED_GETGROUPS allows getgroups() to return more than
16 groups. This also changes set_unix_security_ctx() to only set up to
16 groups since that is the limit for initgroups() according to the manpage.

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

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep  9 17:43:19 UTC 2021 on sn-devel-184
2021-09-09 17:43:19 +00:00
..
headers build: Remove workaround for missing os.path.relpath in Python < 2.6 2019-11-13 08:42:30 +00:00
nsswitch
smbd Don't use sysconf(_SC_NGROUPS_MAX) on macOS for getgroups() 2021-09-09 17:43:19 +00:00
unittests auth3: Remove auth_skel.c 2021-04-19 18:18:31 +00:00
README testsuite: Remove build_farm testsuites 2019-03-12 02:56:05 +00:00

README for testsuite directory
------------------------------

The Samba testsuite is divided up into the following subdirectories.

    - lib	      Various library files used by tool directories
    
    - nsswitch        Tests for nsswitch extensions

All the scripts require an unreleased
version of DejaGNU, and although they contain some useful tests they
are not so useful at the moment.  All scripts are migrating to a
single test framework, Satyr.  <cvs://cvs.samba.org/data/cvs/satyr>