From: Al Viro Date: Tue, 26 Jan 2010 10:43:08 +0000 (-0500) Subject: Take ima_path_check() in nfsd past dentry_open() in nfsd_open() X-Git-Tag: v2.6.33-rc8~44^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e41568d7378d1ba8c64ba137b9ddd00b59f893a;p=platform%2Fkernel%2Flinux-3.10.git Take ima_path_check() in nfsd past dentry_open() in nfsd_open() Signed-off-by: Al Viro --- diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index c194793..325959e 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, flags, current_cred()); if (IS_ERR(*filp)) host_err = PTR_ERR(*filp); + host_err = ima_path_check(&(*filp)->f_path, + access & (MAY_READ | MAY_WRITE | MAY_EXEC)); out_nfserr: err = nfserrno(host_err); out: @@ -2127,7 +2129,6 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, */ path.mnt = exp->ex_path.mnt; path.dentry = dentry; - err = ima_path_check(&path, acc & (MAY_READ | MAY_WRITE | MAY_EXEC)); nfsd_out: return err? nfserrno(err) : 0; }