Skip to content

Commit ed1b472

Browse files
robertosassumimizohar
authored andcommitted
ima: Don't remove security.ima if file must not be appraised
Files might come from a remote source and might have xattrs, including security.ima. It should not be IMA task to decide whether security.ima should be kept or not. This patch removes the removexattr() system call in ima_inode_post_setattr(). Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
1 parent 026d7fc commit ed1b472

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

security/integrity/ima/ima_appraise.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,6 @@ void ima_inode_post_setattr(struct user_namespace *mnt_userns,
532532
return;
533533

534534
action = ima_must_appraise(mnt_userns, inode, MAY_ACCESS, POST_SETATTR);
535-
if (!action)
536-
__vfs_removexattr(&init_user_ns, dentry, XATTR_NAME_IMA);
537535
iint = integrity_iint_find(inode);
538536
if (iint) {
539537
set_bit(IMA_CHANGE_ATTR, &iint->atomic_flags);

0 commit comments

Comments
 (0)