diff options
author | Günther Deschner <gd@samba.org> | 2009-02-06 17:13:58 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-02-06 17:36:03 +0100 |
commit | 0155b5c8439d829c8ced81cd0198830de095cca6 (patch) | |
tree | 2dd0272659641eb5e44eb6774ef4281a75e1a30d /librpc/gen_ndr | |
parent | 9ad6b94339203a88cfbd78a9faff3bc35877ff8e (diff) | |
download | samba-0155b5c8439d829c8ced81cd0198830de095cca6.tar.gz samba-0155b5c8439d829c8ced81cd0198830de095cca6.tar.bz2 samba-0155b5c8439d829c8ced81cd0198830de095cca6.zip |
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.c | 32 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_spoolss.h | 16 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 168 | ||||
-rw-r--r-- | librpc/gen_ndr/spoolss.h | 32 |
4 files changed, 184 insertions, 64 deletions
diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index dfb0060d8b..04065c830b 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -14,7 +14,7 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_PrinterInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror) { @@ -54,7 +54,7 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, if (info && r.out.info) { memcpy(info, r.out.info, count * sizeof(*info)); } - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; return NT_STATUS_NOT_SUPPORTED; /* Return result */ @@ -231,7 +231,7 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_JobInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror) { @@ -272,7 +272,7 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, if (info && r.out.info) { memcpy(info, r.out.info, count * sizeof(*info)); } - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; return NT_STATUS_NOT_SUPPORTED; /* Return result */ @@ -524,7 +524,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_DriverInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror) { @@ -564,7 +564,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, if (info && r.out.info) { memcpy(info, r.out.info, count * sizeof(*info)); } - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; return NT_STATUS_NOT_SUPPORTED; /* Return result */ @@ -771,7 +771,7 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_PrintProcessorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror) { @@ -811,7 +811,7 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, if (info && r.out.info) { memcpy(info, r.out.info, count * sizeof(*info)); } - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; return NT_STATUS_NOT_SUPPORTED; /* Return result */ @@ -1271,7 +1271,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, uint32_t offered /* [in] */, enum spoolss_PrinterDataType type /* [out] */, union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(type)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, WERROR *werror) { struct spoolss_GetPrinterData r; @@ -1307,7 +1307,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, /* Return variables */ return NT_STATUS_NOT_SUPPORTED; return NT_STATUS_NOT_SUPPORTED; - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; /* Return result */ if (werror) { @@ -1658,7 +1658,7 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_FormInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror) { @@ -1697,7 +1697,7 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, if (info && r.out.info) { memcpy(info, r.out.info, count * sizeof(*info)); } - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; return NT_STATUS_NOT_SUPPORTED; /* Return result */ @@ -1715,7 +1715,7 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_PortInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror) { @@ -1754,7 +1754,7 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, if (info && r.out.info) { memcpy(info, r.out.info, count * sizeof(*info)); } - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; return NT_STATUS_NOT_SUPPORTED; /* Return result */ @@ -1772,7 +1772,7 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_MonitorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror) { @@ -1811,7 +1811,7 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, if (info && r.out.info) { memcpy(info, r.out.info, count * sizeof(*info)); } - return NT_STATUS_NOT_SUPPORTED; + *needed = *r.out.needed; return NT_STATUS_NOT_SUPPORTED; /* Return result */ diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h index b1adf39e4d..bea04404a2 100644 --- a/librpc/gen_ndr/cli_spoolss.h +++ b/librpc/gen_ndr/cli_spoolss.h @@ -9,7 +9,7 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_PrinterInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror); NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli, @@ -46,7 +46,7 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_JobInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror); NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli, @@ -85,7 +85,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_DriverInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror); NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli, @@ -119,7 +119,7 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_PrintProcessorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror); NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli, @@ -175,7 +175,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, uint32_t offered /* [in] */, enum spoolss_PrinterDataType type /* [out] */, union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(type)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, WERROR *werror); NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -227,7 +227,7 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_FormInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror); NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, @@ -237,7 +237,7 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_PortInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror); NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, @@ -247,7 +247,7 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, DATA_BLOB *buffer /* [in] [unique] */, uint32_t offered /* [in] */, union spoolss_MonitorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */, - uint32_t needed /* [out] */, + uint32_t *needed /* [out] [ref] */, uint32_t count /* [out] */, WERROR *werror); NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli, diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index 77321b4997..20d32559f1 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -9029,7 +9029,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinters(struct ndr_push *ndr, if (r->out.info) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -9044,6 +9047,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinters(struct ndr_pull *ndr, TALLOC_CTX *_mem_save_server_0; TALLOC_CTX *_mem_save_buffer_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9080,6 +9084,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinters(struct ndr_pull *ndr, NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -9094,7 +9100,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinters(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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_uint32(ndr, NDR_SCALARS, &r->out.count)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -9193,7 +9205,10 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinters(struct ndr_print *ndr, const char * ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_uint32(ndr, "count", r->out.count); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -9589,7 +9604,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumJobs(struct ndr_push *ndr, int if (r->out.info) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -9603,6 +9621,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumJobs(struct ndr_pull *ndr, int TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_buffer_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -9629,6 +9648,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumJobs(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -9643,7 +9664,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumJobs(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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_uint32(ndr, NDR_SCALARS, &r->out.count)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -9741,7 +9768,10 @@ _PUBLIC_ void ndr_print_spoolss_EnumJobs(struct ndr_print *ndr, const char *name ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_uint32(ndr, "count", r->out.count); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -10136,7 +10166,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinterDrivers(struct ndr_push if (r->out.info) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -10153,6 +10186,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinterDrivers(struct ndr_pull TALLOC_CTX *_mem_save_environment_0; TALLOC_CTX *_mem_save_buffer_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -10206,6 +10240,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinterDrivers(struct ndr_pull NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -10220,7 +10256,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinterDrivers(struct ndr_pull NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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_uint32(ndr, NDR_SCALARS, &r->out.count)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -10324,7 +10366,10 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print *ndr, const ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_uint32(ndr, "count", r->out.count); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -10751,7 +10796,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrintProcessors(struct ndr_push if (r->out.info) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -10768,6 +10816,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcessors(struct ndr_pull TALLOC_CTX *_mem_save_environment_0; TALLOC_CTX *_mem_save_buffer_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -10821,6 +10870,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcessors(struct ndr_pull NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -10835,7 +10886,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcessors(struct ndr_pull NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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_uint32(ndr, NDR_SCALARS, &r->out.count)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -10939,7 +10996,10 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print *ndr, const ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_uint32(ndr, "count", r->out.count); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -11582,7 +11642,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr if (flags & NDR_OUT) { NDR_CHECK(ndr_push_spoolss_PrinterDataType(ndr, NDR_SCALARS, r->out.type)); NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->out.data)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -11591,6 +11654,7 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr _PUBLIC_ 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_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -11609,11 +11673,19 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t))); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_spoolss_PrinterDataType(ndr, NDR_SCALARS, &r->out.type)); NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->out.data)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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; @@ -11669,7 +11741,10 @@ _PUBLIC_ void ndr_print_spoolss_GetPrinterData(struct ndr_print *ndr, const char ndr_print_spoolss_PrinterDataType(ndr, "type", r->out.type); ndr_print_set_switch_value(ndr, &r->out.data, r->out.type); ndr_print_spoolss_PrinterData(ndr, "data", &r->out.data); - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -12278,7 +12353,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumForms(struct ndr_push *ndr, int if (r->out.info) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -12292,6 +12370,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumForms(struct ndr_pull *ndr, int TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_buffer_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -12316,6 +12395,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumForms(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -12330,7 +12411,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumForms(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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_uint32(ndr, NDR_SCALARS, &r->out.count)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -12426,7 +12513,10 @@ _PUBLIC_ void ndr_print_spoolss_EnumForms(struct ndr_print *ndr, const char *nam ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_uint32(ndr, "count", r->out.count); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -12456,7 +12546,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPorts(struct ndr_push *ndr, int if (r->out.info) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -12471,6 +12564,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPorts(struct ndr_pull *ndr, int TALLOC_CTX *_mem_save_servername_0; TALLOC_CTX *_mem_save_buffer_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -12506,6 +12600,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPorts(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -12520,7 +12616,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPorts(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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_uint32(ndr, NDR_SCALARS, &r->out.count)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -12618,7 +12720,10 @@ _PUBLIC_ void ndr_print_spoolss_EnumPorts(struct ndr_print *ndr, const char *nam ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_uint32(ndr, "count", r->out.count); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -12648,7 +12753,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumMonitors(struct ndr_push *ndr, if (r->out.info) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.needed)); + if (r->out.needed == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.count)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } @@ -12663,6 +12771,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumMonitors(struct ndr_pull *ndr, TALLOC_CTX *_mem_save_servername_0; TALLOC_CTX *_mem_save_buffer_0; TALLOC_CTX *_mem_save_info_0; + TALLOC_CTX *_mem_save_needed_0; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -12698,6 +12807,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumMonitors(struct ndr_pull *ndr, NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0); } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); + NDR_PULL_ALLOC(ndr, r->out.needed); + ZERO_STRUCTP(r->out.needed); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info)); @@ -12712,7 +12823,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumMonitors(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.needed)); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.needed); + } + _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC); + 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_uint32(ndr, NDR_SCALARS, &r->out.count)); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } @@ -12810,7 +12927,10 @@ _PUBLIC_ void ndr_print_spoolss_EnumMonitors(struct ndr_print *ndr, const char * ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "needed", r->out.needed); + ndr_print_ptr(ndr, "needed", r->out.needed); + ndr->depth++; + ndr_print_uint32(ndr, "needed", *r->out.needed); + ndr->depth--; ndr_print_uint32(ndr, "count", r->out.count); ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index 59d5c44d3d..fc32177a91 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -760,7 +760,7 @@ struct _spoolss_EnumPrinters { struct { DATA_BLOB *info;/* [unique] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -792,7 +792,7 @@ struct spoolss_EnumPrinters { struct { union spoolss_PrinterInfo *info;/* [unique,switch_is(level),size_is(count)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -861,7 +861,7 @@ struct _spoolss_EnumJobs { struct { DATA_BLOB *info;/* [unique] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -894,7 +894,7 @@ struct spoolss_EnumJobs { struct { union spoolss_JobInfo *info;/* [unique,switch_is(level),size_is(count)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -975,7 +975,7 @@ struct _spoolss_EnumPrinterDrivers { struct { DATA_BLOB *info;/* [unique] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1007,7 +1007,7 @@ struct spoolss_EnumPrinterDrivers { struct { union spoolss_DriverInfo *info;/* [unique,switch_is(level),size_is(count)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1075,7 +1075,7 @@ struct _spoolss_EnumPrintProcessors { struct { DATA_BLOB *info;/* [unique] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1107,7 +1107,7 @@ struct spoolss_EnumPrintProcessors { struct { union spoolss_PrintProcessorInfo *info;/* [unique,switch_is(level),size_is(count)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1242,7 +1242,7 @@ struct _spoolss_GetPrinterData { struct { enum spoolss_PrinterDataType type; DATA_BLOB data; - uint32_t needed; + uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -1271,7 +1271,7 @@ struct spoolss_GetPrinterData { struct { enum spoolss_PrinterDataType type; union spoolss_PrinterData data;/* [subcontext_size(offered),subcontext(4),switch_is(type)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ WERROR result; } out; @@ -1413,7 +1413,7 @@ struct _spoolss_EnumForms { struct { DATA_BLOB *info;/* [unique] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1444,7 +1444,7 @@ struct spoolss_EnumForms { struct { union spoolss_FormInfo *info;/* [unique,switch_is(level),size_is(count)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1462,7 +1462,7 @@ struct _spoolss_EnumPorts { struct { DATA_BLOB *info;/* [unique] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1493,7 +1493,7 @@ struct spoolss_EnumPorts { struct { union spoolss_PortInfo *info;/* [unique,switch_is(level),size_is(count)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1511,7 +1511,7 @@ struct _spoolss_EnumMonitors { struct { DATA_BLOB *info;/* [unique] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; @@ -1542,7 +1542,7 @@ struct spoolss_EnumMonitors { struct { union spoolss_MonitorInfo *info;/* [unique,switch_is(level),size_is(count)] */ - uint32_t needed; + uint32_t *needed;/* [ref] */ uint32_t count; WERROR result; } out; |