HomeFreeBSD

tools/regression/priv: Don't call setgroups() with the effective GID

Description

tools/regression/priv: Don't call setgroups() with the effective GID

The 'setgroups(0, NULL);' stance works the same on all versions of
FreeBSD, getting rid of all supplementary groups. The replaced code
would force the effective GID to also be a supplementary group.

Fixes: 9da2fe96ff2e ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52289

(cherry picked from commit ff7252cdafbd9dab104a5e7b33b8bb84117a8789)

Details

Provenance
olceAuthored on Aug 29 2025, 5:00 PM
Differential Revision
D52289: tools/regression/priv: Don't call setgroups() with the effective GID
Parents
rGac18468f3c4a: group.5: Add a reference to setcred(2)
Branches
Unknown
Tags
Unknown