[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#932384: libc6: utmp broken



Package: libc6
Version: 2.28-10
Severity: important

After hitting #932380 I looked at the source code of GNU screen,
saw it uses the getutline(3) function, and compiled the example
from its manpage.

The output is not what I expected:

tglase@tglase:~ $ ./a.out
before adding entry:
tglase   :0           2019-07-18 16:07
after adding entry:
tglase   :0           2019-07-18 16:07
after removing entry:
tglase   :0           2019-07-18 16:07

This is the same, no matter whether I’m in GNU screen in xterm,
or just in xterm, or even on the Linux text console:

tglase@tglase:~ $ ./a.out
before adding entry:
tglase   tty2         2019-07-18 17:25
tglase   :0           2019-07-18 16:07
after adding entry:
tglase   tty2         2019-07-18 17:25
tglase   :0           2019-07-18 16:07
after removing entry:
tglase   tty2         2019-07-18 17:25
tglase   :0           2019-07-18 16:07

utmp entries cannot be added (and the GNU screen source code contains
curse^Wcomplaints about the GNU API for utmp lacking the ability to
return success/error information, so the applications cannot even de‐
tect this!), while the file is set up correctly:

tglase@tglase:~ $ ll /var/run/utmp
-rw-r--r-- 1 root utmp 4608 Jul 18 17:26 /var/run/utmp
tglase@tglase:~ $ w | cat
 17:27:33 up  1:21,  1 user,  load average: 1.35, 1.68, 2.12
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
tglase   :0       -                16:07   ?xdm?  14:24   0.03s /usr/bin/ck-launch-session /usr/bin/monkeysphere-validation-agent /bin/mksh /usr/share/tarent/autokde.d/loadenv.sh icewm-session


-- System Information:
Debian Release: bullseye/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable'), (100, 'experimental')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)

Reply to: