aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mountd/mountd.c
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2016-10-25 00:52:42 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2016-10-25 00:52:42 +0000
commit5ebee88d80bc3979a847362f020f9921141b72b7 (patch)
tree43b92bcf278e5411cbaf10d6fbca53f3ec57be06 /usr.sbin/mountd/mountd.c
parent51fefb04189840cf844cfc3522aa6d67b8a0482f (diff)
downloadsrc-5ebee88d80bc3979a847362f020f9921141b72b7.tar.gz
src-5ebee88d80bc3979a847362f020f9921141b72b7.zip
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
Notes
Notes: svn path=/head/; revision=307890
Diffstat (limited to 'usr.sbin/mountd/mountd.c')
-rw-r--r--usr.sbin/mountd/mountd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index e4b04b0d3e0b..d893387028be 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -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");