s4-netlogon: merge netr_GetDcName from s3 idl.
authorGünther Deschner <gd@samba.org>
Tue, 28 Oct 2008 00:27:12 +0000 (01:27 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 28 Oct 2008 22:40:53 +0000 (23:40 +0100)
Guenther

source4/librpc/idl/netlogon.idl
source4/torture/rpc/netlogon.c
source4/winbind/wb_cmd_getdcname.c

index 34da844ce7afa61ba86d5ac4373a11e1764a750b..e28da480cafe00a93c7c547848a48ad3735fd8d8 100644 (file)
@@ -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
                );
 
        /*****************/
index 41abfbc24347c58cf3062210f8f5319049139765..5f8e2fc21b53c4438b344508793f8af9c2aaccb5 100644 (file)
@@ -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;
 }
index 22892439052c3b2f03d009b2bb61d767c1ece8f6..66dcbf9d7bd081e85754e773834b011556e6893a 100644 (file)
@@ -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);