No functional change (intended).
This commit is a cleanup and defense-in-depth change that:
- Removes the effective GID from the group list passed by nfsuserd(8) to the NFS server via nfssvc(NFSSVC_IDNAME), as this information is in theory redundant since there is also a 'nid_gid' field in 'struct nfsd_idargs'.
- Ensure nfsuserd(8) effectively fills up the 'nid_gid' correctly in this case.
- Ensure nfsuserd(8) always initializes all fields in 'nid_gid' to sensible default values, to protect for kernel-side changes that would start using some of them.
- Ensure that the default UID and GID obtained by the resolution of "nouser" and "nogroup" are always used as placeholders, instead of the default values (which, while here, have been replaced by the usual macros).
For point 1., now that the passed group list can be empty (if there are
no supplementary groups), change detection of whether group information
was filled in nfssvc_idname() by checking if 'nid_gid' is the default
group (which implied doing point 4.).
Sponsored by: The FreeBSD Foundation