bugzilla-daemon at bugzilla.mindrot.org
2019-Jul-05 16:04 UTC
[Bug 3031] New: Inconsistent PID-values in wtmp file, for root sessions.
https://bugzilla.mindrot.org/show_bug.cgi?id=3031 Bug ID: 3031 Summary: Inconsistent PID-values in wtmp file, for root sessions. Product: Portable OpenSSH Version: 8.0p1 Hardware: Other OS: AIX Status: NEW Severity: minor Priority: P5 Component: sshd Assignee: unassigned-bugs at mindrot.org Reporter: lzsiga at freemail.c3.hu Inconsistent PID-values in wtmp file, for root sessions. In case of root-sessions (unlike normal-user-sessions), functions login(3) and logout(3)+logwtmp(3) are called by different processes. (These three functions come from library 'libutil'.) Both login(3) and logwtmp(3) call getpid(2) to get the PID of the current process to store into file 'wtmp' (field 'ut_pid' in struct 'utmp'). Command last(1), at least on Linux, doesn't seem to care, it still finds the matching login-logout pairs, based on field 'ut_line'. On the other hand, last(1) on AIX doesn't work this way: it doesn't recognise the pairs, so according to it root-sessions are never closed, they are "still logged on" for good. The only work-around I could come up with is configure-option '-disable-libutil'. I hope you could find a way to make these values match (ie calling login(3) and logout(3)+logwtmp(3) from the same process). Thank you for your attention. Regards: Lorinczy Zsigmond -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2019-Jul-05 16:06 UTC
[Bug 3031] Inconsistent PID-values in wtmp file, for root sessions.
https://bugzilla.mindrot.org/show_bug.cgi?id=3031 L?rinczy Zsigmond <lzsiga at freemail.c3.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lzsiga at freemail.c3.hu -- You are receiving this mail because: You are watching the assignee of the bug.