HomeFreeBSD

MAC/do: Restore matching the first supplementary group

Description

MAC/do: Restore matching the first supplementary group

As 'cr_gid' was in fact stored in cr_groups[0],
rule_grant_supplementary_groups() would loop only on further elements of
cr_groups[]. Now that cr_groups[0] is not 'cr_gid' anymore, but some
supplementary group, take it into account.

Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after: 5 days
MFC to: stable/15
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52271

Details

Provenance
olceAuthored on Aug 27 2025, 3:22 PM
Differential Revision
D52271: MAC/do: Restore matching the first supplementary group
Parents
rGab7186a48634: MAC/bsdextended: Restore matching subjects' effective GID
Branches
Unknown
Tags
Unknown