Re: readutmp should check for sd_booted() and not if /run/utmp exists

2023-09-15 Thread Bruno Haible
Thorsten Kukuk wrote: > Who creates an additional line for "seat0", which no other tools creates > and which it did not create before. Since some display manager writes > wrongly multiple utmp entries To me, that's a feature, not a bug. Systemd has introduced the concept of seats [1], and the conc

Re: readutmp should check for sd_booted() and not if /run/utmp exists

2023-09-15 Thread Thorsten Kukuk
Sorry, looks like strace confused me (since this checks the existence of /run/utmp) and the problem is a different one. kukuk@rubicon:~> ls /run/utmp ls: cannot access '/run/utmp': No such file or directory kukuk@rubicon:~> w 14:54:41 up 4 days, 4:51, 2 users, load average: 0,11, 0,13, 0,46

Re: readutmp should check for sd_booted() and not if /run/utmp exists

2023-09-15 Thread Bruno Haible
[CCing bug-gnulib, because the readutmp code lives in gnulib] Thorsten Kukuk wrote: > if there is no /run/utmp file, /usr/bin/who falls back correctly to the > systemd-logind interface and shows correct data. > > But there are applications, which don't use the libc interface for > reading/writing