summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-09 12:57:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:06 -0500
commite91cee468eceb6ff8843bafc7fbb22a21b52a00c (patch)
treee187b289e0f4405465e742c940349c802013673d
parent66c16b5143041a504afdc6a9041e4928e7cd9ba2 (diff)
downloadsamba-e91cee468eceb6ff8843bafc7fbb22a21b52a00c.tar.gz
samba-e91cee468eceb6ff8843bafc7fbb22a21b52a00c.tar.bz2
samba-e91cee468eceb6ff8843bafc7fbb22a21b52a00c.zip
r18309: FreeBSD 6.1 has a symbol ldap_new_connection() in the system ldap
library. Even though we don't like to that library, it gets loaded via nss-ldap, which means nss-ldap calls into the samba ldap lib with the wrong parameters, and crashes. We really need to use a completely different namespace in libcli/ldap/ (This used to be commit c440e0eed9afae5fe69995a7416971e7c8560779)
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c2
-rw-r--r--source4/libcli/ldap/ldap_client.c2
-rw-r--r--source4/torture/ldap/common.c2
-rw-r--r--source4/winbind/wb_init_domain.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index b22dd517d2..f521425312 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -755,7 +755,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
ildb->ldb = ldb;
- ildb->ldap = ldap_new_connection(ildb, ldb_get_opaque(ldb, "EventContext"));
+ ildb->ldap = ldap4_new_connection(ildb, ldb_get_opaque(ldb, "EventContext"));
if (!ildb->ldap) {
ldb_oom(ldb);
goto failed;
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index da1ffcd317..7bb4d0c79a 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -40,7 +40,7 @@
/*
create a new ldap_connection stucture. The event context is optional
*/
-struct ldap_connection *ldap_new_connection(TALLOC_CTX *mem_ctx,
+struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx,
struct event_context *ev)
{
struct ldap_connection *conn;
diff --git a/source4/torture/ldap/common.c b/source4/torture/ldap/common.c
index c08534715a..5dc482776a 100644
--- a/source4/torture/ldap/common.c
+++ b/source4/torture/ldap/common.c
@@ -64,7 +64,7 @@ NTSTATUS torture_ldap_connection(TALLOC_CTX *mem_ctx, struct ldap_connection **c
return NT_STATUS_INVALID_PARAMETER;
}
- *conn = ldap_new_connection(mem_ctx, NULL);
+ *conn = ldap4_new_connection(mem_ctx, NULL);
status = ldap_connect(*conn, url);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c
index a48fd8e700..409f5f2b23 100644
--- a/source4/winbind/wb_init_domain.c
+++ b/source4/winbind/wb_init_domain.c
@@ -293,7 +293,7 @@ static void init_domain_recv_queryinfo(struct rpc_request *req)
}
state->domain->ldap_conn =
- ldap_new_connection(state->domain, state->ctx->event_ctx);
+ ldap4_new_connection(state->domain, state->ctx->event_ctx);
composite_nomem(state->domain->ldap_conn, state->ctx);
ldap_url = talloc_asprintf(state, "ldap://%s/",