aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c4
-rw-r--r--fs/nfsd/vfs.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c
index c530e5d32f12..a765e7a741f4 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1686,7 +1686,7 @@ do_last:
1686 path_put(&nd.root); 1686 path_put(&nd.root);
1687 if (!IS_ERR(filp)) { 1687 if (!IS_ERR(filp)) {
1688 error = ima_path_check(&filp->f_path, filp->f_mode & 1688 error = ima_path_check(&filp->f_path, filp->f_mode &
1689 (MAY_READ | MAY_WRITE | MAY_EXEC), 0); 1689 (MAY_READ | MAY_WRITE | MAY_EXEC));
1690 if (error) { 1690 if (error) {
1691 fput(filp); 1691 fput(filp);
1692 filp = ERR_PTR(error); 1692 filp = ERR_PTR(error);
@@ -1747,7 +1747,7 @@ ok:
1747 filp = nameidata_to_filp(&nd, open_flag); 1747 filp = nameidata_to_filp(&nd, open_flag);
1748 if (!IS_ERR(filp)) { 1748 if (!IS_ERR(filp)) {
1749 error = ima_path_check(&filp->f_path, filp->f_mode & 1749 error = ima_path_check(&filp->f_path, filp->f_mode &
1750 (MAY_READ | MAY_WRITE | MAY_EXEC), 0); 1750 (MAY_READ | MAY_WRITE | MAY_EXEC));
1751 if (error) { 1751 if (error) {
1752 fput(filp); 1752 fput(filp);
1753 filp = ERR_PTR(error); 1753 filp = ERR_PTR(error);
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index c9942b39654e..936f08400db6 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -2122,8 +2122,7 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp,
2122 */ 2122 */
2123 path.mnt = exp->ex_path.mnt; 2123 path.mnt = exp->ex_path.mnt;
2124 path.dentry = dentry; 2124 path.dentry = dentry;
2125 err = ima_path_check(&path, acc & (MAY_READ | MAY_WRITE | MAY_EXEC), 2125 err = ima_path_check(&path, acc & (MAY_READ | MAY_WRITE | MAY_EXEC));
2126 IMA_COUNT_LEAVE);
2127nfsd_out: 2126nfsd_out:
2128 return err? nfserrno(err) : 0; 2127 return err? nfserrno(err) : 0;
2129} 2128}