path: root/include
diff options
authorDmitry Kasatkin <d.kasatkin@samsung.com>2014-06-27 18:15:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-30 09:43:16 -0700
commit8006fece344df5eb1d82593402a6cdcf5dce71b3 (patch)
tree54574e952f47dc11f205064dc8d79000443b8563 /include
parentf072a54f6892b611e592fbd87d7871deb04a9db4 (diff)
ima: pass 'opened' flag to identify newly created files
commit 3034a146820c26fe6da66a45f6340fe87fe0983a upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ima.h b/include/linux/ima.h
index 7cf5e9b32550..120ccc53fcb7 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -15,7 +15,7 @@ struct linux_binprm;
extern int ima_bprm_check(struct linux_binprm *bprm);
-extern int ima_file_check(struct file *file, int mask);
+extern int ima_file_check(struct file *file, int mask, int opened);
extern void ima_file_free(struct file *file);
extern int ima_file_mmap(struct file *file, unsigned long prot);
extern int ima_module_check(struct file *file);
@@ -27,7 +27,7 @@ static inline int ima_bprm_check(struct linux_binprm *bprm)
return 0;
-static inline int ima_file_check(struct file *file, int mask)
+static inline int ima_file_check(struct file *file, int mask, int opened)
return 0;