HomeFreeBSD

kern: rename crsetgroups_fallback, document it in ucred(9)

Description

kern: rename crsetgroups_fallback, document it in ucred(9)

As of FreeBSD 15.0, crsetgroups() *only* sets supplementary groups,
while crsetgroups_and_egid() will do both using an array of the same
style that previous versions used for crsetgroups() -- i.e., the first
element is the egid, and the remainder are supplementary groups.

Unlike the previous iteration of crsetgroups(), crsetgroups_and_egid()
is less prone to misuse as the caller must provide a default egid to use
in case the array is empty. This is particularly useful for groups
being set from data provided by userland.

Reviewed by: olce
Suggested by: olce
Differential Revision: https://reviews.freebsd.org/D51647

Details

Provenance
kevansAuthored on Aug 1 2025, 12:50 AM
Reviewer
olce
Differential Revision
D51647: kern: rename crsetgroups_fallback, document it in ucred(9)
Parents
rG09f2abaa59f9: kern: add a new ucred flag for groups having been set
Branches
Unknown
Tags
Unknown