svn commit: r192693 - head/sys/fs/nfsserver

[ Available lists | Index of svn-src-all | Month of May 2009 | Week of 24 May 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Rick Macklem <rmacklem@FreeBSD.org>
Date
24 May 2009 18:49:53
Subject
svn commit: r192693 - head/sys/fs/nfsserver
Message-ID
200905241849.n4OInroo097594@svn.freebsd.org


[ Hide this part ]
Author: rmacklem
Date: Sun May 24 18:49:53 2009
New Revision: 192693
URL: http://svn.freebsd.org/changeset/base/192693

Log:
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)

Modified:
head/sys/fs/nfsserver/nfs_nfsdkrpc.c

Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sun May 24 18:35:53 2009 (r192692)
+++ head/sys/fs/nfsserver/nfs_nfsdkrpc.c Sun May 24 18:49:53 2009 (r192693)
@@ -286,6 +286,8 @@ nfs_proc(struct nfsrv_descript *nd, u_in
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_in
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);
}

Elapsed time: 0.297 seconds