summaryrefslogtreecommitdiffstats
path: root/include/linux/ima.h
diff options
context:
space:
mode:
authorDmitry Kasatkin <d.kasatkin@samsung.com>2014-06-27 18:15:44 +0300
committerMimi Zohar <zohar@linux.vnet.ibm.com>2014-09-09 10:28:43 -0400
commit3034a146820c26fe6da66a45f6340fe87fe0983a (patch)
treef78b031b7d1fa7eabe1f221749157fefa04704cd /include/linux/ima.h
parent3dcbad52cf18c3c379e96b992d22815439ebbe53 (diff)
downloadblackbird-op-linux-3034a146820c26fe6da66a45f6340fe87fe0983a.tar.gz
blackbird-op-linux-3034a146820c26fe6da66a45f6340fe87fe0983a.zip
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 'include/linux/ima.h')
-rw-r--r--include/linux/ima.h4
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;
#ifdef CONFIG_IMA
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;
}
OpenPOWER on IntegriCloud