Skip to content

Commit

Permalink
Take ima_path_check() in nfsd past dentry_open() in nfsd_open()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Feb 7, 2010
1 parent 4b06e5b commit 1e41568
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1e41568

Please sign in to comment.