HomeFreeBSD

cr_canseeothergids(): Make the logic easier to grasp

Description

cr_canseeothergids(): Make the logic easier to grasp

Invert the initial test on whether the policy is in force so that, if
there are no restrictions, the function bails out early, allowing to
de-indent the rest of the code and have it finish with a non-zero (deny)
'return'.

No functional change (intended).

MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52272

Details

Provenance
olceAuthored on Aug 27 2025, 4:53 PM
Differential Revision
D52272: cr_canseeothergids(): Make the logic easier to grasp
Parents
rGd39756f23fe2: MAC/do: Restore matching the first supplementary group
Branches
Unknown
Tags
Unknown