[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64937: "who" reports funny dates
From: |
Bruno Haible |
Subject: |
bug#64937: "who" reports funny dates |
Date: |
Fri, 04 Aug 2023 15:44:55 +0200 |
Paul Eggert wrote:
> Thanks for doing all that work. I looked into it, and found a problem: a
> command like "who /var/log/wtmp" stops working because the systemd
> emulation of read_utmp only supports plain "who" (roughly equivalent to
> "who /var/run/utmp" on Fedora).
Probably the FILE argument to 'who' and to 'users' should be deprecated?
Since in systemd mode, the only supported value for FILE is /var/run/utmp.
> Although I toyed with the idea of simplifying readutmp.h
> further, by moving most of it into readutmp.c and having just struct
> gl_utmp public (this would simplify coreutils quite a bit), I ran out of
> time and patience and decided to ship what I had.
Yes, I see how much contortions (strncpy etc.) these not-NUL-terminated
strings cause. And two separate code paths, one for the systemd mode and
one for all other platforms, is not ideal from the code coverage/testing/QA
perspective either.
I didn't tackle this, because before the add_utmp function existed, it
would have caused many extra malloc() calls on all platforms.
Bruno
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/01
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/01
- Message not available
- bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/04
- bug#64937: "who" reports funny dates, Paul Eggert, 2023/08/06
- bug#64937: "who" reports funny dates, Paul Eggert, 2023/08/06
- Message not available
- bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/06
- bug#64937: "who" reports funny dates, Paul Eggert, 2023/08/06
- Message not available
- bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/06
- bug#64937: "who" reports funny dates, Paul Eggert, 2023/08/06
- bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/07
- bug#64937: "who" reports funny dates, Paul Eggert, 2023/08/07