diff options
author | Jim McDonough <jmcd@samba.org> | 2004-02-20 16:00:42 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2004-02-20 16:00:42 +0000 |
commit | db3d07c2f5c0764bbf55c0a11a85ae2e52dc481f (patch) | |
tree | 68d8de8aca0c3f8e31164febf4132a05b9c9985d /source3/passdb | |
parent | 7f18e0d5bad573983476e542c8a339970625578f (diff) | |
download | samba-db3d07c2f5c0764bbf55c0a11a85ae2e52dc481f.tar.gz samba-db3d07c2f5c0764bbf55c0a11a85ae2e52dc481f.tar.bz2 samba-db3d07c2f5c0764bbf55c0a11a85ae2e52dc481f.zip |
handle both 0 and -1 as disabling
reset count and lockout duration
(This used to be commit ad2996e418a45c1cf4f969077ffc267de70d6866)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 1f1b5bdae6..7c9376e045 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -2223,8 +2223,8 @@ BOOL pdb_update_bad_password_count(SAM_ACCOUNT *sampass, BOOL *updated) } /* First, check if there is a reset time to compare */ - if (!resettime) { - DEBUG(9, ("Reset time = 0, can't reset bad pw count\n")); + if ((resettime == (uint32) -1) || (resettime == 0)) { + DEBUG(9, ("No reset time, can't reset bad pw count\n")); return True; } @@ -2262,8 +2262,8 @@ BOOL pdb_update_autolock_flag(SAM_ACCOUNT *sampass, BOOL *updated) } /* First, check if there is a duration to compare */ - if (!duration) { - DEBUG(9, ("Lockout duration = 0, can't reset autolock\n")); + if ((duration == (uint32) -1) || (duration == 0)) { + DEBUG(9, ("No reset duration, can't reset autolock\n")); return True; } |