summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_dom_info_trusted.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-14 17:36:23 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-15 15:39:35 +1000
commitee61568be6bcb217d106c08ec915775c8476ed56 (patch)
tree2b502868d5c59dbac6c1ff50f1bf7ec99b593ae2 /source4/winbind/wb_dom_info_trusted.c
parent0c447e316f17e64becaf70c91006b90de21887df (diff)
downloadsamba-ee61568be6bcb217d106c08ec915775c8476ed56.tar.gz
samba-ee61568be6bcb217d106c08ec915775c8476ed56.tar.bz2
samba-ee61568be6bcb217d106c08ec915775c8476ed56.zip
s4-winbind: use finddcs_cldap() in winbind
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/winbind/wb_dom_info_trusted.c')
-rw-r--r--source4/winbind/wb_dom_info_trusted.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/source4/winbind/wb_dom_info_trusted.c b/source4/winbind/wb_dom_info_trusted.c
index 8086714a6e..af887c854c 100644
--- a/source4/winbind/wb_dom_info_trusted.c
+++ b/source4/winbind/wb_dom_info_trusted.c
@@ -141,17 +141,16 @@ static void trusted_dom_info_recv_dsr(struct tevent_req *subreq)
}
/* Hey, that was easy! */
- state->info->num_dcs = 1;
- state->info->dcs = talloc(state->info, struct nbt_dc_name);
- state->info->dcs[0].name = talloc_steal(state->info,
+ state->info->dc = talloc(state->info, struct nbt_dc_name);
+ state->info->dc->name = talloc_steal(state->info,
(*state->d.out.info)->dc_unc);
- if (*state->info->dcs[0].name == '\\') state->info->dcs[0].name++;
- if (*state->info->dcs[0].name == '\\') state->info->dcs[0].name++;
+ if (*state->info->dc->name == '\\') state->info->dc->name++;
+ if (*state->info->dc->name == '\\') state->info->dc->name++;
- state->info->dcs[0].address = talloc_steal(state->info,
+ state->info->dc->address = talloc_steal(state->info,
(*state->d.out.info)->dc_address);
- if (*state->info->dcs[0].address == '\\') state->info->dcs[0].address++;
- if (*state->info->dcs[0].address == '\\') state->info->dcs[0].address++;
+ if (*state->info->dc->address == '\\') state->info->dc->address++;
+ if (*state->info->dc->address == '\\') state->info->dc->address++;
state->info->dns_name = talloc_steal(state->info,
(*state->d.out.info)->domain_name);
@@ -191,14 +190,13 @@ static void trusted_dom_info_recv_dcname(struct tevent_req *subreq)
if (!composite_is_ok(state->ctx)) return;
/* Hey, that was easy! */
- state->info->num_dcs = 1;
- state->info->dcs = talloc(state->info, struct nbt_dc_name);
- state->info->dcs[0].name = talloc_steal(state->info,
+ state->info->dc = talloc(state->info, struct nbt_dc_name);
+ state->info->dc->name = talloc_steal(state->info,
*(state->g.out.dcname));
- if (*state->info->dcs[0].name == '\\') state->info->dcs[0].name++;
- if (*state->info->dcs[0].name == '\\') state->info->dcs[0].name++;
+ if (*state->info->dc->name == '\\') state->info->dc->name++;
+ if (*state->info->dc->name == '\\') state->info->dc->name++;
- make_nbt_name(&name, state->info->dcs[0].name, 0x20);
+ make_nbt_name(&name, state->info->dc->name, 0x20);
ctx = resolve_name_send(lpcfg_resolve_context(state->service->task->lp_ctx), state,
&name, state->service->task->event_ctx);
@@ -213,7 +211,7 @@ static void trusted_dom_info_recv_dcaddr(struct composite_context *ctx)
struct trusted_dom_info_state);
state->ctx->status = resolve_name_recv(ctx, state->info,
- &state->info->dcs[0].address);
+ &state->info->dc->address);
if (!composite_is_ok(state->ctx)) return;
composite_done(state->ctx);