summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-28 01:23:04 +0100
committerGünther Deschner <gd@samba.org>2008-10-28 23:40:53 +0100
commita674a3bbf3520cd8f93f35dcc8a4ec59c456e1ba (patch)
tree5b7d7bbb9862a26c12cf6d3d27cab08e374a6ab8 /source4/winbind
parent2a329c496379d1b94fa9d83b4fc1fc1921636512 (diff)
downloadsamba-a674a3bbf3520cd8f93f35dcc8a4ec59c456e1ba.tar.gz
samba-a674a3bbf3520cd8f93f35dcc8a4ec59c456e1ba.tar.bz2
samba-a674a3bbf3520cd8f93f35dcc8a4ec59c456e1ba.zip
s4-netlogon: merge netr_GetAnyDCName from s3 idl (untested).
Guenther
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++;