]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
passdb: Fixing CID 1508970 for time_t in DEBUG statement
authorRabinarayan Panigrahi <rapanigr@redhat.com>
Thu, 4 Sep 2025 12:57:00 +0000 (18:27 +0530)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 10 Sep 2025 09:38:30 +0000 (09:38 +0000)
Fix: typecast changing from (unsigned int)entry->bad_password_time  to
(intmax_t)entry->bad_password_time 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/passdb/login_cache.c

index 6b636b3c8b7fdbf9b88b7f090489117f3f379520..e4f23f0cabacf1b5b8101730e77a6db7dfb92c64 100644 (file)
@@ -116,9 +116,9 @@ bool login_cache_read(struct samu *sampass, struct login_cache *entry)
 
        SAFE_FREE(databuf.dptr);
 
-       DEBUG(5, ("Found login cache entry: timestamp %12u, flags 0x%x, count %d, time %12u\n",
+       DEBUG(5, ("Found login cache entry: timestamp %12u, flags 0x%x, count %d, time %12jd\n",
                  (unsigned int)entry->entry_timestamp, entry->acct_ctrl, 
-                 entry->bad_password_count, (unsigned int)entry->bad_password_time));
+                 entry->bad_password_count, (intmax_t)entry->bad_password_time));
        return true;
 }