Commit 2f2ad101 authored by Richard Guy Briggs's avatar Richard Guy Briggs Committed by Eric Paris

audit: restore order of tty and ses fields in log output

When being refactored from audit_log_start() to audit_log_task_info(), in
commit e23eb920 the tty and ses fields in the log output got transposed.
Restore to original order to avoid breaking search tools.
Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent f9441639
...@@ -1716,7 +1716,7 @@ void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk) ...@@ -1716,7 +1716,7 @@ void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk)
audit_log_format(ab, audit_log_format(ab,
" ppid=%ld pid=%d auid=%u uid=%u gid=%u" " ppid=%ld pid=%d auid=%u uid=%u gid=%u"
" euid=%u suid=%u fsuid=%u" " euid=%u suid=%u fsuid=%u"
" egid=%u sgid=%u fsgid=%u ses=%u tty=%s", " egid=%u sgid=%u fsgid=%u tty=%s ses=%u",
sys_getppid(), sys_getppid(),
tsk->pid, tsk->pid,
from_kuid(&init_user_ns, audit_get_loginuid(tsk)), from_kuid(&init_user_ns, audit_get_loginuid(tsk)),
...@@ -1728,7 +1728,7 @@ void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk) ...@@ -1728,7 +1728,7 @@ void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk)
from_kgid(&init_user_ns, cred->egid), from_kgid(&init_user_ns, cred->egid),
from_kgid(&init_user_ns, cred->sgid), from_kgid(&init_user_ns, cred->sgid),
from_kgid(&init_user_ns, cred->fsgid), from_kgid(&init_user_ns, cred->fsgid),
audit_get_sessionid(tsk), tty); tty, audit_get_sessionid(tsk));
get_task_comm(name, tsk); get_task_comm(name, tsk);
audit_log_format(ab, " comm="); audit_log_format(ab, " comm=");
......
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