[Bug 3909] New: As of 10.0, the utmpx file list the daemon pid and not the shell pid

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue Jan 13 21:28:15 AEDT 2026


https://bugzilla.mindrot.org/show_bug.cgi?id=3909

            Bug ID: 3909
           Summary: As of 10.0, the utmpx file list the daemon pid and not
                    the shell pid
           Product: Portable OpenSSH
           Version: 10.0p2
          Hardware: Other
                OS: Solaris
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: sshd
          Assignee: unassigned-bugs at mindrot.org
          Reporter: chsdik at gmail.com

When the w(1) commands lists the current process of terminals, it uses
the pid from utmpx; unfortunately, it now contains the pid of the
sshd-sesssion process.  This works kinda, but only we use a
ControlMaster and multiple utmpx slots use the same pid, confusing the
w(1) output.

I'm currently adding workaround to the Solaris w(1) processs and did
not see an easy way to do this in OpenSSH; while an non-privileged user
can run "pututxline()" on Solaris I am not sure this is true for other
OSes.

pututxline() would need to be called just before we execute the shell
or at least, after we have forked the process so we know the pid.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list