mirror of
https://github.com/samba-team/samba.git
synced 2025-12-16 00:23:52 +03:00
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 c440e0eed9)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
66c16b5143
commit
e91cee468e
@@ -755,7 +755,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
|
|||||||
|
|
||||||
ildb->ldb = ldb;
|
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) {
|
if (!ildb->ldap) {
|
||||||
ldb_oom(ldb);
|
ldb_oom(ldb);
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
/*
|
/*
|
||||||
create a new ldap_connection stucture. The event context is optional
|
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 event_context *ev)
|
||||||
{
|
{
|
||||||
struct ldap_connection *conn;
|
struct ldap_connection *conn;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ NTSTATUS torture_ldap_connection(TALLOC_CTX *mem_ctx, struct ldap_connection **c
|
|||||||
return NT_STATUS_INVALID_PARAMETER;
|
return NT_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
*conn = ldap_new_connection(mem_ctx, NULL);
|
*conn = ldap4_new_connection(mem_ctx, NULL);
|
||||||
|
|
||||||
status = ldap_connect(*conn, url);
|
status = ldap_connect(*conn, url);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ static void init_domain_recv_queryinfo(struct rpc_request *req)
|
|||||||
}
|
}
|
||||||
|
|
||||||
state->domain->ldap_conn =
|
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);
|
composite_nomem(state->domain->ldap_conn, state->ctx);
|
||||||
|
|
||||||
ldap_url = talloc_asprintf(state, "ldap://%s/",
|
ldap_url = talloc_asprintf(state, "ldap://%s/",
|
||||||
|
|||||||
Reference in New Issue
Block a user