summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-01-06 16:35:44 +0100
committerMichael Adam <obnox@samba.org>2010-01-07 16:51:18 +0100
commit46111dc4e437f9cd4df1dbf2ecfe6a56eaf1ae39 (patch)
treea478630eaf6edc0d52eb03aecc5016344035937a /source3
parent017ccd0bda31059f7093f41d1537edd7b5430968 (diff)
downloadsamba-46111dc4e437f9cd4df1dbf2ecfe6a56eaf1ae39.tar.gz
samba-46111dc4e437f9cd4df1dbf2ecfe6a56eaf1ae39.tar.bz2
samba-46111dc4e437f9cd4df1dbf2ecfe6a56eaf1ae39.zip
s3:auth:check_sam_security: introduce a bool var to control pad_pw_count incrementation
This is a preparatory patch for the last part in fixing bug #4347 . Michael
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_sam.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index e7b9f2b019..4c3f552ee6 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -354,10 +354,16 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
update_login_attempts_status = pdb_update_login_attempts(sampass, NT_STATUS_IS_OK(nt_status));
if (!NT_STATUS_IS_OK(nt_status)) {
+ bool increment_bad_pw_count = false;
+
if (NT_STATUS_EQUAL(nt_status,NT_STATUS_WRONG_PASSWORD) &&
acct_ctrl & ACB_NORMAL &&
NT_STATUS_IS_OK(update_login_attempts_status))
- {
+ {
+ increment_bad_pw_count = true;
+ }
+
+ if (increment_bad_pw_count) {
pdb_increment_bad_password_count(sampass);
updated_badpw = True;
} else {