s3:librpc/gen_ndr: regen after wbint.idl changes
authorStefan Metzmacher <metze@samba.org>
Mon, 4 Jul 2011 09:47:24 +0000 (11:47 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 2 Aug 2011 19:09:58 +0000 (21:09 +0200)
metze

Part of a fix for bug #7841 (WINBINDD_LOOKUPRIDS asks the wrong domain).
(cherry picked from commit 12a4b5633d5c3488f48f3e7a5084402f6eeeb9c5)

source3/librpc/gen_ndr/cli_wbint.c
source3/librpc/gen_ndr/cli_wbint.h
source3/librpc/gen_ndr/ndr_wbint.c
source3/librpc/gen_ndr/wbint.h

index 7200d2ac94cd43aca318aed8942091b240c2d6df..bf6b04b504267a8921bfaac476d7d40c0f8399ae 100644 (file)
@@ -2508,6 +2508,7 @@ static void rpccli_wbint_LookupRids_done(struct tevent_req *subreq);
 struct tevent_req *rpccli_wbint_LookupRids_send(TALLOC_CTX *mem_ctx,
                                                struct tevent_context *ev,
                                                struct rpc_pipe_client *cli,
+                                               struct dom_sid *_domain_sid /* [in] [ref] */,
                                                struct wbint_RidArray *_rids /* [in] [ref] */,
                                                const char **_domain_name /* [out] [ref,charset(UTF8)] */,
                                                struct wbint_Principals *_names /* [out] [ref] */)
@@ -2525,6 +2526,7 @@ struct tevent_req *rpccli_wbint_LookupRids_send(TALLOC_CTX *mem_ctx,
        state->dispatch_recv = cli->dispatch_recv;
 
        /* In parameters */
+       state->orig.in.domain_sid = _domain_sid;
        state->orig.in.rids = _rids;
 
        /* Out parameters */
@@ -2614,6 +2616,7 @@ NTSTATUS rpccli_wbint_LookupRids_recv(struct tevent_req *req,
 
 NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
                                 TALLOC_CTX *mem_ctx,
+                                struct dom_sid *domain_sid /* [in] [ref] */,
                                 struct wbint_RidArray *rids /* [in] [ref] */,
                                 const char **domain_name /* [out] [ref,charset(UTF8)] */,
                                 struct wbint_Principals *names /* [out] [ref] */)
@@ -2622,6 +2625,7 @@ NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
        NTSTATUS status;
 
        /* In parameters */
+       r.in.domain_sid = domain_sid;
        r.in.rids = rids;
 
        status = cli->dispatch(cli,
index c4f9a813bb2ed490f6f4ed4aa18e40938a7e889c..64708169f9d67e52e43f82508531a03aaa6ace24 100644 (file)
@@ -223,6 +223,7 @@ NTSTATUS rpccli_wbint_DsGetDcName(struct rpc_pipe_client *cli,
 struct tevent_req *rpccli_wbint_LookupRids_send(TALLOC_CTX *mem_ctx,
                                                struct tevent_context *ev,
                                                struct rpc_pipe_client *cli,
+                                               struct dom_sid *_domain_sid /* [in] [ref] */,
                                                struct wbint_RidArray *_rids /* [in] [ref] */,
                                                const char **_domain_name /* [out] [ref,charset(UTF8)] */,
                                                struct wbint_Principals *_names /* [out] [ref] */);
@@ -231,6 +232,7 @@ NTSTATUS rpccli_wbint_LookupRids_recv(struct tevent_req *req,
                                      NTSTATUS *result);
 NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
                                 TALLOC_CTX *mem_ctx,
+                                struct dom_sid *domain_sid /* [in] [ref] */,
                                 struct wbint_RidArray *rids /* [in] [ref] */,
                                 const char **domain_name /* [out] [ref,charset(UTF8)] */,
                                 struct wbint_Principals *names /* [out] [ref] */);
index 5bb68324f1915f79f6844799363ed943054fe80a..27c668ea982157a251b3b36ad4106d37ed99e5fa 100644 (file)
@@ -2076,6 +2076,10 @@ _PUBLIC_ void ndr_print_wbint_DsGetDcName(struct ndr_print *ndr, const char *nam
 static enum ndr_err_code ndr_push_wbint_LookupRids(struct ndr_push *ndr, int flags, const struct wbint_LookupRids *r)
 {
        if (flags & NDR_IN) {
+               if (r->in.domain_sid == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.domain_sid));
                if (r->in.rids == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -2104,6 +2108,7 @@ static enum ndr_err_code ndr_push_wbint_LookupRids(struct ndr_push *ndr, int fla
 static enum ndr_err_code ndr_pull_wbint_LookupRids(struct ndr_pull *ndr, int flags, struct wbint_LookupRids *r)
 {
        uint32_t _ptr_domain_name;
+       TALLOC_CTX *_mem_save_domain_sid_0;
        TALLOC_CTX *_mem_save_rids_0;
        TALLOC_CTX *_mem_save_domain_name_0;
        TALLOC_CTX *_mem_save_domain_name_1;
@@ -2111,6 +2116,13 @@ static enum ndr_err_code ndr_pull_wbint_LookupRids(struct ndr_pull *ndr, int fla
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
 
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.domain_sid);
+               }
+               _mem_save_domain_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_sid, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.domain_sid));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_sid_0, LIBNDR_FLAG_REF_ALLOC);
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.rids);
                }
@@ -2170,6 +2182,10 @@ _PUBLIC_ void ndr_print_wbint_LookupRids(struct ndr_print *ndr, const char *name
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "wbint_LookupRids");
                ndr->depth++;
+               ndr_print_ptr(ndr, "domain_sid", r->in.domain_sid);
+               ndr->depth++;
+               ndr_print_dom_sid(ndr, "domain_sid", r->in.domain_sid);
+               ndr->depth--;
                ndr_print_ptr(ndr, "rids", r->in.rids);
                ndr->depth++;
                ndr_print_wbint_RidArray(ndr, "rids", r->in.rids);
index 2add7fc7e393920708624d02cff613a3527404e5..4ba45ad7836e55f63963a66ca70d59c273e59638 100644 (file)
@@ -276,6 +276,7 @@ struct wbint_DsGetDcName {
 
 struct wbint_LookupRids {
        struct {
+               struct dom_sid *domain_sid;/* [ref] */
                struct wbint_RidArray *rids;/* [ref] */
        } in;