[PATCH] auth: fix lockOutObservationWindow check

Arvid Requate requate at univention.de
Wed Feb 19 06:22:49 MST 2014


lockOutObservationWindow is a negative number

Signed-off-by: Arvid Requate <requate at univention.de>
---
 source4/dsdb/common/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 188f3c2..fd3a45a 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -4704,7 +4704,7 @@ NTSTATUS dsdb_update_bad_pwd_count(TALLOC_CTX *mem_ctx,
 	}
 	(*mod_msg)->dn = user_msg->dn;
 
-	if (now - badPasswordTime < lockOutObservationWindow) {
+	if (badPasswordTime - lockOutObservationWindow >= now) {
 		badPwdCount = ldb_msg_find_attr_as_int(user_msg, "badPwdCount", 0);
 	} else {
 		badPwdCount = 0;
-- 
1.8.5.3



More information about the samba-technical mailing list