summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-10 04:33:16 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:01 +0100
commitb65dba2245bf382c47d65c95ac9b1efa43918fc0 (patch)
treee2a474ba5bd99368423ad11d3632c55a51ed865c /source4/lib/ldb
parent4a36b71675a5ea2a22d7cf2a79d61a3cd511e99f (diff)
downloadsamba-b65dba2245bf382c47d65c95ac9b1efa43918fc0.tar.gz
samba-b65dba2245bf382c47d65c95ac9b1efa43918fc0.tar.bz2
samba-b65dba2245bf382c47d65c95ac9b1efa43918fc0.zip
r26355: Eliminate global_loadparm in more places.
(This used to be commit 5d589a0d94bd76a9b4c9fc748854e8098ea43c4d)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c5
-rw-r--r--source4/lib/ldb/tools/cmdline.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index 0c0ee629bf..a834e912d4 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -756,7 +756,8 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
}
module->private_data = ildb;
ildb->module = module;
- ildb->ldap = ldap4_new_connection(ildb, ldb_get_opaque(ldb, "EventContext"));
+ ildb->ldap = ldap4_new_connection(ildb, ldb_get_opaque(ldb, "loadparm"),
+ ldb_get_opaque(ldb, "EventContext"));
if (!ildb->ldap) {
ldb_oom(ldb);
goto failed;
@@ -793,7 +794,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
goto failed;
}
} else {
- status = ldap_bind_sasl(ildb->ldap, creds, global_loadparm);
+ status = ldap_bind_sasl(ildb->ldap, creds, ldb_get_opaque(ldb, "loadparm"));
if (!NT_STATUS_IS_OK(status)) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Failed to bind - %s\n",
ldap_errstr(ildb->ldap, module, status));
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index aff730c178..8ee1994615 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -210,15 +210,15 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb,
#if (_SAMBA_BUILD_ >= 4)
/* Must be after we have processed command line options */
- gensec_init(global_loadparm);
+ gensec_init(cmdline_lp_ctx);
- if (ldb_set_opaque(ldb, "sessionInfo", system_session(ldb, global_loadparm))) {
+ if (ldb_set_opaque(ldb, "sessionInfo", system_session(ldb, cmdline_lp_ctx))) {
goto failed;
}
if (ldb_set_opaque(ldb, "credentials", cmdline_credentials)) {
goto failed;
}
- if (ldb_set_opaque(ldb, "loadparm", global_loadparm)) {
+ if (ldb_set_opaque(ldb, "loadparm", cmdline_lp_ctx)) {
goto failed;
}