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.
goto out;
}
+ /* Set user creds for this exportpoint */
+ nfsd_setuser(rqstp, exp);
+
/*
* Look up the dentry using the NFS file handle.
*/
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