Audit: save audit_backlog_limit audit messages in case auditd comes back
authorEric Paris <eparis@redhat.com>
Fri, 18 Apr 2008 14:02:28 +0000 (10:02 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 28 Apr 2008 10:19:04 +0000 (06:19 -0400)
commitf3d357b092956959563398b59ef2fdd10aea387d
treeb797d759fb81aa461bf0d7734e2f5be7b5e75288
parent2532386f480eefbdd67b48be55fb4fb3e5a6081c
Audit: save audit_backlog_limit audit messages in case auditd comes back

This patch causes the kernel audit subsystem to store up to
audit_backlog_limit messages for use by auditd if it ever appears
sometime in the future in userspace.  This is useful to collect audit
messages during bootup and even when auditd is stopped.  This is NOT a
reliable mechanism, it does not ever call audit_panic, nor should it.
audit_log_lost()/audit_panic() are called during the normal delivery
mechanism.  The messages are still sent to printk/syslog as usual and if
too many messages appear to be queued they will be silently discarded.

I liked doing it by default, but this patch only uses the queue in
question if it was booted with audit=1 or if the kernel was built
enabling audit by default.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/audit.c