diff options
author | Dmitry Kasatkin <d.kasatkin@samsung.com> | 2014-06-27 11:15:44 -0400 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2014-09-09 10:28:43 -0400 |
commit | 3034a146820c26fe6da66a45f6340fe87fe0983a (patch) | |
tree | f78b031b7d1fa7eabe1f221749157fefa04704cd /fs/namei.c | |
parent | 3dcbad52cf18c3c379e96b992d22815439ebbe53 (diff) |
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+
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index 985c6f368485..005771f97189 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -3058,7 +3058,7 @@ opened: | |||
3058 | error = open_check_o_direct(file); | 3058 | error = open_check_o_direct(file); |
3059 | if (error) | 3059 | if (error) |
3060 | goto exit_fput; | 3060 | goto exit_fput; |
3061 | error = ima_file_check(file, op->acc_mode); | 3061 | error = ima_file_check(file, op->acc_mode, *opened); |
3062 | if (error) | 3062 | if (error) |
3063 | goto exit_fput; | 3063 | goto exit_fput; |
3064 | 3064 | ||