Re: [PATCH v3 5/5] Audit: Add record for multiple object contexts
From: Paul Moore
Date: Thu Apr 24 2025 - 18:19:27 EST
On Mar 19, 2025 Casey Schaufler <casey@xxxxxxxxxxxxxxxx> wrote:
>
> Create a new audit record AUDIT_MAC_OBJ_CONTEXTS.
> An example of the MAC_OBJ_CONTEXTS (1424) record is:
>
> type=MAC_OBJ_CONTEXTS[1424]
> msg=audit(1601152467.009:1050):
> obj_selinux=unconfined_u:object_r:user_home_t:s0
>
> When an audit event includes a AUDIT_MAC_OBJ_CONTEXTS record
> the "obj=" field in other records in the event will be "obj=?".
> An AUDIT_MAC_OBJ_CONTEXTS record is supplied when the system has
> multiple security modules that may make access decisions based
> on an object security context.
>
> Signed-off-by: Casey Schaufler <casey@xxxxxxxxxxxxxxxx>
> ---
> include/linux/audit.h | 6 +++++
> include/uapi/linux/audit.h | 1 +
> kernel/audit.c | 51 +++++++++++++++++++++++++++++++++++++-
> kernel/auditsc.c | 45 ++++++++-------------------------
> 4 files changed, 68 insertions(+), 35 deletions(-)
Similar to patch 4/5, this looks fine modulo the obj count changes.
Related, you changed to a single subj/obj count in v3, is it no longer
important to distinguish between the two?
--
paul-moore.com