Skip to content

Commit 526864d

Browse files
robertosassupcmoore
authored andcommitted
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 <[email protected]> Reviewed-by: Stefan Berger <[email protected]> Reviewed-by: Casey Schaufler <[email protected]> Reviewed-by: Mimi Zohar <[email protected]> Acked-by: Mimi Zohar <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent fbd0506 commit 526864d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

include/linux/ima.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ static inline int ima_inode_remove_acl(struct mnt_idmap *idmap,
200200
{
201201
return ima_inode_set_acl(idmap, dentry, acl_name, NULL);
202202
}
203-
extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name);
203+
204+
extern int ima_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry,
205+
const char *xattr_name);
204206
#else
205207
static inline bool is_ima_appraise_enabled(void)
206208
{
@@ -231,7 +233,8 @@ static inline int ima_inode_set_acl(struct mnt_idmap *idmap,
231233
return 0;
232234
}
233235

234-
static inline int ima_inode_removexattr(struct dentry *dentry,
236+
static inline int ima_inode_removexattr(struct mnt_idmap *idmap,
237+
struct dentry *dentry,
235238
const char *xattr_name)
236239
{
237240
return 0;

security/integrity/ima/ima_appraise.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ int ima_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
790790
return 0;
791791
}
792792

793-
int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name)
793+
int ima_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry,
794+
const char *xattr_name)
794795
{
795796
int result;
796797

security/security.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ int security_inode_removexattr(struct mnt_idmap *idmap,
24302430
ret = cap_inode_removexattr(idmap, dentry, name);
24312431
if (ret)
24322432
return ret;
2433-
ret = ima_inode_removexattr(dentry, name);
2433+
ret = ima_inode_removexattr(idmap, dentry, name);
24342434
if (ret)
24352435
return ret;
24362436
return evm_inode_removexattr(idmap, dentry, name);

0 commit comments

Comments
 (0)