mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +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
1 changed files with 2 additions and 0 deletions
|
@ -497,6 +497,8 @@ static void audit_tree_log_remove_rule(struct audit_krule *rule)
|
||||||
{
|
{
|
||||||
struct audit_buffer *ab;
|
struct audit_buffer *ab;
|
||||||
|
|
||||||
|
if (!audit_enabled)
|
||||||
|
return;
|
||||||
ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
|
ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
|
||||||
if (unlikely(!ab))
|
if (unlikely(!ab))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue