From owner-svn-src-projects@freebsd.org Mon Jul 31 12:08:46 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AF93DAB153 for ; Mon, 31 Jul 2017 12:08:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE0F4748A8; Mon, 31 Jul 2017 12:08:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VC8jxj014314; Mon, 31 Jul 2017 12:08:45 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VC8j2b014313; Mon, 31 Jul 2017 12:08:45 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707311208.v6VC8j2b014313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 31 Jul 2017 12:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r321781 - projects/pnfs-planb-server-stable11/sys/fs/nfs X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server-stable11/sys/fs/nfs X-SVN-Commit-Revision: 321781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 12:08:46 -0000 Author: rmacklem Date: Mon Jul 31 12:08:44 2017 New Revision: 321781 URL: https://svnweb.freebsd.org/changeset/base/321781 Log: Manually merge the change that adds vfs.nfs.enable_uidtostring, so I don't need to wait for the MFC to stable/11. Modified: projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonsubs.c Modified: projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonsubs.c Mon Jul 31 12:03:45 2017 (r321780) +++ projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonsubs.c Mon Jul 31 12:08:44 2017 (r321781) @@ -68,12 +68,17 @@ gid_t nfsrv_defaultgid = GID_NOGROUP; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; int nfsd_enable_stringtouid = 0; +static int nfs_enable_uidtostring = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; extern int nfsrv_lughashsize; extern struct mtx nfsrv_dslock_mtx; extern struct nfsdevicehead nfsrv_devidhead; +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 @@ -2648,7 +2653,7 @@ nfsv4_uidtostr(uid_t uid, u_char **cpp, int *retlenp, cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (nfsrv_dnsnamelen > 0 && !nfs_enable_uidtostring) { /* * Always map nfsrv_defaultuid to "nobody". */ @@ -2910,7 +2915,7 @@ nfsv4_gidtostr(gid_t gid, u_char **cpp, int *retlenp, cnt = 0; tryagain: - if (nfsrv_dnsnamelen > 0) { + if (nfsrv_dnsnamelen > 0 && !nfs_enable_uidtostring) { /* * Always map nfsrv_defaultgid to "nogroup". */