summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_subs.c
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2002-01-11 01:20:57 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2002-01-11 01:20:57 +0000
commit85d55b026ed83614708f835806feb9b15245fe7f (patch)
treef3a274897116b003d4d9927760a46daeb5613677 /sys/nfs/nfs_subs.c
parentea3895d1acd085a6fdf27ccb93ba3d5ce07ef46e (diff)
Add a new sysctl that removes the requirement for reserved ports to be
used by the nfs server.
Diffstat (limited to 'sys/nfs/nfs_subs.c')
-rw-r--r--sys/nfs/nfs_subs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 38a91d45245..15dded43510 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.38 2001/12/19 08:58:06 art Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.39 2002/01/11 01:20:56 nate Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1654,7 +1654,7 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag)
saddr = mtod(nam, struct sockaddr_in *);
if (saddr->sin_family == AF_INET &&
- (ntohs(saddr->sin_port) >= IPPORT_RESERVED ||
+ ((ntohs(saddr->sin_port) >= IPPORT_RESERVED && !nfs_norsvport) ||
(slp->ns_so->so_type == SOCK_STREAM && ntohs(saddr->sin_port) == 20))) {
vput(*vpp);
return (NFSERR_AUTHERR | AUTH_TOOWEAK);