HomeFreeBSD

kern: adopt the cr_gid macro for cr_groups[0] more widely

Description

kern: adopt the cr_gid macro for cr_groups[0] more widely

A future change may split cr_gid out of cr_groups[0] so that there's a
cleaner separation between the supplemental groups and the effective
group. Do the mechanical conversion where we can, and drop some
comments where we need further work because some assumptions about
cr_gid == cr_groups[0] have been made.

This should not be a functional change, but downstreams and other
out-of-tree code are advised to investigate their usage of cr_groups
sooner rather than later, as a future change will render assumptions
about these two being equivalent harmful.

Reviewed by: asomers, kib, olce
Differential Revision: https://reviews.freebsd.org/D51153

Details

Provenance
kevansAuthored on Jul 24 2025, 2:59 PM
Reviewer
asomers
Differential Revision
D51153: kern: adopt the cr_gid macro for cr_groups[0] more widely
Parents
rGd2eb8a023547: bluetooth: sdpd: switch to getpeereid() instead of LOCAL_PEERCRED
Branches
Unknown
Tags
Unknown