summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_init_domain.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-08-07 17:23:52 +1000
committerAndrew Tridgell <tridge@samba.org>2009-08-07 17:24:48 +1000
commit7c2025610c7dfce228f682f2f204972b0264cf72 (patch)
treee10999825fc2d97bb3f836aae3958121921b748f /source4/winbind/wb_init_domain.c
parentc271dc998ba25101a46e7d4b2187567a07588ca2 (diff)
downloadsamba-7c2025610c7dfce228f682f2f204972b0264cf72.tar.gz
samba-7c2025610c7dfce228f682f2f204972b0264cf72.tar.bz2
samba-7c2025610c7dfce228f682f2f204972b0264cf72.zip
fixed another ambiguous talloc call
During the creation of the 3 RPC pipes in winbind we try to steal the RPC binding structure to be a child of the pipe once the pipe is established. This fails with a talloc warning as the rpc connection code already holds a reference to the binding. The fix is to use talloc_reparent() instead.
Diffstat (limited to 'source4/winbind/wb_init_domain.c')
-rw-r--r--source4/winbind/wb_init_domain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c
index 676746681f..1f560c17ce 100644
--- a/source4/winbind/wb_init_domain.c
+++ b/source4/winbind/wb_init_domain.c
@@ -211,7 +211,7 @@ static void init_domain_recv_netlogonpipe(struct composite_context *ctx)
if (!composite_is_ok(state->ctx)) {
return;
}
- talloc_steal(state->domain->netlogon_pipe, state->domain->netlogon_binding);
+ talloc_reparent(state, state->domain->netlogon_pipe, state->domain->netlogon_binding);
state->domain->lsa_binding = init_domain_binding(state, &ndr_table_lsarpc);
@@ -286,7 +286,7 @@ static void init_domain_recv_lsa_pipe(struct composite_context *ctx)
if (!composite_is_ok(state->ctx)) return;
talloc_steal(state->domain->libnet_ctx, state->domain->libnet_ctx->lsa.pipe);
- talloc_steal(state->domain->libnet_ctx->lsa.pipe, state->domain->lsa_binding);
+ talloc_reparent(state, state->domain->libnet_ctx->lsa.pipe, state->domain->lsa_binding);
state->domain->libnet_ctx->lsa.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
state->domain->libnet_ctx->lsa.name = state->domain->info->name;
@@ -399,7 +399,7 @@ static void init_domain_recv_samr(struct composite_context *ctx)
&state->domain->libnet_ctx->samr.handle);
if (!composite_is_ok(state->ctx)) return;
- talloc_steal(state->domain->libnet_ctx->samr.pipe, state->domain->samr_binding);
+ talloc_reparent(state, state->domain->libnet_ctx->samr.pipe, state->domain->samr_binding);
state->domain->libnet_ctx->samr.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
state->domain->libnet_ctx->samr.name = state->domain->info->name;
state->domain->libnet_ctx->samr.sid = dom_sid_dup(