openssh-portable icon indicating copy to clipboard operation
openssh-portable copied to clipboard

Add wtmpdb support as Y2038 safe wtmp replacement

Open thkukuk opened this issue 2 years ago • 1 comments

wtmp support as implemented in glibc is not Y2038 safe and glibc developers don't plan to fix that (see https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/ and https://www.thkukuk.de/blog/Y2038_glibc_wtmp_64bit/)

This patch adds support for wtmpdb, a Y2038 safe alternative to wtmp. For most applications the PAM module is working fine and good enough, but since sshd does not know the TTY yet when calling PAM, native support for wtmpdb is necessary to include the TTY in the data, too.

thkukuk avatar May 31 '23 12:05 thkukuk

Aren't systems moving to 32-bit time_t? That would (backwards-incompatibly) change the wtmp format too, right?

djmdjm avatar Oct 18 '24 05:10 djmdjm

Aren't systems moving to 32-bit time_t? That would (backwards-incompatibly) change the wtmp format too, right?

Nobody will move to 32bit time_t. And wtmpdb is the solution to move to 64bit time_t as everybody is doing today. And yes, switching to 64bit time_t does break current wtmp API and on disk data, that's why wtmpdb got introduced, so solve that and many more problems of wtmp.

thkukuk avatar Oct 24 '24 06:10 thkukuk

Sorry, somehow I messed this up, there is a new PR #540

thkukuk avatar Nov 19 '24 09:11 thkukuk