summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-28 01:27:12 +0100
committerGünther Deschner <gd@samba.org>2008-10-28 23:40:53 +0100
commitf82a11783286abf30c8a36cc46a5098b3284d65d (patch)
treefdce1f0631ca1e07cc8e5808cf2ea05faec9f2cb
parenta674a3bbf3520cd8f93f35dcc8a4ec59c456e1ba (diff)
downloadsamba-f82a11783286abf30c8a36cc46a5098b3284d65d.tar.gz
samba-f82a11783286abf30c8a36cc46a5098b3284d65d.tar.bz2
samba-f82a11783286abf30c8a36cc46a5098b3284d65d.zip
s4-netlogon: merge netr_GetDcName from s3 idl.
Guenther
-rw-r--r--source4/librpc/idl/netlogon.idl2
-rw-r--r--source4/torture/rpc/netlogon.c4
-rw-r--r--source4/winbind/wb_cmd_getdcname.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index 34da844ce7..e28da480ca 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -804,7 +804,7 @@ interface netlogon
WERROR netr_GetDcName(
[in] [string,charset(UTF16)] uint16 logon_server[],
[in,unique] [string,charset(UTF16)] uint16 *domainname,
- [out,unique] [string,charset(UTF16)] uint16 *dcname
+ [out,ref] [string,charset(UTF16)] uint16 **dcname
);
/*****************/
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 41abfbc243..5f8e2fc21b 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -869,15 +869,17 @@ static bool test_GetDcName(struct torture_context *tctx,
{
NTSTATUS status;
struct netr_GetDcName r;
+ const char *dcname = NULL;
r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.domainname = lp_workgroup(tctx->lp_ctx);
+ r.out.dcname = &dcname;
status = dcerpc_netr_GetDcName(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "GetDcName");
torture_assert_werr_ok(tctx, r.out.result, "GetDcName");
- torture_comment(tctx, "\tDC is at '%s'\n", r.out.dcname);
+ torture_comment(tctx, "\tDC is at '%s'\n", dcname);
return true;
}
diff --git a/source4/winbind/wb_cmd_getdcname.c b/source4/winbind/wb_cmd_getdcname.c
index 2289243905..66dcbf9d7b 100644
--- a/source4/winbind/wb_cmd_getdcname.c
+++ b/source4/winbind/wb_cmd_getdcname.c
@@ -81,7 +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 **);
+ state->g.out.dcname = talloc(state, const char *);
req = dcerpc_netr_GetAnyDCName_send(domain->netlogon_pipe, state,
&state->g);