s3/s4:netlogon IDL - fix up "struct netr_SamInfo6" regarding the "forest" attribute
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Mon, 12 Apr 2010 12:49:14 +0000 (14:49 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Mon, 12 Apr 2010 16:49:01 +0000 (18:49 +0200)
According to MS-NRPC 2.2.1.4.13 this should be the DNS domainname, not the
forest one.

librpc/gen_ndr/ndr_netlogon.c
librpc/gen_ndr/netlogon.h
librpc/idl/netlogon.idl
source3/auth/server_info.c
source4/rpc_server/netlogon/dcerpc_netlogon.c

index aad5bac42861b7b5f9f49d30ff683a7affc25bf9..7b05155f422db54fd8f62b3e9bbb67ca78473a45 100644 (file)
@@ -1485,7 +1485,7 @@ static enum ndr_err_code ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_fl
                NDR_CHECK(ndr_push_netr_SamBaseInfo(ndr, NDR_SCALARS, &r->base));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sidcount));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->forest));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->principle));
                for (cntr_unknown4_0 = 0; cntr_unknown4_0 < 20; cntr_unknown4_0++) {
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4[cntr_unknown4_0]));
@@ -1503,7 +1503,7 @@ static enum ndr_err_code ndr_push_netr_SamInfo6(struct ndr_push *ndr, int ndr_fl
                                NDR_CHECK(ndr_push_netr_SidAttr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
                        }
                }
-               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->forest));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
                NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->principle));
        }
        return NDR_ERR_SUCCESS;
@@ -1526,7 +1526,7 @@ static enum ndr_err_code ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_fl
                } else {
                        r->sids = NULL;
                }
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->forest));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->dns_domainname));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->principle));
                for (cntr_unknown4_0 = 0; cntr_unknown4_0 < 20; cntr_unknown4_0++) {
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4[cntr_unknown4_0]));
@@ -1551,7 +1551,7 @@ static enum ndr_err_code ndr_pull_netr_SamInfo6(struct ndr_pull *ndr, int ndr_fl
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
                }
-               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->forest));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->dns_domainname));
                NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->principle));
                if (r->sids) {
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->sidcount));
@@ -1583,7 +1583,7 @@ _PUBLIC_ void ndr_print_netr_SamInfo6(struct ndr_print *ndr, const char *name, c
                ndr->depth--;
        }
        ndr->depth--;
-       ndr_print_lsa_String(ndr, "forest", &r->forest);
+       ndr_print_lsa_String(ndr, "dns_domainname", &r->dns_domainname);
        ndr_print_lsa_String(ndr, "principle", &r->principle);
        ndr->print(ndr, "%s: ARRAY(%d)", "unknown4", (int)20);
        ndr->depth++;
index a069dc5eb82e4940525c40ce5188295abf9d59cf..b55597c05df0ae79c3f65070166a1e3db92b192d 100644 (file)
@@ -203,7 +203,7 @@ struct netr_SamInfo6 {
        struct netr_SamBaseInfo base;
        uint32_t sidcount;
        struct netr_SidAttr *sids;/* [unique,size_is(sidcount)] */
-       struct lsa_String forest;
+       struct lsa_String dns_domainname;
        struct lsa_String principle;
        uint32_t unknown4[20];
 };
index 6b10f8bcdda84237f32d1d0bcf42286fce9078bb..d66b2194ca2989bfcf1d9f18e25eb1908d3031cf 100644 (file)
@@ -251,7 +251,7 @@ interface netlogon
                netr_SamBaseInfo base;
                uint32 sidcount;
                [size_is(sidcount)] netr_SidAttr *sids;
-               lsa_String forest;
+               lsa_String dns_domainname;
                lsa_String principle;
                uint32 unknown4[20];
        } netr_SamInfo6;
index fc6c85fb6c8c899e0bf6d5a342bcc3017f6903b1..b968c1ddedc84b481b32feb9bbe1dcb5fe87e7bd 100644 (file)
@@ -326,14 +326,14 @@ NTSTATUS serverinfo_to_SamInfo6(struct auth_serversupplied_info *server_info,
        sam6->sidcount          = 0;
        sam6->sids              = NULL;
 
-       sam6->forest.string     = talloc_strdup(sam6, dominfo->dns_forest);
-       if (sam6->forest.string == NULL) {
+       sam6->dns_domainname.string = talloc_strdup(sam6, dominfo->dns_domain);
+       if (sam6->dns_domainname.string == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
 
        sam6->principle.string  = talloc_asprintf(sam6, "%s@%s",
                                                  pdb_get_username(server_info->sam_account),
-                                                 dominfo->dns_domain);
+                                                 sam6->dns_domainname.string);
        if (sam6->principle.string == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index e337be90140637f5c7a34920b973c8f478db4890..bb9d6b8399dc22de2701c17569bd8e43e14c6fa7 100644 (file)
@@ -657,9 +657,9 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base(struct dcesrv_call_state *dce_cal
                sam6->sidcount = sam3->sidcount;
                sam6->sids = sam3->sids;
 
-               sam6->forest.string = lp_dnsdomain(dce_call->conn->dce_ctx->lp_ctx);
+               sam6->dns_domainname.string = lp_dnsdomain(dce_call->conn->dce_ctx->lp_ctx);
                sam6->principle.string = talloc_asprintf(mem_ctx, "%s@%s",
-                                                        sam->account_name.string, sam6->forest.string);
+                                                        sam->account_name.string, sam6->dns_domainname.string);
                NT_STATUS_HAVE_NO_MEMORY(sam6->principle.string);
                /* And put into the talloc tree */
                talloc_steal(sam6, sam3);