diff options
author | Andy Adamson <andros@citi.umich.edu> | 2007-07-17 07:04:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:08 -0400 |
commit | 32c1eb0cd7ee00b5eb7b6f7059c635fbc1052966 (patch) | |
tree | c1a15e47d2dd93417b38d374346332809d461bda /fs/nfsd/vfs.c | |
parent | 6c0a654dceaa4342270306de77eadb0173dfb58a (diff) |
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>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 627f460a4007..8e109e586a74 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -240,6 +240,9 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name, | |||
240 | err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); | 240 | err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); |
241 | if (err) | 241 | if (err) |
242 | return err; | 242 | return err; |
243 | err = check_nfsd_access(exp, rqstp); | ||
244 | if (err) | ||
245 | goto out; | ||
243 | /* | 246 | /* |
244 | * Note: we compose the file handle now, but as the | 247 | * Note: we compose the file handle now, but as the |
245 | * dentry may be negative, it may need to be updated. | 248 | * 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, | |||
247 | err = fh_compose(resfh, exp, dentry, fhp); | 250 | err = fh_compose(resfh, exp, dentry, fhp); |
248 | if (!err && !dentry->d_inode) | 251 | if (!err && !dentry->d_inode) |
249 | err = nfserr_noent; | 252 | err = nfserr_noent; |
253 | out: | ||
250 | dput(dentry); | 254 | dput(dentry); |
251 | exp_put(exp); | 255 | exp_put(exp); |
252 | return err; | 256 | return err; |