audit: handle a clean auditd shutdown with grace
authorPaul Moore <paul@paul-moore.com>
Tue, 29 Nov 2016 21:53:26 +0000 (16:53 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 14 Dec 2016 18:06:04 +0000 (13:06 -0500)
commit6c54e7899693dee3db67ea996e9be0e10f67920f
treeda2218357864e7fcb1e111d913e27d5b3c5f3bed
parente1d166212894d9d959a601c4802882b877bb420a
audit: handle a clean auditd shutdown with grace

When auditd stops cleanly it sets 'auditd_pid' to 0 with an
AUDIT_SET message, in this case we should reset our backlog
queues via the auditd_reset() function.  This patch also adds
a 'auditd_pid' check to the top of kauditd_send_unicast_skb()
so we can fail quicker.

Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit.c