summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_cmd_getdcname.c3
-rw-r--r--source4/winbind/wb_dom_info_trusted.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/source4/winbind/wb_cmd_getdcname.c b/source4/winbind/wb_cmd_getdcname.c
index 46d7f0d82f..2289243905 100644
--- a/source4/winbind/wb_cmd_getdcname.c
+++ b/source4/winbind/wb_cmd_getdcname.c
@@ -81,6 +81,7 @@ static void getdcname_recv_domain(struct composite_context *ctx)
state, "\\\\%s",
dcerpc_server_name(domain->netlogon_pipe));
state->g.in.domainname = state->domain_name;
+ state->g.out.dcname = talloc(state, const char **);
req = dcerpc_netr_GetAnyDCName_send(domain->netlogon_pipe, state,
&state->g);
@@ -111,7 +112,7 @@ NTSTATUS wb_cmd_getdcname_recv(struct composite_context *c,
talloc_get_type(c->private_data, struct cmd_getdcname_state);
NTSTATUS status = composite_wait(c);
if (NT_STATUS_IS_OK(status)) {
- const char *p = state->g.out.dcname;
+ const char *p = *(state->g.out.dcname);
if (*p == '\\') p += 1;
if (*p == '\\') p += 1;
*dcname = talloc_strdup(mem_ctx, p);
diff --git a/source4/winbind/wb_dom_info_trusted.c b/source4/winbind/wb_dom_info_trusted.c
index 46d3bf37f6..c3be5adb1f 100644
--- a/source4/winbind/wb_dom_info_trusted.c
+++ b/source4/winbind/wb_dom_info_trusted.c
@@ -161,6 +161,7 @@ static void trusted_dom_info_recv_dsr(struct rpc_request *req)
state, "\\\\%s",
dcerpc_server_name(state->my_domain->netlogon_pipe));
state->g.in.domainname = state->info->name;
+ state->g.out.dcname = talloc(state, const char *);
req = dcerpc_netr_GetAnyDCName_send(state->my_domain->netlogon_pipe,
state, &state->g);
@@ -187,7 +188,7 @@ static void trusted_dom_info_recv_dcname(struct rpc_request *req)
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->g.out.dcname);
+ *(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++;