diff options
Diffstat (limited to 'include/linux/ima.h')
-rw-r--r-- | include/linux/ima.h | 17 |
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> |
14 | struct linux_binprm; | 14 | struct 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 |
17 | extern int ima_bprm_check(struct linux_binprm *bprm); | 20 | extern int ima_bprm_check(struct linux_binprm *bprm); |
18 | extern int ima_inode_alloc(struct inode *inode); | 21 | extern int ima_inode_alloc(struct inode *inode); |
19 | extern void ima_inode_free(struct inode *inode); | 22 | extern void ima_inode_free(struct inode *inode); |
20 | extern int ima_path_check(struct path *path, int mask); | 23 | extern int ima_path_check(struct path *path, int mask, int update_counts); |
21 | extern void ima_file_free(struct file *file); | 24 | extern void ima_file_free(struct file *file); |
22 | extern int ima_file_mmap(struct file *file, unsigned long prot); | 25 | extern int ima_file_mmap(struct file *file, unsigned long prot); |
23 | extern void ima_shm_check(struct file *file); | 26 | extern void ima_counts_get(struct file *file); |
27 | extern void ima_counts_put(struct path *path, int mask); | ||
24 | 28 | ||
25 | #else | 29 | #else |
26 | static inline int ima_bprm_check(struct linux_binprm *bprm) | 30 | static 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 | ||
41 | static inline int ima_path_check(struct path *path, int mask) | 45 | static 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 | ||
56 | static inline void ima_shm_check(struct file *file) | 60 | static inline void ima_counts_get(struct file *file) |
61 | { | ||
62 | return; | ||
63 | } | ||
64 | |||
65 | static inline void ima_counts_put(struct path *path, int mask) | ||
57 | { | 66 | { |
58 | return; | 67 | return; |
59 | } | 68 | } |