summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-05-12 13:29:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:57 -0500
commitfc5f948260477e4c43e844be1abb09056174d69e (patch)
tree352b0eb9ac4f5d54bd816dfe04bc4447f7d7c7a7 /source3/passdb
parentf9a4dcb4daf58929a7be23c2482364cbfd8a850b (diff)
downloadsamba-fc5f948260477e4c43e844be1abb09056174d69e.tar.gz
samba-fc5f948260477e4c43e844be1abb09056174d69e.tar.bz2
samba-fc5f948260477e4c43e844be1abb09056174d69e.zip
r15542: Close the LDAP connection and free the struct, regardless whether the
simple bind operation was successful or not. Guenther (This used to be commit e4734cb99cae189edf49c4d8f4e4324f5c51f443)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_nds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c
index a82f4e48d4..08ad96efa4 100644
--- a/source3/passdb/pdb_nds.c
+++ b/source3/passdb/pdb_nds.c
@@ -817,9 +817,9 @@ static NTSTATUS pdb_nds_update_login_attempts(struct pdb_methods *methods,
/* Attempt simple bind with real or bogus password */
rc = ldap_simple_bind_s(ld, dn, clear_text_pw);
+ ldap_unbind(ld);
if (rc == LDAP_SUCCESS) {
DEBUG(5,("pdb_nds_update_login_attempts: ldap_simple_bind_s Successful for %s\n", username));
- ldap_unbind(ld);
} else {
NTSTATUS nt_status = NT_STATUS_ACCOUNT_RESTRICTION;
DEBUG(5,("pdb_nds_update_login_attempts: ldap_simple_bind_s Failed for %s\n", username));