bug-coreutils
[Top][All Lists]
Advanced

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

bug#64937: "who" reports funny dates


From: Paul Eggert
Subject: bug#64937: "who" reports funny dates
Date: Mon, 31 Jul 2023 00:15:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 2023-07-31 00:08, Thorsten Kukuk wrote:
1. you need to extend ut_tv from 32bit time_t to 64bit time_t, or your
patch will not survive 2038.

Yes, that's the plan. Gnulib's readutmp module already does this, in apps that also use the year2038 or year2038-recommended modules (which most do).

2. the string entries are size limited in struct utmp, but are not with
libsystemd. So could be that you need to truncate device names, user
names and host names.

This suggests that Gnulib needs to redo the readutmp API so that it's not tied to struct utmpx's fixed string lengths. That's a bit of a hassle but should be doable (change char array to char *). An advantage is that Gnulib is a source-code library and so we can make binary- (and even source-) incompatible changes to the API without too much trouble.

Thanks for the advice.





reply via email to

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