From 840e81b7a5fc65719a450a138531e02e36524320 Mon Sep 17 00:00:00 2001 From: dfr Date: Wed, 30 Apr 1997 09:51:37 +0000 Subject: Allow NULL rpcs on non-privileged ports at all times to work around broken clients. PR: kern/3298 Submitted by: Tor Egge --- sys/nfs/nfs_syscalls.c | 5 +++-- sys/nfsclient/nfs_nfsiod.c | 5 +++-- sys/nfsserver/nfs_syscalls.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index 75d43c2..ea35c01 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.20 1997/03/27 20:01:07 guido Exp $ + * $Id: nfs_syscalls.c,v 1.21 1997/04/27 20:01:23 wollman Exp $ */ #include @@ -607,7 +607,8 @@ nfssvc_nfsd(nsd, argp, p) sin = mtod(nam, struct sockaddr_in *); port = ntohs(sin->sin_port); - if (port >= IPPORT_RESERVED) { + if (port >= IPPORT_RESERVED && + nd->nd_procnum != NFSPROC_NULL) { nd->nd_procnum = NFSPROC_NOOP; nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK); cacherep = RC_DOIT; diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c index 75d43c2..ea35c01 100644 --- a/sys/nfsclient/nfs_nfsiod.c +++ b/sys/nfsclient/nfs_nfsiod.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.20 1997/03/27 20:01:07 guido Exp $ + * $Id: nfs_syscalls.c,v 1.21 1997/04/27 20:01:23 wollman Exp $ */ #include @@ -607,7 +607,8 @@ nfssvc_nfsd(nsd, argp, p) sin = mtod(nam, struct sockaddr_in *); port = ntohs(sin->sin_port); - if (port >= IPPORT_RESERVED) { + if (port >= IPPORT_RESERVED && + nd->nd_procnum != NFSPROC_NULL) { nd->nd_procnum = NFSPROC_NOOP; nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK); cacherep = RC_DOIT; diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c index 75d43c2..ea35c01 100644 --- a/sys/nfsserver/nfs_syscalls.c +++ b/sys/nfsserver/nfs_syscalls.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.20 1997/03/27 20:01:07 guido Exp $ + * $Id: nfs_syscalls.c,v 1.21 1997/04/27 20:01:23 wollman Exp $ */ #include @@ -607,7 +607,8 @@ nfssvc_nfsd(nsd, argp, p) sin = mtod(nam, struct sockaddr_in *); port = ntohs(sin->sin_port); - if (port >= IPPORT_RESERVED) { + if (port >= IPPORT_RESERVED && + nd->nd_procnum != NFSPROC_NULL) { nd->nd_procnum = NFSPROC_NOOP; nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK); cacherep = RC_DOIT; -- cgit v1.1