mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
lsm: use lsm_prop in security_inode_getsecid
Change the security_inode_getsecid() interface to fill in a lsm_prop structure instead of a u32 secid. This allows for its callers to gather data from all registered LSMs. Data is provided for IMA and audit. Change the name to security_inode_getlsmprop(). Cc: linux-integrity@vger.kernel.org Cc: selinux@vger.kernel.org Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> [PM: subj line tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
committed by
Paul Moore
parent
37f670aacd
commit
07f9d2c113
@@ -2276,13 +2276,17 @@ static void audit_copy_inode(struct audit_names *name,
|
||||
const struct dentry *dentry,
|
||||
struct inode *inode, unsigned int flags)
|
||||
{
|
||||
struct lsm_prop prop;
|
||||
|
||||
name->ino = inode->i_ino;
|
||||
name->dev = inode->i_sb->s_dev;
|
||||
name->mode = inode->i_mode;
|
||||
name->uid = inode->i_uid;
|
||||
name->gid = inode->i_gid;
|
||||
name->rdev = inode->i_rdev;
|
||||
security_inode_getsecid(inode, &name->osid);
|
||||
security_inode_getlsmprop(inode, &prop);
|
||||
/* scaffolding */
|
||||
name->osid = prop.scaffold.secid;
|
||||
if (flags & AUDIT_INODE_NOEVAL) {
|
||||
name->fcap_ver = -1;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user