ima: Don't remove security.ima if file must not be appraised
authorRoberto Sassu <roberto.sassu@huawei.com>
Fri, 14 May 2021 15:27:53 +0000 (17:27 +0200)
committerMimi Zohar <zohar@linux.ibm.com>
Tue, 1 Jun 2021 16:30:51 +0000 (12:30 -0400)
commited1b472fc15aeaa20ddeeb93fd25190014e50d17
tree4dfb18c8666e1cb579f8380fa8846e2a25343308
parent026d7fc92a9d629630779c999fe49ecae93f9d63
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>
security/integrity/ima/ima_appraise.c