HomeFreeBSD

stress2: Fix removal of supplementary groups

Description

stress2: Fix removal of supplementary groups

To this end, call setgroups(0, NULL) instead of passing the effective
GID. This stance is fully compatible with older versions of FreeBSD.

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/D52290

(cherry picked from commit de4832289625f3c1cea4200d8eb7b4c753b90648)

Details

Provenance
olceAuthored on Aug 29 2025, 5:01 PM
Differential Revision
D52290: stress2: Fix removal of supplementary groups
Parents
rGb0395b44974b: tools/regression/priv: Don't call setgroups() with the effective GID
Branches
Unknown
Tags
Unknown