Commit 65a8766f authored by Richard Guy Briggs's avatar Richard Guy Briggs Committed by Paul Moore

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/50Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
[PM: tweak the subject line]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 4b09791b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment