aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsfh.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@citi.umich.edu>2007-07-17 04:04:48 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 10:23:08 -0700
commit32c1eb0cd7ee00b5eb7b6f7059c635fbc1052966 (patch)
treec1a15e47d2dd93417b38d374346332809d461bda /fs/nfsd/nfsfh.c
parentknfsd: nfsd: factor nfsd_lookup into 2 pieces (diff)
downloadlinux-dev-32c1eb0cd7ee00b5eb7b6f7059c635fbc1052966.tar.xz
linux-dev-32c1eb0cd7ee00b5eb7b6f7059c635fbc1052966.zip
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.c6
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 @@
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/svc.h>
+#include <linux/sunrpc/svcauth_gss.h>
#include <linux/nfsd/nfsd.h>
#define NFSDDBG_FACILITY NFSDDBG_FH
@@ -248,6 +249,11 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
if (error)
goto out;
+ /* Check security flavor */
+ error = check_nfsd_access(exp, rqstp);
+ if (error)
+ goto out;
+
/* Finally, check access permissions. */
error = nfsd_permission(exp, dentry, access);