r18309: FreeBSD 6.1 has a symbol ldap_new_connection() in the system ldap
authorAndrew Tridgell <tridge@samba.org>
Sat, 9 Sep 2006 12:57:45 +0000 (12:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:06 +0000 (14:18 -0500)
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)

source4/lib/ldb/ldb_ildap/ldb_ildap.c
source4/libcli/ldap/ldap_client.c
source4/torture/ldap/common.c
source4/winbind/wb_init_domain.c

index b22dd517d20787ab64087426e8627b445c3d0767..f521425312a31368a38fdcd3364c6c2f07904233 100644 (file)
@@ -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;
index da1ffcd317d3e3c9c6fd4d84705cbfaa08acfe24..7bb4d0c79a1b840454cc012ad0c7560579ac39bd 100644 (file)
@@ -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;
index c08534715a7cf0d50cd6a6259ce30ebc4c493665..5dc482776ab58befd9d6e7fa87634aa217a1bd60 100644 (file)
@@ -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)) {
index a48fd8e70062aa56e5e73835c2c66cabed2f913a..409f5f2b23f33a5242e8c284a463f14506b621d4 100644 (file)
@@ -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/",