aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/attr.c2
-rw-r--r--include/linux/ima.h10
2 files changed, 12 insertions, 0 deletions
diff --git a/fs/attr.c b/fs/attr.c
index 29e38a1f7f77..cce7df53b694 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -14,6 +14,7 @@
14#include <linux/fcntl.h> 14#include <linux/fcntl.h>
15#include <linux/security.h> 15#include <linux/security.h>
16#include <linux/evm.h> 16#include <linux/evm.h>
17#include <linux/ima.h>
17 18
18/** 19/**
19 * inode_change_ok - check if attribute changes to an inode are allowed 20 * inode_change_ok - check if attribute changes to an inode are allowed
@@ -247,6 +248,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
247 248
248 if (!error) { 249 if (!error) {
249 fsnotify_change(dentry, ia_valid); 250 fsnotify_change(dentry, ia_valid);
251 ima_inode_post_setattr(dentry);
250 evm_inode_post_setattr(dentry, ia_valid); 252 evm_inode_post_setattr(dentry, ia_valid);
251 } 253 }
252 254
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
46extern void ima_inode_post_setattr(struct dentry *dentry);
47#else
48static 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 */