From 9de1d270203222f032d1678d56a59197ae143486 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 22 Apr 2008 23:11:21 +0200 Subject: IDL: rerun make idl. Guenther (cherry picked from commit c92b585cc42ba9f42727512c08c896ee40e5e319) --- source/librpc/gen_ndr/cli_samr.c | 4 ++-- source/librpc/gen_ndr/cli_samr.h | 4 ++-- source/librpc/gen_ndr/ndr_samr.c | 38 ++++++++++++++++++++++++++++++++------ source/librpc/gen_ndr/samr.h | 4 ++-- 4 files changed, 38 insertions(+), 12 deletions(-) (limited to 'source/librpc') diff --git a/source/librpc/gen_ndr/cli_samr.c b/source/librpc/gen_ndr/cli_samr.c index bdc98370183..cff548cab94 100644 --- a/source/librpc/gen_ndr/cli_samr.c +++ b/source/librpc/gen_ndr/cli_samr.c @@ -1821,7 +1821,7 @@ NTSTATUS rpccli_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint16_t level /* [in] */, - struct lsa_String name /* [in] */, + struct lsa_String *name /* [in] [ref] */, uint32_t *idx /* [out] [ref] */) { struct samr_GetDisplayEnumerationIndex r; @@ -2165,7 +2165,7 @@ NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint16_t level /* [in] */, - struct lsa_String name /* [in] */, + struct lsa_String *name /* [in] [ref] */, uint32_t *idx /* [out] [ref] */) { struct samr_GetDisplayEnumerationIndex2 r; diff --git a/source/librpc/gen_ndr/cli_samr.h b/source/librpc/gen_ndr/cli_samr.h index 53cdbfac3ad..4c7a30ef63f 100644 --- a/source/librpc/gen_ndr/cli_samr.h +++ b/source/librpc/gen_ndr/cli_samr.h @@ -230,7 +230,7 @@ NTSTATUS rpccli_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint16_t level /* [in] */, - struct lsa_String name /* [in] */, + struct lsa_String *name /* [in] [ref] */, uint32_t *idx /* [out] [ref] */); NTSTATUS rpccli_samr_TestPrivateFunctionsDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -270,7 +270,7 @@ NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint16_t level /* [in] */, - struct lsa_String name /* [in] */, + struct lsa_String *name /* [in] [ref] */, uint32_t *idx /* [out] [ref] */); NTSTATUS rpccli_samr_CreateUser2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source/librpc/gen_ndr/ndr_samr.c b/source/librpc/gen_ndr/ndr_samr.c index db95ec3a6dc..c3f8bc625a0 100644 --- a/source/librpc/gen_ndr/ndr_samr.c +++ b/source/librpc/gen_ndr/ndr_samr.c @@ -9346,7 +9346,10 @@ static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_pus } NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + if (r->in.name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); } if (flags & NDR_OUT) { if (r->out.idx == NULL) { @@ -9361,6 +9364,7 @@ static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex(struct ndr_pus static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex *r) { TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_name_0; TALLOC_CTX *_mem_save_idx_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9373,7 +9377,13 @@ static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex(struct ndr_pul NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.name); + } + _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.idx); ZERO_STRUCTP(r->out.idx); } @@ -9405,7 +9415,10 @@ _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, c ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); ndr->depth--; ndr_print_uint16(ndr, "level", r->in.level); - ndr_print_lsa_String(ndr, "name", &r->in.name); + ndr_print_ptr(ndr, "name", r->in.name); + ndr->depth++; + ndr_print_lsa_String(ndr, "name", r->in.name); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { @@ -10008,7 +10021,10 @@ static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_pu } NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level)); - NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + if (r->in.name == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); } if (flags & NDR_OUT) { if (r->out.idx == NULL) { @@ -10023,6 +10039,7 @@ static enum ndr_err_code ndr_push_samr_GetDisplayEnumerationIndex2(struct ndr_pu static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pull *ndr, int flags, struct samr_GetDisplayEnumerationIndex2 *r) { TALLOC_CTX *_mem_save_domain_handle_0; + TALLOC_CTX *_mem_save_name_0; TALLOC_CTX *_mem_save_idx_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -10035,7 +10052,13 @@ static enum ndr_err_code ndr_pull_samr_GetDisplayEnumerationIndex2(struct ndr_pu NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level)); - NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.name); + } + _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.idx); ZERO_STRUCTP(r->out.idx); } @@ -10067,7 +10090,10 @@ _PUBLIC_ void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle); ndr->depth--; ndr_print_uint16(ndr, "level", r->in.level); - ndr_print_lsa_String(ndr, "name", &r->in.name); + ndr_print_ptr(ndr, "name", r->in.name); + ndr->depth++; + ndr_print_lsa_String(ndr, "name", r->in.name); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { diff --git a/source/librpc/gen_ndr/samr.h b/source/librpc/gen_ndr/samr.h index 37e27aae914..522c6a9ceca 100644 --- a/source/librpc/gen_ndr/samr.h +++ b/source/librpc/gen_ndr/samr.h @@ -1358,7 +1358,7 @@ struct samr_GetDisplayEnumerationIndex { struct { struct policy_handle *domain_handle;/* [ref] */ uint16_t level; - struct lsa_String name; + struct lsa_String *name;/* [ref] */ } in; struct { @@ -1470,7 +1470,7 @@ struct samr_GetDisplayEnumerationIndex2 { struct { struct policy_handle *domain_handle;/* [ref] */ uint16_t level; - struct lsa_String name; + struct lsa_String *name;/* [ref] */ } in; struct { -- cgit