svn commit: r307890 - head/usr.sbin/mountd
Rick Macklem
rmacklem at FreeBSD.org
Tue Oct 25 00:52:43 UTC 2016
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 at 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");
More information about the svn-src-head
mailing list