]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbindd: Fixing CID 1508950 for time_t in DEBUG statement
authorRabinarayan Panigrahi <rapanigr@redhat.com>
Thu, 4 Sep 2025 12:43:31 +0000 (18:13 +0530)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 10 Sep 2025 09:38:30 +0000 (09:38 +0000)
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 <rapanigr@redhat.com>
Reviewed-by: Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_cache.c

index c1b56a5bfe462f0c37089a518d96badc9d3d9057..65a5ae17596b4476750df9c9b908e268cbf1a16f 100644 (file)
@@ -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;
 }