Y2038, glibc and utmp/utmpx on 64bit architectures
Thorsten Kukuk <[email protected]> Fri, 3 Mar 2023 11:46:47 +0100
| Newsgroups | dev.linux.lists.distributions |
|---|---|
| Message-ID | <[email protected]> |
Hi, I hope everybody is aware of the Y2038 problem. And not only for 32bit architectures, but also 64bit architectures are not ready today, at least not if they use glibc. glibc uses for compatibility with 32bit userland applications 32bit values for time_t and other variables even on 64bit systems. Affected is everything around utmp/utmpx, wtmp/wtmpx and lastlog. I wrote a blog about how to solve that for utmp/utmpx by using the data from systemd-logind instead: https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/ A detailed analysis also for wtmp and lastlog, which have the same problems, can be found here: https://github.com/thkukuk/utmpx/blob/main/Y2038.md 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 Myers, Andrew McDonald, Martje Boudien Moerman (HRB 36809, AG Nürnberg)