summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-06-24 14:23:34 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-06-24 14:23:34 +0000
commit9804ad458ad35c9ea7de3e2e86bf8b2f85ae6533 (patch)
tree8d980b2db1db70d2bc5c955f8ec149445c7b64fb
parent73e13b9bafa070a1dceaf21a0e098dda207ba7fd (diff)
downloadsamba-9804ad458ad35c9ea7de3e2e86bf8b2f85ae6533.tar.gz
samba-9804ad458ad35c9ea7de3e2e86bf8b2f85ae6533.tar.xz
samba-9804ad458ad35c9ea7de3e2e86bf8b2f85ae6533.zip
Fix pdb_ldap segfaults, and wrong default values for ldapsam_compat.
Reviewed by vl, metze. Andrew Bartlett
-rw-r--r--source/passdb/pdb_ldap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index fe575d4e3e5..1149a92a997 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -182,6 +182,7 @@ static void smbldap_delete_state(struct smbldap_state *smbldap_state)
if (t->smbldap_state == smbldap_state) {
DLIST_REMOVE(smbldap_state_lookup_list, t);
SAFE_FREE(t);
+ return;
}
}
}
@@ -3427,10 +3428,8 @@ static NTSTATUS pdb_init_ldapsam_compat(PDB_CONTEXT *pdb_context, PDB_METHODS **
NTSTATUS nt_status;
struct ldapsam_privates *ldap_state;
-#ifndef WITH_LDAP_SAMCONFIG
- location = "ldap://localhost";
-#else
- {
+#ifdef WITH_LDAP_SAMCONFIG
+ if (!location) {
int ldap_port = lp_ldap_port();
/* remap default port if not using SSL (ie clear or TLS) */