aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ima.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ima.h')
-rw-r--r--include/linux/ima.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/ima.h b/include/linux/ima.h
index 0e2aa45cb0ce..0e3f2a4c25f6 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -13,14 +13,18 @@
13#include <linux/fs.h> 13#include <linux/fs.h>
14struct linux_binprm; 14struct linux_binprm;
15 15
16#define IMA_COUNT_UPDATE 1
17#define IMA_COUNT_LEAVE 0
18
16#ifdef CONFIG_IMA 19#ifdef CONFIG_IMA
17extern int ima_bprm_check(struct linux_binprm *bprm); 20extern int ima_bprm_check(struct linux_binprm *bprm);
18extern int ima_inode_alloc(struct inode *inode); 21extern int ima_inode_alloc(struct inode *inode);
19extern void ima_inode_free(struct inode *inode); 22extern void ima_inode_free(struct inode *inode);
20extern int ima_path_check(struct path *path, int mask); 23extern int ima_path_check(struct path *path, int mask, int update_counts);
21extern void ima_file_free(struct file *file); 24extern void ima_file_free(struct file *file);
22extern int ima_file_mmap(struct file *file, unsigned long prot); 25extern int ima_file_mmap(struct file *file, unsigned long prot);
23extern void ima_shm_check(struct file *file); 26extern void ima_counts_get(struct file *file);
27extern void ima_counts_put(struct path *path, int mask);
24 28
25#else 29#else
26static inline int ima_bprm_check(struct linux_binprm *bprm) 30static inline int ima_bprm_check(struct linux_binprm *bprm)
@@ -38,7 +42,7 @@ static inline void ima_inode_free(struct inode *inode)
38 return; 42 return;
39} 43}
40 44
41static inline int ima_path_check(struct path *path, int mask) 45static inline int ima_path_check(struct path *path, int mask, int update_counts)
42{ 46{
43 return 0; 47 return 0;
44} 48}
@@ -53,7 +57,12 @@ static inline int ima_file_mmap(struct file *file, unsigned long prot)
53 return 0; 57 return 0;
54} 58}
55 59
56static inline void ima_shm_check(struct file *file) 60static inline void ima_counts_get(struct file *file)
61{
62 return;
63}
64
65static inline void ima_counts_put(struct path *path, int mask)
57{ 66{
58 return; 67 return;
59} 68}