3.13-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gao feng <[email protected]>

commit c2412d91c68426e22add16550f97ae5cd988a159 upstream.

If audit is disabled, we shouldn't generate loginuid audit
log.

Acked-by: Eric Paris <[email protected]>
Signed-off-by: Gao feng <[email protected]>
Signed-off-by: Richard Guy Briggs <[email protected]>
Signed-off-by: Eric Paris <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to