diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2017-04-24 22:43:52 -0400 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2017-06-21 14:37:12 -0400 |
commit | 6f6723e21589f4594bb72b27ddbb2f75defb33bb (patch) | |
tree | 195ca6479f58a4519e092710b49848173f615aa3 /include/linux/ima.h | |
parent | e1f5e01f4b035ced1c71b40866e4e5c0508fbb0b (diff) |
ima: define is_ima_appraise_enabled()
Only return enabled if in enforcing mode, not fix or log modes.
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Changes:
- Define is_ima_appraise_enabled() as a bool (Thiago Bauermann)
Diffstat (limited to 'include/linux/ima.h')
-rw-r--r-- | include/linux/ima.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ima.h b/include/linux/ima.h index 7f6952f8d6aa..0e4647e0eb60 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
@@ -75,11 +75,17 @@ static inline void ima_add_kexec_buffer(struct kimage *image) | |||
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #ifdef CONFIG_IMA_APPRAISE | 77 | #ifdef CONFIG_IMA_APPRAISE |
78 | extern bool is_ima_appraise_enabled(void); | ||
78 | extern void ima_inode_post_setattr(struct dentry *dentry); | 79 | extern void ima_inode_post_setattr(struct dentry *dentry); |
79 | extern int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name, | 80 | extern int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name, |
80 | const void *xattr_value, size_t xattr_value_len); | 81 | const void *xattr_value, size_t xattr_value_len); |
81 | extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name); | 82 | extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name); |
82 | #else | 83 | #else |
84 | static inline bool is_ima_appraise_enabled(void) | ||
85 | { | ||
86 | return 0; | ||
87 | } | ||
88 | |||
83 | static inline void ima_inode_post_setattr(struct dentry *dentry) | 89 | static inline void ima_inode_post_setattr(struct dentry *dentry) |
84 | { | 90 | { |
85 | return; | 91 | return; |