summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-09-11 00:04:49 +0200
committerJames Morris <jmorris@namei.org>2009-09-11 00:04:49 +0200
commita3c8b97396ef42edfb845788ba6f53b2a93ce980 (patch)
tree530c5bdbc534618311dab3e0af245835af56db0f /fs/namei.c
parentLinux 2.6.31 (diff)
parentbinfmt_elf: fix PT_INTERP bss handling (diff)
downloadlinux-a3c8b97396ef42edfb845788ba6f53b2a93ce980.tar.xz
linux-a3c8b97396ef42edfb845788ba6f53b2a93ce980.zip
Merge branch 'next' into for-linus
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 1f13751693a5..fcfc5539252c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1533,9 +1533,11 @@ int may_open(struct path *path, int acc_mode, int flag)
if (error)
return error;
- error = ima_path_check(path,
- acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC),
+ error = ima_path_check(path, acc_mode ?
+ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC) :
+ ACC_MODE(flag) & (MAY_READ | MAY_WRITE),
IMA_COUNT_UPDATE);
+
if (error)
return error;
/*