From owner-svn-src-head@freebsd.org Tue Oct 25 00:52:43 2016 Return-Path: Delivered-To: svn-src-head@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 9F2C6C1ED0A; Tue, 25 Oct 2016 00:52:43 +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 6C14E9C6; Tue, 25 Oct 2016 00:52:43 +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 u9P0qgU3000864; Tue, 25 Oct 2016 00:52:42 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9P0qgr3000863; Tue, 25 Oct 2016 00:52:42 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201610250052.u9P0qgr3000863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 25 Oct 2016 00:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307890 - head/usr.sbin/mountd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 00:52:43 -0000 Author: rmacklem Date: Tue Oct 25 00:52:42 2016 New Revision: 307890 URL: https://svnweb.freebsd.org/changeset/base/307890 Log: mountd(8) was erroneously setting the sysctl for the old NFS server when the new/default NFS server was running, for the "-n" option. This patch fixes the problem for head and stable/11. For stable/10 the patch will need to be modified when MFC'd, since the stable/10 mountd.c handles both old and new NFS servers. Since the new NFS server uses vfs.nfsd.nfs_privport == 0 by default, there wouldn't have been many users affected by the code not setting it to 0 when the "-n" option was specified. PR: 213450 Submitted by: rs@bytecamp.net MFC after: 2 weeks Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Mon Oct 24 22:35:45 2016 (r307889) +++ head/usr.sbin/mountd/mountd.c Tue Oct 25 00:52:42 2016 (r307890) @@ -476,7 +476,7 @@ main(int argc, char **argv) rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrec); if (!resvport_only) { - if (sysctlbyname("vfs.nfsrv.nfs_privport", NULL, NULL, + if (sysctlbyname("vfs.nfsd.nfs_privport", NULL, NULL, &resvport_only, sizeof(resvport_only)) != 0 && errno != ENOENT) { syslog(LOG_ERR, "sysctl: %m");