[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140321000441.808617210@linuxfoundation.org>
Date: Thu, 20 Mar 2014 17:05:03 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Eric Paris <eparis@...hat.com>,
Gao feng <gaofeng@...fujitsu.com>,
Richard Guy Briggs <rgb@...hat.com>
Subject: [PATCH 3.13 140/149] audit: dont generate loginuid log when audit disabled
3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao feng <gaofeng@...fujitsu.com>
commit c2412d91c68426e22add16550f97ae5cd988a159 upstream.
If audit is disabled, we shouldn't generate loginuid audit
log.
Acked-by: Eric Paris <eparis@...hat.com>
Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
Signed-off-by: Richard Guy Briggs <rgb@...hat.com>
Signed-off-by: Eric Paris <eparis@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/auditsc.c | 3 +++
1 file changed, 3 insertions(+)
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1971,6 +1971,9 @@ static void audit_log_set_loginuid(kuid_
struct audit_buffer *ab;
uid_t uid, ologinuid, nloginuid;
+ if (!audit_enabled)
+ return;
+
uid = from_kuid(&init_user_ns, task_uid(current));
ologinuid = from_kuid(&init_user_ns, koldloginuid);
nloginuid = from_kuid(&init_user_ns, kloginuid),
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists