[2/3] nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402)
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
Commit Message
Although the nscd module is built with 64 bit time_t, the routines
linked direct to libc.so need to use the internal symbols.
---
nscd/nscd.h | 2 +-
nscd/nscd_gethst_r.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Comments
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> writes:
> - time_t mtime;
> + __time64_t mtime;
Wait... does this mean that the format of the nscd cache changed at some
point and we didn't flag it as an externally visible ABI change?
On 26/10/22 18:42, DJ Delorie wrote:
> Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> writes:
>> - time_t mtime;
>> + __time64_t mtime;
>
> Wait... does this mean that the format of the nscd cache changed at some
> point and we didn't flag it as an externally visible ABI change?
>
It seems so, not sure how to handle it. We will need to eventually do it
anyway (we have a similar issue with the utmp, wtmp).
On Okt 26 2022, DJ Delorie via Libc-alpha wrote:
> Wait... does this mean that the format of the nscd cache changed at some
> point and we didn't flag it as an externally visible ABI change?
nscd_time_t has always been a 64-bit type.
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> writes:
> Although the nscd module is built with 64 bit time_t, the routines
> linked direct to libc.so need to use the internal symbols.
LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>
@@ -65,7 +65,7 @@ typedef enum
struct traced_file
{
/* Tracks the last modified time of the traced file. */
- time_t mtime;
+ __time64_t mtime;
/* Support multiple registered files per database. */
struct traced_file *next;
int call_res_init;
@@ -112,7 +112,7 @@ __nscd_get_nl_timestamp (void)
if (map == NULL
|| (map != NO_MAPPING
&& map->head->nscd_certainly_running == 0
- && map->head->timestamp + MAPPING_TIMEOUT < time_now ()))
+ && map->head->timestamp + MAPPING_TIMEOUT < time64_now ()))
map = __nscd_get_mapping (GETFDHST, "hosts", &__hst_map_handle.mapped);
if (map == NO_MAPPING)