diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-07-19 09:59:32 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-07-19 09:59:32 +0000 |
commit | 1d2fef9b9a1232ea8e5d3564d27f79286abb3ae7 (patch) | |
tree | 2cd20096e27f1f52387c18d56a19428c2033735a /sys/fs/nfs | |
parent | 089400e72d9a247231f3479a1a4b85a75969a96d (diff) | |
download | src-1d2fef9b9a1232ea8e5d3564d27f79286abb3ae7.tar.gz src-1d2fef9b9a1232ea8e5d3564d27f79286abb3ae7.zip |
Rename vfs.nfsd.enable_uidtostring to vfs.nfs.enable_uidtostring.
It applies to both NFS client and NFS server, and is useful for both.
This is different from vfs.nfsd.enable_stringtouid, which is specific
to server side.
Reviewed by: rmacklem@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/head/; revision=321196
Diffstat (limited to 'sys/fs/nfs')
-rw-r--r-- | sys/fs/nfs/nfs_commonsubs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 86819ac7f23b..1a82e052a8df 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -68,11 +68,15 @@ gid_t nfsrv_defaultgid = GID_NOGROUP; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; int nfsd_enable_stringtouid = 0; -int nfsd_enable_uidtostring = 0; +static int nfs_enable_uidtostring = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; extern int nfsrv_lughashsize; +SYSCTL_DECL(_vfs_nfs); +SYSCTL_INT(_vfs_nfs, OID_AUTO, enable_uidtostring, CTLFLAG_RW, + &nfs_enable_uidtostring, 0, "Make nfs always send numeric owner_names"); + /* * This array of structures indicates, for V4: * retfh - which of 3 types of calling args are used @@ -2562,7 +2566,7 @@ nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp, NFSPROC_T *p) cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) { + if (nfsrv_dnsnamelen > 0 && !nfs_enable_uidtostring) { /* * Always map nfsrv_defaultuid to "nobody". */ @@ -2824,7 +2828,7 @@ nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp, NFSPROC_T *p) cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0 && !nfsd_enable_uidtostring) { + if (nfsrv_dnsnamelen > 0 && !nfs_enable_uidtostring) { /* * Always map nfsrv_defaultgid to "nogroup". */ |