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>
This commit is contained in:
Al Viro
2018-06-08 13:40:10 -04:00
parent 73a09dd943
commit 6035a27b25
6 changed files with 16 additions and 17 deletions

View File

@@ -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: