distributions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* wtmpdb as Y2038 safe wtmp replacement
@ 2023-04-12 13:45 Thorsten Kukuk
  0 siblings, 0 replies; only message in thread
From: Thorsten Kukuk @ 2023-04-12 13:45 UTC (permalink / raw)
  To: distributions


as already written, there are several Y2038 problems with glibc even on
some 64bit architectures

There is now also an alternative to wtmp:

In short, wtmpdb consist of a library, which provides a generic API
to store login and logout times of an user. In contrast to wtmp, the
logout time will not get an own entry, but the logout time is added to
the existing login entry.
Additional, there is a tool "wtmpdb" to replace "last" ("wtmpdb last"
tries to be compatible with "last" for the most options), which is also
able to create the boot and shutdown entries.

pam_wtmpdb collects the login and logout times, so there is no need
anymore for applications to bother about creating correct wtmp entries.
Since there is no standard or something similar for this, currently it's
a mess what applications are doing: some write up to three wtmp entries
for the same user at login time, others use the generic /dev/console as TTY. 
This leads to the problem that last, who combines login/logout entries
by comparing the user and TTY, is no longer able to correctly match the
login and logout records and prints out wrong informations.

If an application does not know the TTY during authentication (like
openssh), there is still libwtmpdb to create the entries.


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-12 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 13:45 wtmpdb as Y2038 safe wtmp replacement Thorsten Kukuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).