Re: bug#64937: session leaders pids

2023-08-02 Thread Bruno Haible
Thorsten Kukuk wrote: > > * The pids now refer to the session leader, which is a parent (or ancestor) > > of the process which has allocated the pty. > > Depends on your application. For the majority of applications, which we > evaluated, the PIDs reported by logind were identical to the PID fro

Re: bug#64937: ssh sessions in systemd

2023-08-02 Thread Bruno Haible
Thorsten Kukuk wrote: > And systemd/logind has a hack to delete this dummy entry, so that a > fallback hack becomes active, which tries to determine the tty in > another way. But this "hack" exists only for the dbus interface, not for > libsystemd... I see some hack in systemd/src/basic/terminal-u

Re: bug#64937: ssh sessions in systemd

2023-08-02 Thread Thorsten Kukuk
On Wed, Aug 02, Bruno Haible wrote: > Thorsten Kukuk wrote: > > openssh is really special: it does not need a TTY for all kind of ssh > > sessions, and thus only opens a TTY if needed after creating the > > logind session. Thus the logind session does not contain the TTY > > informations. > > sy

readutmp: In systemd mode, put the X11 display into the ut_host field

2023-08-02 Thread Bruno Haible
Classical read_utmp returns an X11 session's display as ut_host. The systemd based implementation should do the same. 2023-08-02 Bruno Haible readutmp: In systemd mode, put the X11 display into the ut_host field. * lib/readutmp.c (read_utmp): In sessions of type "x11", use the

Re: bug#64937: ssh sessions in systemd

2023-08-02 Thread Bruno Haible
Thorsten Kukuk wrote: > > The only problem with this mapping is for the ut_line row, which > > used to contain, for inbound ssh, the pty device name. It is not easy > > to find the pty name in this situation; at least, none of the systemd > > APIs and /run/systemd/** files that I looked at helped.

Re: bug#64937: "who" reports funny dates

2023-08-02 Thread Bruno Haible
I wrote: > The proposed patch is attached. Oops, I missed a sizeof of the ut_id field. A corrected patch is attached. >From 97be578b107e7b87e32e0c3c2d49dc550489415b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 2 Aug 2023 01:32:55 +0200 Subject: [PATCH] maint: Update after gnulib module