Commit ddfad8af authored by Eric Paris's avatar Eric Paris

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: default avatarSteve Grubb <sgrubb@redhat.com>
Acked-by: default avatarJames Morris <jmorris@redhat.com>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarAristeu Rozanski <arozansk@redhat.com>
Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
parent aa589a13
...@@ -2050,12 +2050,10 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid, ...@@ -2050,12 +2050,10 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid,
ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_LOGIN); ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_LOGIN);
if (!ab) if (!ab)
return; return;
audit_log_format(ab, "pid=%d uid=%u" audit_log_format(ab, "pid=%d uid=%u", task_pid_nr(current), uid);
" old-auid=%u auid=%u old-ses=%u ses=%u" audit_log_task_context(ab);
" res=%d", audit_log_format(ab, " old-auid=%u auid=%u old-ses=%u ses=%u res=%d",
task_pid_nr(current), uid, oldloginuid, loginuid, oldsessionid, sessionid, !rc);
oldloginuid, loginuid, oldsessionid, sessionid,
!rc);
audit_log_end(ab); audit_log_end(ab);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment