aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/tty_audit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index f64582b0f623..7c5866920622 100644
--- a/drivers/tty/tty_audit.c
+++ b/drivers/tty/tty_audit.c
@@ -95,8 +95,10 @@ static void tty_audit_buf_push(struct task_struct *tsk, uid_t loginuid,
95{ 95{
96 if (buf->valid == 0) 96 if (buf->valid == 0)
97 return; 97 return;
98 if (audit_enabled == 0) 98 if (audit_enabled == 0) {
99 buf->valid = 0;
99 return; 100 return;
101 }
100 tty_audit_log("tty", tsk, loginuid, sessionid, buf->major, buf->minor, 102 tty_audit_log("tty", tsk, loginuid, sessionid, buf->major, buf->minor,
101 buf->data, buf->valid); 103 buf->data, buf->valid);
102 buf->valid = 0; 104 buf->valid = 0;