HomeFreeBSD

nfs: Fallback to GID_NOGROUP on no groups

Description

nfs: Fallback to GID_NOGROUP on no groups

We cannot unconditionally access nfsd's VNET variables in
'sys/kern/vfs_export.c' nor 'sys/fs/nfsserver/nfs_nfsdsubs.c', as they
may not have been compiled in depending on build options.

So, forget about the extra mile of using the configured default group
and use the hardcoded GID_NOGROUP (which differs only on systems running
nfsuserd(8) and with a non-default GID for their "nogroup" group).

Reported by: rpokala, bapt (MINIMAL compile breakup)
Reported by: cy, David Wolfskill (panics caused by mountd(8))
Approved by: markj (mentor)
Fixes: cfbe7a62dc62 ("nfs, rpc: Ensure kernel credentials have at least one group")

(cherry picked from commit 5169d4307eb9c8b7bb0bd46d600012bcc12cbdae)

Approved by: markj (mentor)

Details

Provenance
olceAuthored on Sun, Nov 3, 10:26 AM
Parents
rG6cd8d025282f: cred: groupmember(): Remove tolerance for empty 'cr_groups'
Branches
Unknown
Tags
Unknown