]> git.baikalelectronics.ru Git - kernel.git/commit
Audit: dereferencing krule as if it were an audit_watch
authorEric Paris <eparis@redhat.com>
Thu, 11 Jun 2009 18:31:34 +0000 (14:31 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 24 Jun 2009 03:50:36 +0000 (23:50 -0400)
commitc4b90a5544df04e81a2500ef791182318467276e
tree3456260b54bc8fd8d336d5e8865104480d5ac0fe
parent0236bf1d38a62a45e372b95e72a4f4375405a391
Audit: dereferencing krule as if it were an audit_watch

audit_update_watch() runs all of the rules for a given watch and duplicates
them, attaches a new watch to them, and then when it finishes that process
and has called free on all of the old rules (ok maybe still inside the rcu
grace period) it proceeds to use the last element from list_for_each_entry_safe()
as if it were a krule rather than being the audit_watch which was anchoring
the list to output a message about audit rules changing.

This patch unfies the audit message from two different places into a helper
function and calls it from the correct location in audit_update_rules().  We
will now get an audit message about the config changing for each rule (with
each rules filterkey) rather than the previous garbage.

Signed-off-by: Eric Paris <eparis@redhat.com>
kernel/auditfilter.c