ima: pass 'opened' flag to identify newly created files
Empty files and missing xattrs do not guarantee that a file was just created. This patch passes FILE_CREATED flag to IMA to reliably identify new files. Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: <stable@vger.kernel.org> 3.14+
This commit is contained in:

committed by
Mimi Zohar

parent
3dcbad52cf
commit
3034a14682
@@ -3058,7 +3058,7 @@ opened:
|
||||
error = open_check_o_direct(file);
|
||||
if (error)
|
||||
goto exit_fput;
|
||||
error = ima_file_check(file, op->acc_mode);
|
||||
error = ima_file_check(file, op->acc_mode, *opened);
|
||||
if (error)
|
||||
goto exit_fput;
|
||||
|
||||
|
Reference in New Issue
Block a user