mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Acked-by: Serge Hallyn <[email protected]> Acked-by: Dmitry Kasatkin <[email protected]>
This commit is contained in:
parent
a10bf26b2f
commit
9957a5043e
2 changed files with 12 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/fcntl.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/evm.h>
|
||||
#include <linux/ima.h>
|
||||
|
||||
/**
|
||||
* 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)
|
|||
|
||||
if (!error) {
|
||||
fsnotify_change(dentry, ia_valid);
|
||||
ima_inode_post_setattr(dentry);
|
||||
evm_inode_post_setattr(dentry, ia_valid);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue