OSDN Git Service

audit: prepare audit_context for use in calling contexts beyond syscalls
authorPaul Moore <paul@paul-moore.com>
Wed, 17 Feb 2021 00:46:48 +0000 (19:46 -0500)
committerPaul Moore <paul@paul-moore.com>
Mon, 20 Sep 2021 02:10:32 +0000 (22:10 -0400)
commit12c5e81d3fd0a690c49dfe1c3a99bf80a24075c7
treecdd9679cfc7056c43d946dd501b3c9860f687f25
parent6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
audit: prepare audit_context for use in calling contexts beyond syscalls

This patch cleans up some of our audit_context handling by
abstracting out the reset and return code fixup handling to dedicated
functions.  Not only does this help make things easier to read and
inspect, it allows for easier reuse by future patches.  We also
convert the simple audit_context->in_syscall flag into an enum which
can be used to by future patches to indicate a calling context other
than the syscall context.

Thanks to Richard Guy Briggs for review and feedback.

Acked-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit.h
kernel/auditsc.c