bug-gnulib
[Top][All Lists]
Advanced

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

Re: readutmp backlog


From: Thorsten Kukuk
Subject: Re: readutmp backlog
Date: Sun, 10 Sep 2023 17:27:26 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

On Sat, Sep 09, Bruno Haible wrote:

> [CCing Sven and Thorsten; the thread starts here:
> https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00064.html ]
> 
> Paul Eggert wrote:
> > On 2023-09-09 04:13, Bruno Haible wrote:
> > 
> > >    What's the right replacement?
> > >    - wtmpdb ? [3]
> > >    - journalctl --list-boots ? [4][5]
> > >    - last ? [4]
> > 
> > This depends on what platforms using systemd will do (if anything) about 
> > the information currently stored in /var/log/wtmp on GNU/Linux.
> > 
> > As I understand it, systemd currently has no support for wtmp after 
> > 2038, with the idea being that wtmp will go away by then. I also 
> > understand that 'last' simply does what GNU 'who' does, so it'll stop 
> > working too.

Yes, systemd as currently no support for wtmp, except writing the boot
time record if enabled.
And unlike utmp, I don't see any advantage of teaching systemd wtmp
support. There is nothing to "manage", it's just a database with
entries. Since I will be speaking at All Systems Go! the next days I
will hear around what others think, but I doubt that anybody of the
systemd developers will be in favor of implementing wtmp support.

> > As near as I can tell, journalctl isn't really a substitute for 
> > /var/log/wtmp; for that, wtmpdb seems to be the only viable approach 
> > that's implemented.

My first idea was to use journalctl for this, and write a PAM module
which creates appropriate entries. But there are too many problems, like
e.g. the journald database is rotated partly too quick on some systems,
and on others like Raspberry Pi it's far too slow.

wtmpdb was the best I could think about, and it's compatible to last
with a compat symlink (some few last features are missing, but WiP).

> > For what it's worth, Debian is looking into possibly adopting wtmpdb; 
> > see <https://bugs.debian.org/1043507>. So if we need advice about what 
> > Gnulib should do, Sven and Thorsten look like they'd be good people to ask.

openSUSE switched to wtmpdb meanwhile, and only one person noticed until
now, because I haven't implemented all last features yet.
But we still have /var/log/wtmp, because we glibc still implements the
functions and we don't want to patch all applications writing wtmp
entries.
ALP, our next code base for our enterprise products, made the switch
already, too.

So from my view, I currently don't see something better than wtmpdb and
I don't see anybody working on a different solution. 

  Thorsten

-- 
Thorsten Kukuk, Distinguished Engineer, Senior Architect, Future Technologies
SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nuernberg, 
Germany
Managing Director: Ivo Totev, Andrew McDonald, Werner Knoblich
(HRB 36809, AG Nürnberg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]