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/nfsfh.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/nfsfh.c')
-rw-r--r-- | fs/nfsd/nfsfh.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 22cb5be79ad0..d5fe392b14fb 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/sunrpc/clnt.h> | 21 | #include <linux/sunrpc/clnt.h> |
22 | #include <linux/sunrpc/svc.h> | 22 | #include <linux/sunrpc/svc.h> |
23 | #include <linux/sunrpc/svcauth_gss.h> | ||
23 | #include <linux/nfsd/nfsd.h> | 24 | #include <linux/nfsd/nfsd.h> |
24 | 25 | ||
25 | #define NFSDDBG_FACILITY NFSDDBG_FH | 26 | #define NFSDDBG_FACILITY NFSDDBG_FH |
@@ -248,6 +249,11 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
248 | if (error) | 249 | if (error) |
249 | goto out; | 250 | goto out; |
250 | 251 | ||
252 | /* Check security flavor */ | ||
253 | error = check_nfsd_access(exp, rqstp); | ||
254 | if (error) | ||
255 | goto out; | ||
256 | |||
251 | /* Finally, check access permissions. */ | 257 | /* Finally, check access permissions. */ |
252 | error = nfsd_permission(exp, dentry, access); | 258 | error = nfsd_permission(exp, dentry, access); |
253 | 259 | ||