aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-01-26 05:43:08 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-02-07 03:06:22 -0500
commit1e41568d7378d1ba8c64ba137b9ddd00b59f893a (patch)
tree755987f08fe2cc44dbdac089eb18a21ec844f179 /fs/nfsd/vfs.c
parent4b06e5b9ad8abb20105b2b25e42c509ebe9b2d76 (diff)
Take ima_path_check() in nfsd past dentry_open() in nfsd_open()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r--fs/nfsd/vfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index c194793b642b..325959e264ce 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -752,6 +752,8 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
752 flags, current_cred()); 752 flags, current_cred());
753 if (IS_ERR(*filp)) 753 if (IS_ERR(*filp))
754 host_err = PTR_ERR(*filp); 754 host_err = PTR_ERR(*filp);
755 host_err = ima_path_check(&(*filp)->f_path,
756 access & (MAY_READ | MAY_WRITE | MAY_EXEC));
755out_nfserr: 757out_nfserr:
756 err = nfserrno(host_err); 758 err = nfserrno(host_err);
757out: 759out:
@@ -2127,7 +2129,6 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp,
2127 */ 2129 */
2128 path.mnt = exp->ex_path.mnt; 2130 path.mnt = exp->ex_path.mnt;
2129 path.dentry = dentry; 2131 path.dentry = dentry;
2130 err = ima_path_check(&path, acc & (MAY_READ | MAY_WRITE | MAY_EXEC));
2131nfsd_out: 2132nfsd_out:
2132 return err? nfserrno(err) : 0; 2133 return err? nfserrno(err) : 0;
2133} 2134}