]> 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)
commit79ed1a2d5572799af0990ee098b827fb91adc189
treecdd9679cfc7056c43d946dd501b3c9860f687f25
parentb901123b83fca756ffcd85ea50a6cd9637d66d0c
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