lsa: lsa_CreateTrustedDomainEx takes lsa_TrustDomainInfoAuthInfo, not
authorGünther Deschner <gd@samba.org>
Fri, 15 Jul 2011 09:18:00 +0000 (11:18 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 15 Jul 2011 15:56:39 +0000 (17:56 +0200)
lsa_TrustDomainInfoAuthInfoInternal.

Guenther

librpc/idl/lsa.idl
source3/rpc_server/lsa/srv_lsa_nt.c
source4/rpc_server/lsa/dcesrv_lsa.c

index c65070e..d8f2649 100644 (file)
@@ -1052,7 +1052,7 @@ import "misc.idl", "security.idl";
        NTSTATUS lsa_CreateTrustedDomainEx(
                [in]  policy_handle               *policy_handle,
                [in]  lsa_TrustDomainInfoInfoEx   *info,
-               [in]  lsa_TrustDomainInfoAuthInfoInternal *auth_info,
+               [in]  lsa_TrustDomainInfoAuthInfo *auth_info,
                [in]  lsa_TrustedAccessMask access_mask,
                [out] policy_handle               *trustdom_handle
                );
index 8244b3a..2342a0e 100644 (file)
@@ -1818,10 +1818,13 @@ NTSTATUS _lsa_CreateTrustedDomainEx(struct pipes_struct *p,
                                    struct lsa_CreateTrustedDomainEx *r)
 {
        struct lsa_CreateTrustedDomainEx2 q;
+       struct lsa_TrustDomainInfoAuthInfoInternal auth_info;
+
+       ZERO_STRUCT(auth_info);
 
        q.in.policy_handle      = r->in.policy_handle;
        q.in.info               = r->in.info;
-       q.in.auth_info_internal = r->in.auth_info;
+       q.in.auth_info_internal = &auth_info;
        q.in.access_mask        = r->in.access_mask;
        q.out.trustdom_handle   = r->out.trustdom_handle;
 
index c1d7389..c690894 100644 (file)
@@ -1139,7 +1139,12 @@ static NTSTATUS dcesrv_lsa_CreateTrustedDomainEx(struct dcesrv_call_state *dce_c
 
        r2.in.policy_handle = r->in.policy_handle;
        r2.in.info = r->in.info;
-       r2.in.auth_info_internal = r->in.auth_info;
+
+       r2.in.auth_info_internal = talloc_zero(mem_ctx, struct lsa_TrustDomainInfoAuthInfoInternal);
+       if (!r2.in.auth_info_internal) {
+               return NT_STATUS_NO_MEMORY;
+       }
+
        r2.out.trustdom_handle = r->out.trustdom_handle;
        return dcesrv_lsa_CreateTrustedDomain_base(dce_call, mem_ctx, &r2, NDR_LSA_CREATETRUSTEDDOMAINEX);
 }