]> www.infradead.org Git - users/dwmw2/linux.git/commit
lsm: use lsm_prop in security_audit_rule_match
authorCasey Schaufler <casey@schaufler-ca.com>
Wed, 9 Oct 2024 17:32:10 +0000 (10:32 -0700)
committerPaul Moore <paul@paul-moore.com>
Fri, 11 Oct 2024 18:34:12 +0000 (14:34 -0400)
commit870b7fdc660b38c4e1bd8bf48e62aa352ddf8f42
tree6895925c59b98edee5d7813c3ad2004507394af6
parented870e35db660724ff0d815d9a3ef9a6247ffbab
lsm: use lsm_prop in security_audit_rule_match

Change the secid parameter of security_audit_rule_match
to a lsm_prop structure pointer. Pass the entry from the
lsm_prop structure for the approprite slot to the LSM hook.

Change the users of security_audit_rule_match to use the
lsm_prop instead of a u32. The scaffolding function lsmprop_init()
fills the structure with the value of the old secid, ensuring that
it is available to the appropriate module hook. The sources of
the secid, security_task_getsecid() and security_inode_getsecid(),
will be converted to use the lsm_prop structure later in the series.
At that point the use of lsmprop_init() is dropped.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[PM: subject line tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
12 files changed:
include/linux/lsm_hook_defs.h
include/linux/security.h
kernel/auditfilter.c
kernel/auditsc.c
security/apparmor/audit.c
security/apparmor/include/audit.h
security/integrity/ima/ima.h
security/integrity/ima/ima_policy.c
security/security.c
security/selinux/include/audit.h
security/selinux/ss/services.c
security/smack/smack_lsm.c