From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gao feng Subject: [PATCH 2/3] audit: don't generate audit feature changed log when audit disabled Date: Thu, 31 Oct 2013 16:27:57 +0800 Message-ID: <1383208078-22117-2-git-send-email-gaofeng@cn.fujitsu.com> References: <1383208078-22117-1-git-send-email-gaofeng@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383208078-22117-1-git-send-email-gaofeng@cn.fujitsu.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com Cc: rgb@redhat.com List-Id: linux-audit@redhat.com Signed-off-by: Gao feng --- kernel/audit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/audit.c b/kernel/audit.c index f16f835..c307786 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -663,6 +663,9 @@ static void audit_log_feature_change(int which, u32 old_feature, u32 new_feature { struct audit_buffer *ab; + if (audit_enabled == AUDIT_OFF) + return; + ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_FEATURE_CHANGE); audit_log_format(ab, "feature=%s old=%d new=%d old_lock=%d new_lock=%d res=%d", audit_feature_names[which], !!old_feature, !!new_feature, -- 1.8.3.1