diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-06-08 19:40:10 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-12 16:04:19 +0200 |
commit | 6035a27b25ab9dadc8c3d5c5df5eae3fca62fc95 (patch) | |
tree | 46b9eb3f1e96efa127e756484a72e508575874b8 /fs/namei.c | |
parent | introduce FMODE_CREATED and switch to it (diff) | |
download | linux-6035a27b25ab9dadc8c3d5c5df5eae3fca62fc95.tar.xz linux-6035a27b25ab9dadc8c3d5c5df5eae3fca62fc95.zip |
IMA: don't propagate opened through the entire thing
just check ->f_mode in ima_appraise_measurement()
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 4bd7cc0d7522..d2aeb282ed05 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3400,8 +3400,7 @@ finish_open_created: if (error) goto out; opened: - error = ima_file_check(file, op->acc_mode, - file->f_mode & FMODE_CREATED ? FILE_CREATED : 0); + error = ima_file_check(file, op->acc_mode); if (!error && will_truncate) error = handle_truncate(file); out: |