Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2016 21:09:48 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r308449 - stable/11/usr.sbin/mountd
Message-ID:  <201611082109.uA8L9mJq099904@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Tue Nov  8 21:09:48 2016
New Revision: 308449
URL: https://svnweb.freebsd.org/changeset/base/308449

Log:
  MFC: r307890
  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.

Modified:
  stable/11/usr.sbin/mountd/mountd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/mountd/mountd.c
==============================================================================
--- stable/11/usr.sbin/mountd/mountd.c	Tue Nov  8 20:58:25 2016	(r308448)
+++ stable/11/usr.sbin/mountd/mountd.c	Tue Nov  8 21:09:48 2016	(r308449)
@@ -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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611082109.uA8L9mJq099904>