summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2009-05-24 18:49:53 +0000
committerrmacklem <rmacklem@FreeBSD.org>2009-05-24 18:49:53 +0000
commitc220cf0c33f657989fce4ecabdeaa9d485b4f67d (patch)
tree1d6f7ca5170dde8fb9124f4521e039066ed39f8e /sys/fs
parent29949828e6249a3ee54e3cd7897e36d53c643b88 (diff)
downloadFreeBSD-src-c220cf0c33f657989fce4ecabdeaa9d485b4f67d.zip
FreeBSD-src-c220cf0c33f657989fce4ecabdeaa9d485b4f67d.tar.gz
Fix the experimental NFSv4 server so that it handles the case
where a client is not allowed NFSv4 access correctly. This restriction is specified in the "V4: ..." line(s) in /etc/exports. Approved by: kib (mentor)
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdkrpc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdkrpc.c b/sys/fs/nfsserver/nfs_nfsdkrpc.c
index 18b6d6d..f0b5765 100644
--- a/sys/fs/nfsserver/nfs_nfsdkrpc.c
+++ b/sys/fs/nfsserver/nfs_nfsdkrpc.c
@@ -286,6 +286,8 @@ nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, struct socket *so,
cacherep = RC_DROPIT;
} else if (nd->nd_repstat) {
cacherep = RC_REPLY;
+ if ((nd->nd_flag & ND_NFSV4) == 0)
+ panic("nfs_repstat for nfsv2,3");
} else {
/*
* For NFSv3, play it safe and assume that the client is
@@ -313,6 +315,9 @@ nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, struct socket *so,
else
cacherep = RC_REPLY;
*rpp = nfsrvd_updatecache(nd, so);
+ } else if (cacherep == RC_REPLY) {
+ /* Generate the error reply message for NFSv4 */
+ nfsrvd_dorpc(nd, isdgram, td);
}
return (cacherep);
}
OpenPOWER on IntegriCloud