diff options
author | guido <guido@FreeBSD.org> | 1997-04-09 20:17:15 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 1997-04-09 20:17:15 +0000 |
commit | c0dad1ff8de1b9d4994133bc779a792853883a4d (patch) | |
tree | 1da592b1c152ea6959aa518ea158da2bdebaae32 /sbin | |
parent | 76800e1dac55c750d871a9d186890e37094b40ea (diff) | |
download | FreeBSD-src-c0dad1ff8de1b9d4994133bc779a792853883a4d.zip FreeBSD-src-c0dad1ff8de1b9d4994133bc779a792853883a4d.tar.gz |
Make a sysconfig variable controlling if teh kernel should accept
nfs requests from non-privileged ports.
Change mountd such that it does never set this variable, but only clears
it when run with -n. Also document this in the man page.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mountd/mountd.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c index 472440e..1ca38ec 100644 --- a/sbin/mountd/mountd.c +++ b/sbin/mountd/mountd.c @@ -43,7 +43,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; */ static const char rcsid[] = - "$Id: mountd.c,v 1.16 1997/03/29 03:32:49 imp Exp $"; + "$Id: mountd.c,v 1.17 1997/04/01 14:15:30 bde Exp $"; #endif /*not lint*/ #include <sys/param.h> @@ -318,13 +318,15 @@ main(argc, argv) } } - mib[0] = CTL_VFS; - mib[1] = MOUNT_NFS; - mib[2] = NFS_NFSPRIVPORT; - if (sysctl(mib, 3, NULL, NULL, &resvport_only, - sizeof(resvport_only)) != 0 && errno != ENOENT) { - syslog(LOG_ERR, "sysctl: %m"); - exit(1); + if (!resvport_only) { + mib[0] = CTL_VFS; + mib[1] = MOUNT_NFS; + mib[2] = NFS_NFSPRIVPORT; + if (sysctl(mib, 3, NULL, NULL, &resvport_only, + sizeof(resvport_only)) != 0 && errno != ENOENT) { + syslog(LOG_ERR, "sysctl: %m"); + exit(1); + } } if ((udptransp = svcudp_create(RPC_ANYSOCK)) == NULL || |