|
@@ -410,10 +410,12 @@ static void kauditd_send_skb(struct sk_buff *skb)
|
|
err = netlink_unicast(audit_sock, skb, audit_nlk_portid, 0);
|
|
err = netlink_unicast(audit_sock, skb, audit_nlk_portid, 0);
|
|
if (err < 0) {
|
|
if (err < 0) {
|
|
BUG_ON(err != -ECONNREFUSED); /* Shouldn't happen */
|
|
BUG_ON(err != -ECONNREFUSED); /* Shouldn't happen */
|
|
- printk(KERN_ERR "audit: *NO* daemon at audit_pid=%d\n", audit_pid);
|
|
|
|
- audit_log_lost("auditd disappeared\n");
|
|
|
|
- audit_pid = 0;
|
|
|
|
- audit_sock = NULL;
|
|
|
|
|
|
+ if (audit_pid) {
|
|
|
|
+ printk(KERN_ERR "audit: *NO* daemon at audit_pid=%d\n", audit_pid);
|
|
|
|
+ audit_log_lost("auditd disappeared\n");
|
|
|
|
+ audit_pid = 0;
|
|
|
|
+ audit_sock = NULL;
|
|
|
|
+ }
|
|
/* we might get lucky and get this in the next auditd */
|
|
/* we might get lucky and get this in the next auditd */
|
|
audit_hold_skb(skb);
|
|
audit_hold_skb(skb);
|
|
} else
|
|
} else
|