svn commit: r317240 - head/sys/fs/nfs

Rick Macklem rmacklem at FreeBSD.org
Fri Apr 21 01:50:43 UTC 2017


Author: rmacklem
Date: Fri Apr 21 01:50:41 2017
New Revision: 317240
URL: https://svnweb.freebsd.org/changeset/base/317240

Log:
  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. Also, the default
  values of 0 meant that setting a group to "wheel" would fail even when
  done by root and this patch fixes this issue.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfs/nfs_commonsubs.c

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 21 00:45:44 2017	(r317239)
+++ head/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 21 01:50:41 2017	(r317240)
@@ -63,8 +63,8 @@ int nfsrv_useacl = 1;
 struct nfssockreq nfsrv_nfsuserdsock;
 int nfsrv_nfsuserd = 0;
 struct nfsreqhead nfsd_reqq;
-uid_t nfsrv_defaultuid;
-gid_t nfsrv_defaultgid;
+uid_t nfsrv_defaultuid = 65534;
+gid_t nfsrv_defaultgid = 65533;
 int nfsrv_lease = NFSRV_LEASE;
 int ncl_mbuf_mlen = MLEN;
 int nfsd_enable_stringtouid = 0;


More information about the svn-src-all mailing list