From 63c0821b0b5c79afcff62e52891641cf42386e90 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 4 Mar 2010 17:02:42 +0100 Subject: s3: re-run make samba3-idl. Guenther --- librpc/gen_ndr/cli_spoolss.c | 24 ++++----- librpc/gen_ndr/cli_spoolss.h | 16 +++--- librpc/gen_ndr/ndr_spoolss.c | 124 +++++++++---------------------------------- librpc/gen_ndr/ndr_spoolss.h | 16 ------ librpc/gen_ndr/spoolss.h | 63 +--------------------- librpc/gen_ndr/srv_spoolss.c | 8 +-- 6 files changed, 50 insertions(+), 201 deletions(-) (limited to 'librpc/gen_ndr') diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index 184a887062..c674f940b1 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -4152,9 +4152,9 @@ struct tevent_req *rpccli_spoolss_GetPrinterData_send(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli, struct policy_handle *_handle /* [in] [ref] */, const char *_value_name /* [in] [charset(UTF16)] */, - uint32_t _offered /* [in] */, enum winreg_Type *_type /* [out] [ref] */, - union spoolss_PrinterData *_data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *_data /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */, uint32_t *_needed /* [out] [ref] */) { struct tevent_req *req; @@ -4226,7 +4226,7 @@ static void rpccli_spoolss_GetPrinterData_done(struct tevent_req *subreq) /* Copy out parameters */ *state->orig.out.type = *state->tmp.out.type; - *state->orig.out.data = *state->tmp.out.data; + memcpy(state->orig.out.data, state->tmp.out.data, (state->tmp.in.offered) * sizeof(*state->orig.out.data)); *state->orig.out.needed = *state->tmp.out.needed; /* Copy result */ @@ -4265,9 +4265,9 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *value_name /* [in] [charset(UTF16)] */, - uint32_t offered /* [in] */, enum winreg_Type *type /* [out] [ref] */, - union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *data /* [out] [ref,size_is(offered)] */, + uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -4295,7 +4295,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, /* Return variables */ *type = *r.out.type; - *data = *r.out.data; + memcpy(data, r.out.data, (r.in.offered) * sizeof(*data)); *needed = *r.out.needed; /* Return result */ @@ -11868,9 +11868,9 @@ struct tevent_req *rpccli_spoolss_GetPrinterDataEx_send(TALLOC_CTX *mem_ctx, struct policy_handle *_handle /* [in] [ref] */, const char *_key_name /* [in] [charset(UTF16)] */, const char *_value_name /* [in] [charset(UTF16)] */, - uint32_t _offered /* [in] */, enum winreg_Type *_type /* [out] [ref] */, - union spoolss_PrinterData *_data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *_data /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */, uint32_t *_needed /* [out] [ref] */) { struct tevent_req *req; @@ -11943,7 +11943,7 @@ static void rpccli_spoolss_GetPrinterDataEx_done(struct tevent_req *subreq) /* Copy out parameters */ *state->orig.out.type = *state->tmp.out.type; - *state->orig.out.data = *state->tmp.out.data; + memcpy(state->orig.out.data, state->tmp.out.data, (state->tmp.in.offered) * sizeof(*state->orig.out.data)); *state->orig.out.needed = *state->tmp.out.needed; /* Copy result */ @@ -11983,9 +11983,9 @@ NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli, struct policy_handle *handle /* [in] [ref] */, const char *key_name /* [in] [charset(UTF16)] */, const char *value_name /* [in] [charset(UTF16)] */, - uint32_t offered /* [in] */, enum winreg_Type *type /* [out] [ref] */, - union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *data /* [out] [ref,size_is(offered)] */, + uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror) { @@ -12014,7 +12014,7 @@ NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli, /* Return variables */ *type = *r.out.type; - *data = *r.out.data; + memcpy(data, r.out.data, (r.in.offered) * sizeof(*data)); *needed = *r.out.needed; /* Return result */ diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h index 348dfc0e4e..f5e554d88d 100644 --- a/librpc/gen_ndr/cli_spoolss.h +++ b/librpc/gen_ndr/cli_spoolss.h @@ -478,9 +478,9 @@ struct tevent_req *rpccli_spoolss_GetPrinterData_send(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli, struct policy_handle *_handle /* [in] [ref] */, const char *_value_name /* [in] [charset(UTF16)] */, - uint32_t _offered /* [in] */, enum winreg_Type *_type /* [out] [ref] */, - union spoolss_PrinterData *_data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *_data /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */, uint32_t *_needed /* [out] [ref] */); NTSTATUS rpccli_spoolss_GetPrinterData_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, @@ -489,9 +489,9 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *value_name /* [in] [charset(UTF16)] */, - uint32_t offered /* [in] */, enum winreg_Type *type /* [out] [ref] */, - union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *data /* [out] [ref,size_is(offered)] */, + uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); struct tevent_req *rpccli_spoolss_SetPrinterData_send(TALLOC_CTX *mem_ctx, @@ -1219,9 +1219,9 @@ struct tevent_req *rpccli_spoolss_GetPrinterDataEx_send(TALLOC_CTX *mem_ctx, struct policy_handle *_handle /* [in] [ref] */, const char *_key_name /* [in] [charset(UTF16)] */, const char *_value_name /* [in] [charset(UTF16)] */, - uint32_t _offered /* [in] */, enum winreg_Type *_type /* [out] [ref] */, - union spoolss_PrinterData *_data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *_data /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */, uint32_t *_needed /* [out] [ref] */); NTSTATUS rpccli_spoolss_GetPrinterDataEx_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, @@ -1231,9 +1231,9 @@ NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli, struct policy_handle *handle /* [in] [ref] */, const char *key_name /* [in] [charset(UTF16)] */, const char *value_name /* [in] [charset(UTF16)] */, - uint32_t offered /* [in] */, enum winreg_Type *type /* [out] [ref] */, - union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint8_t *data /* [out] [ref,size_is(offered)] */, + uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); struct tevent_req *rpccli_spoolss_EnumPrinterDataEx_send(TALLOC_CTX *mem_ctx, diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index 4a58200292..2dd8b13e37 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -24150,7 +24150,7 @@ _PUBLIC_ void ndr_print_spoolss_ScheduleJob(struct ndr_print *ndr, const char *n ndr->depth--; } -_PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct _spoolss_GetPrinterData *r) +static enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -24171,7 +24171,8 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr if (r->out.data == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.data)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.offered)); if (r->out.needed == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -24181,11 +24182,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct _spoolss_GetPrinterData *r) +static enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_type_0; - TALLOC_CTX *_mem_save_data_0; TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -24207,8 +24207,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); NDR_PULL_ALLOC(ndr, r->out.type); ZERO_STRUCTP(r->out.type); - NDR_PULL_ALLOC(ndr, r->out.data); - ZERO_STRUCTP(r->out.data); + NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.offered); + memset(r->out.data, 0, (r->in.offered) * sizeof(*r->out.data)); NDR_PULL_ALLOC(ndr, r->out.needed); ZERO_STRUCTP(r->out.needed); } @@ -24220,13 +24220,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.data); + NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data)); } - _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.data)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_size(ndr, &r->out.data))); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.needed); } @@ -24235,44 +24233,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_push___spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct __spoolss_GetPrinterData *r) -{ - if (flags & NDR_IN) { - NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type)); - } - if (flags & NDR_OUT) { - if (r->out.data == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.data, r->in.type)); - NDR_CHECK(ndr_push_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull___spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct __spoolss_GetPrinterData *r) -{ - TALLOC_CTX *_mem_save_data_0; - if (flags & NDR_IN) { - ZERO_STRUCT(r->out); - - NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type)); - NDR_PULL_ALLOC(ndr, r->out.data); - ZERO_STRUCTP(r->out.data); - } - if (flags & NDR_OUT) { - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.data); + if (r->out.data) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.offered)); } - _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.data, r->in.type)); - NDR_CHECK(ndr_pull_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC); } return NDR_ERR_SUCCESS; } @@ -24304,8 +24267,7 @@ _PUBLIC_ void ndr_print_spoolss_GetPrinterData(struct ndr_print *ndr, const char ndr->depth--; ndr_print_ptr(ndr, "data", r->out.data); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.data, *r->out.type); - ndr_print_spoolss_PrinterData(ndr, "data", r->out.data); + ndr_print_array_uint8(ndr, "data", r->out.data, r->in.offered); ndr->depth--; ndr_print_ptr(ndr, "needed", r->out.needed); ndr->depth++; @@ -28653,7 +28615,7 @@ _PUBLIC_ void ndr_print_spoolss_SetPrinterDataEx(struct ndr_print *ndr, const ch ndr->depth--; } -_PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct _spoolss_GetPrinterDataEx *r) +static enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDataEx *r) { if (flags & NDR_IN) { if (r->in.handle == NULL) { @@ -28678,7 +28640,8 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterDataEx(struct ndr_push *n if (r->out.data == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.data)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.offered)); if (r->out.needed == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } @@ -28688,11 +28651,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterDataEx(struct ndr_push *n return NDR_ERR_SUCCESS; } -_PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct _spoolss_GetPrinterDataEx *r) +static enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDataEx *r) { TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_type_0; - TALLOC_CTX *_mem_save_data_0; TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -28721,8 +28683,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterDataEx(struct ndr_pull *n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); NDR_PULL_ALLOC(ndr, r->out.type); ZERO_STRUCTP(r->out.type); - NDR_PULL_ALLOC(ndr, r->out.data); - ZERO_STRUCTP(r->out.data); + NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.offered); + memset(r->out.data, 0, (r->in.offered) * sizeof(*r->out.data)); NDR_PULL_ALLOC(ndr, r->out.needed); ZERO_STRUCTP(r->out.needed); } @@ -28734,13 +28696,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterDataEx(struct ndr_pull *n NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.data); + NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data)); } - _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.data)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_size(ndr, &r->out.data))); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.needed); } @@ -28749,44 +28709,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterDataEx(struct ndr_pull *n NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_push___spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct __spoolss_GetPrinterDataEx *r) -{ - if (flags & NDR_IN) { - NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type)); - } - if (flags & NDR_OUT) { - if (r->out.data == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } - NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.data, r->in.type)); - NDR_CHECK(ndr_push_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data)); - } - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull___spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct __spoolss_GetPrinterDataEx *r) -{ - TALLOC_CTX *_mem_save_data_0; - if (flags & NDR_IN) { - ZERO_STRUCT(r->out); - - NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type)); - NDR_PULL_ALLOC(ndr, r->out.data); - ZERO_STRUCTP(r->out.data); - } - if (flags & NDR_OUT) { - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.data); + if (r->out.data) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.offered)); } - _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.data, r->in.type)); - NDR_CHECK(ndr_pull_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC); } return NDR_ERR_SUCCESS; } @@ -28819,8 +28744,7 @@ _PUBLIC_ void ndr_print_spoolss_GetPrinterDataEx(struct ndr_print *ndr, const ch ndr->depth--; ndr_print_ptr(ndr, "data", r->out.data); ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.data, *r->out.type); - ndr_print_spoolss_PrinterData(ndr, "data", r->out.data); + ndr_print_array_uint8(ndr, "data", r->out.data, r->in.offered); ndr->depth--; ndr_print_ptr(ndr, "needed", r->out.needed); ndr->depth++; diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h index e1a3cd7a04..2ae3466077 100644 --- a/librpc/gen_ndr/ndr_spoolss.h +++ b/librpc/gen_ndr/ndr_spoolss.h @@ -623,14 +623,6 @@ void ndr_print_spoolss_ReadPrinter(struct ndr_print *ndr, const char *name, int void ndr_print_spoolss_EndDocPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EndDocPrinter *r); void ndr_print_spoolss_AddJob(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddJob *r); void ndr_print_spoolss_ScheduleJob(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ScheduleJob *r); -enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct _spoolss_GetPrinterData *r); -enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct _spoolss_GetPrinterData *r); -void ndr_print__spoolss_GetPrinterData(struct ndr_print *ndr, const char *name, int flags, const struct _spoolss_GetPrinterData *r); -enum ndr_err_code ndr_push___spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct __spoolss_GetPrinterData *r); -enum ndr_err_code ndr_pull___spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct __spoolss_GetPrinterData *r); -void ndr_print___spoolss_GetPrinterData(struct ndr_print *ndr, const char *name, int flags, const struct __spoolss_GetPrinterData *r); -enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r); -enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r); void ndr_print_spoolss_GetPrinterData(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterData *r); void ndr_print_spoolss_SetPrinterData(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SetPrinterData *r); void ndr_print_spoolss_WaitForPrinterChange(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_WaitForPrinterChange *r); @@ -729,14 +721,6 @@ void ndr_print_spoolss_4a(struct ndr_print *ndr, const char *name, int flags, co void ndr_print_spoolss_4b(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_4b *r); void ndr_print_spoolss_4c(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_4c *r); void ndr_print_spoolss_SetPrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SetPrinterDataEx *r); -enum ndr_err_code ndr_push__spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct _spoolss_GetPrinterDataEx *r); -enum ndr_err_code ndr_pull__spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct _spoolss_GetPrinterDataEx *r); -void ndr_print__spoolss_GetPrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct _spoolss_GetPrinterDataEx *r); -enum ndr_err_code ndr_push___spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct __spoolss_GetPrinterDataEx *r); -enum ndr_err_code ndr_pull___spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct __spoolss_GetPrinterDataEx *r); -void ndr_print___spoolss_GetPrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct __spoolss_GetPrinterDataEx *r); -enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDataEx *r); -enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDataEx *r); void ndr_print_spoolss_GetPrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterDataEx *r); enum ndr_err_code ndr_push__spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrinterDataEx *r); enum ndr_err_code ndr_pull__spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrinterDataEx *r); diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index e9b4d20175..3974e91de5 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -3068,35 +3068,6 @@ struct spoolss_ScheduleJob { }; -struct _spoolss_GetPrinterData { - struct { - struct policy_handle *handle;/* [ref] */ - const char *value_name;/* [charset(UTF16)] */ - uint32_t offered; - } in; - - struct { - enum winreg_Type *type;/* [ref] */ - DATA_BLOB *data;/* [ref] */ - uint32_t *needed;/* [ref] */ - WERROR result; - } out; - -}; - - -struct __spoolss_GetPrinterData { - struct { - enum winreg_Type type; - } in; - - struct { - union spoolss_PrinterData *data;/* [ref,switch_is(type)] */ - } out; - -}; - - struct spoolss_GetPrinterData { struct { struct policy_handle *handle;/* [ref] */ @@ -3106,7 +3077,7 @@ struct spoolss_GetPrinterData { struct { enum winreg_Type *type;/* [ref] */ - union spoolss_PrinterData *data;/* [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */ + uint8_t *data;/* [ref,size_is(offered)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -3861,36 +3832,6 @@ struct spoolss_SetPrinterDataEx { }; -struct _spoolss_GetPrinterDataEx { - struct { - struct policy_handle *handle;/* [ref] */ - const char *key_name;/* [charset(UTF16)] */ - const char *value_name;/* [charset(UTF16)] */ - uint32_t offered; - } in; - - struct { - enum winreg_Type *type;/* [ref] */ - DATA_BLOB *data;/* [ref] */ - uint32_t *needed;/* [ref] */ - WERROR result; - } out; - -}; - - -struct __spoolss_GetPrinterDataEx { - struct { - enum winreg_Type type; - } in; - - struct { - union spoolss_PrinterData *data;/* [ref,switch_is(type)] */ - } out; - -}; - - struct spoolss_GetPrinterDataEx { struct { struct policy_handle *handle;/* [ref] */ @@ -3901,7 +3842,7 @@ struct spoolss_GetPrinterDataEx { struct { enum winreg_Type *type;/* [ref] */ - union spoolss_PrinterData *data;/* [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */ + uint8_t *data;/* [ref,size_is(offered)] */ uint32_t *needed;/* [ref] */ WERROR result; } out; diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index cc11d122be..236467a00b 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -2139,7 +2139,7 @@ static bool api_spoolss_GetPrinterData(pipes_struct *p) return false; } - r->out.data = talloc_zero(r, union spoolss_PrinterData); + r->out.data = talloc_zero_array(r, uint8_t, r->in.offered); if (r->out.data == NULL) { talloc_free(r); return false; @@ -6147,7 +6147,7 @@ static bool api_spoolss_GetPrinterDataEx(pipes_struct *p) return false; } - r->out.data = talloc_zero(r, union spoolss_PrinterData); + r->out.data = talloc_zero_array(r, uint8_t, r->in.offered); if (r->out.data == NULL) { talloc_free(r); return false; @@ -8979,7 +8979,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData); + r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.offered); if (r->out.data == NULL) { return NT_STATUS_NO_MEMORY; } @@ -9471,7 +9471,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData); + r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.offered); if (r->out.data == NULL) { return NT_STATUS_NO_MEMORY; } -- cgit