mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
audit: check audit_enabled in audit_tree_log_remove_rule()
Respect the audit_enabled flag when printing tree rule config change records. See: https://github.com/linux-audit/audit-kernel/issues/50 Signed-off-by: Richard Guy Briggs <rgb@redhat.com> [PM: tweak the subject line] Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
4b09791ba0
commit
65a8766f5f
@ -497,6 +497,8 @@ static void audit_tree_log_remove_rule(struct audit_krule *rule)
|
||||
{
|
||||
struct audit_buffer *ab;
|
||||
|
||||
if (!audit_enabled)
|
||||
return;
|
||||
ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
|
||||
if (unlikely(!ab))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user