Re: file-has-acl: Avoid gcc warning

2023-09-15 Thread Bruno Haible
I wrote: > The only user of this MIN macro is file-has-acl.c, and it already includes > "minmax.h". This was incorrect. Leading to a compilation error on Solaris 11 with gcc: ../../../gettext-tools/gnulib-lib/set-permissions.c: In function ‘set_acls_from_mode’: ../../../gettext-tools/gnulib-lib/

Re: who/uptime segfaults if DISPLAY=:0 is missing in logind session

2023-09-15 Thread Bruno Haible
Thorsten Kukuk wrote: > Create a file with the content I did add to the report in > /run/systemd/session and call who. Oh, I see. That's indeed a nice trick to force libsystemd to return specific values. Thanks. With this I reproduce it (on an arbitrary machine with systemd ≥ 254, with libsystemd

Re: who/uptime segfaults if DISPLAY=:0 is missing in logind session

2023-09-15 Thread Thorsten Kukuk
On Fri, Sep 15, Thorsten Kukuk wrote: > On Fri, Sep 15, Bruno Haible wrote: > > > Thorsten Kukuk wrote: > > > With gdm there are reports that who/uptime seg.fault. > > > > Please make it easy to reproduce for me. I had tested 6 different init > > systems [1] and 10 different desktop environments

Re: who/uptime segfaults if DISPLAY=:0 is missing in logind session

2023-09-15 Thread Thorsten Kukuk
On Fri, Sep 15, Bruno Haible wrote: > Thorsten Kukuk wrote: > > With gdm there are reports that who/uptime seg.fault. > > Please make it easy to reproduce for me. I had tested 6 different init > systems [1] and 10 different desktop environments. That's why I added the session file to the report:

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: who/uptime segfaults if DISPLAY=:0 is missing in logind session

2023-09-15 Thread Bruno Haible
Thorsten Kukuk wrote: > With gdm there are reports that who/uptime seg.fault. Please make it easy to reproduce for me. I had tested 6 different init systems [1] and 10 different desktop environments. Therefore, please, what is the distro, the distro version, and the desktop environment choice? B

who/uptime segfaults if DISPLAY=:0 is missing in logind session

2023-09-15 Thread Thorsten Kukuk
With gdm there are reports that who/uptime seg.fault. If I compare the /run/systemd/session/ file of gdm with one of sddm, the gdm file has no "DISPLAY=:0" line. The session file which leads to a seg.fault looks like: # This is private data. Do not parse. UID=1000 USER=user0 ACTIVE=1 IS_DISPLAY

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