HomeFreeBSD

mountd(8): parsecred(): Remove "duplicate compression"

Description

mountd(8): parsecred(): Remove "duplicate compression"

No functional change (intended).

This code dates back to 4.4BSD, became wrong after some getgrouplist()
(nssswitch-related) change in 2007, was fixed only in 2020 and since
then underwent cosmetic changes.

It is likely that in fact it never served any useful purpose in FreeBSD,
except perhaps at the very beginning. It's most probably not the case
today: NFS credentials are normally only used to check for file
accesses, whose group is checked against all groups of a credentials
indiscriminately (except for the real GID). Consequently, having
a single duplicate, which the code would actually remove only if in the
first supplementary group slot, doesn't change behavior. Moreover, we
are going to regain one slot in a subsequent commit.

Discussed with: rmacklem
Approved by: markj (mentor)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46920

Details

Provenance
olceAuthored on Sep 26 2024, 5:00 PM
Differential Revision
D46920: mountd(8): parsecred(): Remove "duplicate compression"
Parents
rGae22a4bb7437: mountd(8): parsecred(): uid:gid:... loop: Simplify a bit
Branches
Unknown
Tags
Unknown