summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-17 12:23:44 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-17 12:23:44 +0200
commit21fc7673780aa1d7c0caab7b17ff9171238913ba (patch)
tree53556069de7ca28e4721473d679c559c71df22b8 /source4/libnet
parentab07a60d6ed1d9704590747ac69bbaa22bef2df3 (diff)
downloadsamba-21fc7673780aa1d7c0caab7b17ff9171238913ba.tar.gz
samba-21fc7673780aa1d7c0caab7b17ff9171238913ba.tar.bz2
samba-21fc7673780aa1d7c0caab7b17ff9171238913ba.zip
Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a284c044704322446c94351c2decff91)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_become_dc.c2
-rw-r--r--source4/libnet/libnet_join.c2
-rw-r--r--source4/libnet/libnet_samsync_ldb.c2
-rw-r--r--source4/libnet/libnet_unbecome_dc.c2
-rw-r--r--source4/libnet/libnet_vampire.c7
5 files changed, 9 insertions, 6 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index c4f9cabb11..e8a5329985 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -793,7 +793,7 @@ static NTSTATUS becomeDC_ldap_connect(struct libnet_BecomeDC_state *s,
url = talloc_asprintf(s, "ldap://%s/", s->source_dsa.dns_name);
NT_STATUS_HAVE_NO_MEMORY(url);
- ldap->ldb = ldb_wrap_connect(s, s->libnet->lp_ctx, url,
+ ldap->ldb = ldb_wrap_connect(s, s->libnet->event_ctx, s->libnet->lp_ctx, url,
NULL,
s->libnet->cred,
0, NULL);
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 4549cd6e93..b5b28df81d 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -230,7 +230,7 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
return NT_STATUS_NO_MEMORY;
}
- remote_ldb = ldb_wrap_connect(tmp_ctx, ctx->lp_ctx,
+ remote_ldb = ldb_wrap_connect(tmp_ctx, ctx->event_ctx, ctx->lp_ctx,
remote_ldb_url,
NULL, ctx->cred, 0, NULL);
if (!remote_ldb) {
diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c
index a60b05189b..85e5dea2d7 100644
--- a/source4/libnet/libnet_samsync_ldb.c
+++ b/source4/libnet/libnet_samsync_ldb.c
@@ -1194,6 +1194,7 @@ static NTSTATUS libnet_samsync_ldb_init(TALLOC_CTX *mem_ctx,
ldap_url = talloc_asprintf(state, "ldap://%s", server);
state->remote_ldb = ldb_wrap_connect(mem_ctx,
+ state->samsync_state->machine_net_ctx->event_ctx,
state->samsync_state->machine_net_ctx->lp_ctx,
ldap_url,
NULL, state->samsync_state->machine_net_ctx->cred,
@@ -1222,6 +1223,7 @@ NTSTATUS libnet_samsync_ldb(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, str
state->trusted_domains = NULL;
state->sam_ldb = ldb_wrap_connect(mem_ctx,
+ ctx->event_ctx,
ctx->lp_ctx,
lp_sam_url(ctx->lp_ctx),
r->in.session_info,
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index 5d346ac166..6f06585880 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -310,7 +310,7 @@ static NTSTATUS unbecomeDC_ldap_connect(struct libnet_UnbecomeDC_state *s)
url = talloc_asprintf(s, "ldap://%s/", s->source_dsa.dns_name);
NT_STATUS_HAVE_NO_MEMORY(url);
- s->ldap.ldb = ldb_wrap_connect(s, s->libnet->lp_ctx, url,
+ s->ldap.ldb = ldb_wrap_connect(s, s->libnet->event_ctx, s->libnet->lp_ctx, url,
NULL,
s->libnet->cred,
0, NULL);
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 1cc63a3fb0..56a8ebe034 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -70,6 +70,7 @@ struct vampire_state {
const char *targetdir;
struct loadparm_context *lp_ctx;
+ struct event_context *event_ctx;
};
static NTSTATUS vampire_prepare_db(void *private_data,
@@ -335,7 +336,7 @@ static NTSTATUS vampire_apply_schema(struct vampire_state *s,
s->schema = NULL;
DEBUG(0,("Reopen the SAM LDB with system credentials and a already stored schema\n"));
- s->ldb = samdb_connect(s, s->lp_ctx,
+ s->ldb = samdb_connect(s, s->event_ctx, s->lp_ctx,
system_session(s, s->lp_ctx));
if (!s->ldb) {
DEBUG(0,("Failed to reopen sam.ldb\n"));
@@ -569,7 +570,6 @@ NTSTATUS libnet_Vampire(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
struct libnet_JoinDomain *join;
struct libnet_set_join_secrets *set_secrets;
struct libnet_BecomeDC b;
- struct libnet_UnbecomeDC u;
struct vampire_state *s;
struct ldb_message *msg;
int ldb_ret;
@@ -581,12 +581,13 @@ NTSTATUS libnet_Vampire(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
r->out.error_string = NULL;
- s = talloc_zero(mem_ctx , struct vampire_state);
+ s = talloc_zero(mem_ctx, struct vampire_state);
if (!s) {
return NT_STATUS_NO_MEMORY;
}
s->lp_ctx = ctx->lp_ctx;
+ s->event_ctx = ctx->event_ctx;
join = talloc_zero(s, struct libnet_JoinDomain);
if (!join) {