diff options
author | Eric Paris <eparis@redhat.com> | 2011-01-19 19:22:35 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-03-20 10:11:57 -0400 |
commit | ddfad8affdb73cc8df5890fef16d98d63ff3a6f0 (patch) | |
tree | 431c17cab11811bdc746733210c9700ad0b6316c | |
parent | aa589a13b5d00d3c643ee4114d8cbc3addb4e99f (diff) |
audit: include subject in login records
The login uid change record does not include the selinux context of the
task logging in. Add that information.
(Updated from 2011-01: RHBZ:670328 -- RGB)
Reported-by: Steve Grubb <sgrubb@redhat.com>
Acked-by: James Morris <jmorris@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
-rw-r--r-- | kernel/auditsc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 61ac3cf53f1d..bd3de52600ff 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -2050,12 +2050,10 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid, | |||
2050 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_LOGIN); | 2050 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_LOGIN); |
2051 | if (!ab) | 2051 | if (!ab) |
2052 | return; | 2052 | return; |
2053 | audit_log_format(ab, "pid=%d uid=%u" | 2053 | audit_log_format(ab, "pid=%d uid=%u", task_pid_nr(current), uid); |
2054 | " old-auid=%u auid=%u old-ses=%u ses=%u" | 2054 | audit_log_task_context(ab); |
2055 | " res=%d", | 2055 | audit_log_format(ab, " old-auid=%u auid=%u old-ses=%u ses=%u res=%d", |
2056 | task_pid_nr(current), uid, | 2056 | oldloginuid, loginuid, oldsessionid, sessionid, !rc); |
2057 | oldloginuid, loginuid, oldsessionid, sessionid, | ||
2058 | !rc); | ||
2059 | audit_log_end(ab); | 2057 | audit_log_end(ab); |
2060 | } | 2058 | } |
2061 | 2059 | ||