]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Set default uid/gid to nobody/nogroup for NFSv4 mapping.
authorrmacklem <rmacklem@FreeBSD.org>
Fri, 21 Apr 2017 20:08:10 +0000 (20:08 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Fri, 21 Apr 2017 20:08:10 +0000 (20:08 +0000)
commit0a043373abc93ecfb7dd9c509210dfff358ad7cc
tree83b43a1ed9574d68c4ef65fb029a814f7004ddd8
parented5fb51b5b9a1882876c1c6f2f7b83298d319226
Set default uid/gid to nobody/nogroup for NFSv4 mapping.

The default uid/gid for NFSv4 are set by the nfsuserd(8) daemon.
However, they were 0 until the nfsuserd(8) was run. Since it is
possible to use NFSv4 without running the nfsuserd(8) daemon, set them
to nobody/nogroup initially.
Without this patch, the values would be set by the nfsuserd(8) daemon
and left changed even if the nfsuserd(8) daemon was killed. The default
values of 0 meant that setting a group to "wheel" would fail even when
done by root.
It also adds a definition of GID_NOGROUP to sys/conf.h.

Discussed on: freebsd-current@
MFC after: 2 weeks
sys/fs/nfs/nfs_commonsubs.c
sys/sys/conf.h