From: Richard Guy Briggs <rgb@redhat.com>
To: Linux-Audit Mailing List <linux-audit@redhat.com>
Cc: Richard Guy Briggs <rgb@redhat.com>, eparis@parisplace.org
Subject: [PATCH ghak59 V1 1/2] audit: tree: check audit_enabled
Date: Thu, 14 Jun 2018 16:20:05 -0400 [thread overview]
Message-ID: <85aa05b35501e7cf40feccbffe3a33b66a622ea1.1529004286.git.rgb@redhat.com> (raw)
In-Reply-To: <cover.1529004286.git.rgb@redhat.com>
In-Reply-To: <cover.1529004286.git.rgb@redhat.com>
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>
---
kernel/audit_tree.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 67e6956..5e9d1e5 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;
--
1.8.3.1
next prev parent reply other threads:[~2018-06-14 20:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 20:20 [PATCH ghak59 V1 0/2] tree and watch rule log cleanups Richard Guy Briggs
2018-06-14 20:20 ` Richard Guy Briggs [this message]
2018-06-28 15:43 ` [PATCH ghak59 V1 1/2] audit: tree: check audit_enabled Paul Moore
2018-06-14 20:20 ` [PATCH ghak59 V1 2/2] audit: watch: simplify audit_enabled check Richard Guy Briggs
2018-06-28 15:47 ` Paul Moore
2018-07-13 15:39 ` Richard Guy Briggs
2018-06-14 21:01 ` [PATCH ghak59 V1 0/2] tree and watch rule log cleanups Richard Guy Briggs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85aa05b35501e7cf40feccbffe3a33b66a622ea1.1529004286.git.rgb@redhat.com \
--to=rgb@redhat.com \
--cc=eparis@parisplace.org \
--cc=linux-audit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox