diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2016-11-08 21:09:48 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2016-11-08 21:09:48 +0000 |
commit | 6820bd03e36f8e558d468b56554bcc97e27eae2d (patch) | |
tree | 9523a40380ff384f5e0f903223ae61f6319ba02f /usr.sbin | |
parent | bce706eb1e2ba54bf26f3f31674637411f652829 (diff) | |
download | FreeBSD-src-6820bd03e36f8e558d468b56554bcc97e27eae2d.zip FreeBSD-src-6820bd03e36f8e558d468b56554bcc97e27eae2d.tar.gz |
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.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mountd/mountd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index e4b04b0..d893387 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"); |