diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2011-03-09 22:57:53 -0500 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2012-09-07 14:57:46 -0400 |
commit | 9957a5043e7b0b7361cdf48eea22b2900293e63a (patch) | |
tree | 41930ca31f67b77fd814a5ad80fcc5d1652ccbe6 /include/linux/ima.h | |
parent | a10bf26b2f53242836e9362c6c9c857b627b82a9 (diff) |
ima: add inode_post_setattr call
Changing an inode's metadata may result in our not needing to appraise
the file. In such cases, we must remove 'security.ima'.
Changelog v1:
- use ima_inode_post_setattr() stub function, if IMA_APPRAISE not configured
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Diffstat (limited to 'include/linux/ima.h')
-rw-r--r-- | include/linux/ima.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/ima.h b/include/linux/ima.h index 6ac8e50c6cf5..e2bfbb1e9af6 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
@@ -39,5 +39,15 @@ static inline int ima_file_mmap(struct file *file, unsigned long prot) | |||
39 | { | 39 | { |
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | |||
42 | #endif /* CONFIG_IMA_H */ | 43 | #endif /* CONFIG_IMA_H */ |
44 | |||
45 | #ifdef CONFIG_IMA_APPRAISE | ||
46 | extern void ima_inode_post_setattr(struct dentry *dentry); | ||
47 | #else | ||
48 | static inline void ima_inode_post_setattr(struct dentry *dentry) | ||
49 | { | ||
50 | return; | ||
51 | } | ||
52 | #endif /* CONFIG_IMA_APPRAISE_H */ | ||
43 | #endif /* _LINUX_IMA_H */ | 53 | #endif /* _LINUX_IMA_H */ |