summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@huawei.com>2024-02-15 11:30:52 +0100
committerPaul Moore <paul@paul-moore.com>2024-02-15 23:43:39 -0500
commit526864dd2f60c16bcdc84e9e7bc6d69d08cfee21 (patch)
treecd2cef635eae705b1c52119fc72cd2103c765196 /security
parentfbd0506e5c5874fd52403fd38e3e77d895689870 (diff)
downloadlinux-526864dd2f60c16bcdc84e9e7bc6d69d08cfee21.tar.gz
linux-526864dd2f60c16bcdc84e9e7bc6d69d08cfee21.tar.bz2
linux-526864dd2f60c16bcdc84e9e7bc6d69d08cfee21.zip
ima: Align ima_inode_removexattr() definition with LSM infrastructure
Change ima_inode_removexattr() definition, so that it can be registered as implementation of the inode_removexattr hook. Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Acked-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_appraise.c3
-rw-r--r--security/security.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
index cb2d0d11aa77..36abc84ba299 100644
--- a/security/integrity/ima/ima_appraise.c
+++ b/security/integrity/ima/ima_appraise.c
@@ -790,7 +790,8 @@ int ima_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
return 0;
}
-int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name)
+int ima_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry,
+ const char *xattr_name)
{
int result;
diff --git a/security/security.c b/security/security.c
index b4f6b7467e08..58e20362b679 100644
--- a/security/security.c
+++ b/security/security.c
@@ -2430,7 +2430,7 @@ int security_inode_removexattr(struct mnt_idmap *idmap,
ret = cap_inode_removexattr(idmap, dentry, name);
if (ret)
return ret;
- ret = ima_inode_removexattr(dentry, name);
+ ret = ima_inode_removexattr(idmap, dentry, name);
if (ret)
return ret;
return evm_inode_removexattr(idmap, dentry, name);