Commit 526864dd authored by Roberto Sassu's avatar Roberto Sassu Committed by Paul Moore

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: default avatarRoberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: default avatarStefan Berger <stefanb@linux.ibm.com>
Reviewed-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Reviewed-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Acked-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent fbd0506e
...@@ -200,7 +200,9 @@ static inline int ima_inode_remove_acl(struct mnt_idmap *idmap, ...@@ -200,7 +200,9 @@ static inline int ima_inode_remove_acl(struct mnt_idmap *idmap,
{ {
return ima_inode_set_acl(idmap, dentry, acl_name, NULL); return ima_inode_set_acl(idmap, dentry, acl_name, NULL);
} }
extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name);
extern int ima_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry,
const char *xattr_name);
#else #else
static inline bool is_ima_appraise_enabled(void) static inline bool is_ima_appraise_enabled(void)
{ {
...@@ -231,7 +233,8 @@ static inline int ima_inode_set_acl(struct mnt_idmap *idmap, ...@@ -231,7 +233,8 @@ static inline int ima_inode_set_acl(struct mnt_idmap *idmap,
return 0; return 0;
} }
static inline int ima_inode_removexattr(struct dentry *dentry, static inline int ima_inode_removexattr(struct mnt_idmap *idmap,
struct dentry *dentry,
const char *xattr_name) const char *xattr_name)
{ {
return 0; return 0;
......
...@@ -790,7 +790,8 @@ int ima_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, ...@@ -790,7 +790,8 @@ int ima_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
return 0; 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; int result;
......
...@@ -2430,7 +2430,7 @@ int security_inode_removexattr(struct mnt_idmap *idmap, ...@@ -2430,7 +2430,7 @@ int security_inode_removexattr(struct mnt_idmap *idmap,
ret = cap_inode_removexattr(idmap, dentry, name); ret = cap_inode_removexattr(idmap, dentry, name);
if (ret) if (ret)
return ret; return ret;
ret = ima_inode_removexattr(dentry, name); ret = ima_inode_removexattr(idmap, dentry, name);
if (ret) if (ret)
return ret; return ret;
return evm_inode_removexattr(idmap, dentry, name); return evm_inode_removexattr(idmap, dentry, name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment