]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit77ff6dbcfd7e4198273868ce3ecfa01b281c874f
treecdd9679cfc7056c43d946dd501b3c9860f687f25
parent4ce062870c70d404088bf50de34ea03772413b4e
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