]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
passdb: Fix Coverity ID 1509016 Use of 32-bit time_t
authorVolker Lendecke <vl@samba.org>
Thu, 21 Nov 2024 17:17:53 +0000 (18:17 +0100)
committerMartin Schwenke <martins@samba.org>
Mon, 2 Dec 2024 04:53:33 +0000 (04:53 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
source3/passdb/passdb.c

index f0ce8b2352dc8ca4db99c6a37612946745e0c851..229e1637d7b381b255b1052ae0c3fdb23f1d6aff 100644 (file)
@@ -2178,8 +2178,11 @@ bool pdb_update_bad_password_count(struct samu *sampass, bool *updated)
        }
 
        LastBadPassword = pdb_get_bad_password_time(sampass);
-       DEBUG(7, ("LastBadPassword=%d, resettime=%d, current time=%d.\n",
-                  (uint32_t) LastBadPassword, resettime, (uint32_t)time(NULL)));
+       DBG_INFO("LastBadPassword=%" PRIu64 ", resettime=%d, "
+                "current time=%" PRIu64 ".\n",
+                (uint64_t)LastBadPassword,
+                resettime,
+                (uint64_t)time(NULL));
        if (time(NULL) > (LastBadPassword + convert_uint32_t_to_time_t(resettime)*60)){
                pdb_set_bad_password_count(sampass, 0, PDB_CHANGED);
                pdb_set_bad_password_time(sampass, 0, PDB_CHANGED);