mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
passdb: Fix Coverity ID 1509016 Use of 32-bit time_t
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
3001df6989
commit
370f1d932e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user