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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to