From: Rabinarayan Panigrahi Date: Thu, 4 Sep 2025 12:43:31 +0000 (+0530) Subject: winbindd: Fixing CID 1508950 for time_t in DEBUG statement X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16cd2f337218eea2d11fb3c0b3155eeea910bcf9;p=thirdparty%2Fsamba.git winbindd: Fixing CID 1508950 for time_t in DEBUG statement Fix: typecast changing from (uint32_t)domain->last_seq_check to (intmax_t)domain->last_seq_check as intmax_t can hold epoch seconds after 2038 year Signed-off-by: Rabinarayan Panigrahi Reviewed-by: Signed-off-by: Martin Schwenke Reviewed-by: Andreas Schneider --- diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index c1b56a5bfe4..65a5ae17596 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -492,15 +492,15 @@ static NTSTATUS fetch_cache_seqnum( struct winbindd_domain *domain, time_t now ) time_diff = now - domain->last_seq_check; if ((int)time_diff > lp_winbind_cache_time()) { - DBG_DEBUG("fetch_cache_seqnum: timeout [%s][%u @ %u]\n", + DBG_DEBUG("fetch_cache_seqnum: timeout [%s][%u @ %jd]\n", domain->name, domain->sequence_number, - (uint32_t)domain->last_seq_check); + (intmax_t)domain->last_seq_check); return NT_STATUS_UNSUCCESSFUL; } - DBG_DEBUG("fetch_cache_seqnum: success [%s][%u @ %u]\n", + DBG_DEBUG("fetch_cache_seqnum: success [%s][%u @ %jd]\n", domain->name, domain->sequence_number, - (uint32_t)domain->last_seq_check); + (intmax_t)domain->last_seq_check); return NT_STATUS_OK; }