diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2018-06-14 22:20:05 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-06-28 17:41:02 +0200 |
commit | 65a8766f5f50a5cd342f3d8f77a30917648ddb67 (patch) | |
tree | fdc3adb361cdc517d8cefede54597bb5256b5b3b /kernel/audit_tree.c | |
parent | cred: conditionally declare groups-related functions (diff) | |
download | linux-65a8766f5f50a5cd342f3d8f77a30917648ddb67.tar.xz linux-65a8766f5f50a5cd342f3d8f77a30917648ddb67.zip |
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>
Diffstat (limited to 'kernel/audit_tree.c')
-rw-r--r-- | kernel/audit_tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index c99ebaae5abc..9f6eaeb6919f 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c @@ -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; |