Commit 38bd700b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] kNFSd: Fix problem with stale filehandles.

From: NeilBrown <neilb@cse.unsw.edu.au>

nfsd_setuser was not called until after filehandle lookup was done, so
filehandle lookup would use the wrong userid, and so the permission checking
in nfsd_acceptable would be bogus.
parent b836356d
......@@ -164,6 +164,9 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
goto out;
}
/* Set user creds for this exportpoint */
nfsd_setuser(rqstp, exp);
/*
* Look up the dentry using the NFS file handle.
*/
......@@ -224,9 +227,6 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
inode = dentry->d_inode;
/* Set user creds for this exportpoint */
nfsd_setuser(rqstp, exp);
/* Type check. The correct error return for type mismatches
* does not seem to be generally agreed upon. SunOS seems to
* use EISDIR if file isn't S_IFREG; a comment in the NFSv3
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment