Skip to content

Commit

Permalink
audit: make sure we never skip the multicast broadcast
Browse files Browse the repository at this point in the history
When the auditd connection is reset, either intentionally or due to
a failure, any records that were in the main backlog queue would not
be sent in a multicast broadcast.  This patch fixes this problem by
not flushing the main backlog queue on a connection reset, the main
kauditd_thread() will take care of that normally.

Resolves: linux-audit/audit-kernel#41
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
pcmoore committed Jun 16, 2017
1 parent c81be52 commit cd33f5f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,11 +605,10 @@ static void auditd_reset(const struct auditd_connection *ac)
if (ac_old)
call_rcu(&ac_old->rcu, auditd_conn_free);

/* flush all of the main and retry queues to the hold queue */
/* flush the retry queue to the hold queue, but don't touch the main
* queue since we need to process that normally for multicast */
while ((skb = skb_dequeue(&audit_retry_queue)))
kauditd_hold_skb(skb);
while ((skb = skb_dequeue(&audit_queue)))
kauditd_hold_skb(skb);
}

/**
Expand Down

0 comments on commit cd33f5f

Please sign in to comment.