knfsd: nfsd4: return nfserr_wrongsec
Make the first actual use of the secinfo information by using it to return nfserr_wrongsec when an export is found that doesn't allow the flavor used on this request. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
6c0a654dce
commit
32c1eb0cd7
@@ -240,6 +240,9 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
|
||||
err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry);
|
||||
if (err)
|
||||
return err;
|
||||
err = check_nfsd_access(exp, rqstp);
|
||||
if (err)
|
||||
goto out;
|
||||
/*
|
||||
* Note: we compose the file handle now, but as the
|
||||
* dentry may be negative, it may need to be updated.
|
||||
@@ -247,6 +250,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
|
||||
err = fh_compose(resfh, exp, dentry, fhp);
|
||||
if (!err && !dentry->d_inode)
|
||||
err = nfserr_noent;
|
||||
out:
|
||||
dput(dentry);
|
||||
exp_put(exp);
|
||||
return err;
|
||||
|
Reference in New Issue
Block a user