diff options
Diffstat (limited to 'librpc/gen_ndr/ndr_spoolss.c')
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 116 |
1 files changed, 106 insertions, 10 deletions
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index a1be2fd92c..fedebb2d56 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -14464,7 +14464,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersion(struct ndr_pull *ndr, int NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); @@ -14490,7 +14490,7 @@ _PUBLIC_ void ndr_print_spoolss_OSVersion(struct ndr_print *ndr, const char *nam ndr_print_uint32(ndr, "major", r->major); ndr_print_uint32(ndr, "minor", r->minor); ndr_print_uint32(ndr, "build", r->build); - ndr_print_uint32(ndr, "unknown", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->unknown); + ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id); ndr_print_string(ndr, "extra_string", r->extra_string); ndr->depth--; } @@ -14520,8 +14520,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersionEx(struct ndr_push *ndr, in } ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_major)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_minor)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->suite_mask)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->product_type)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14536,7 +14539,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersionEx(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id)); { uint32_t _flags_save_string = ndr->flags; ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM); @@ -14548,8 +14551,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersionEx(struct ndr_pull *ndr, in } ndr->flags = _flags_save_string; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_major)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_minor)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->suite_mask)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->product_type)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved)); } if (ndr_flags & NDR_BUFFERS) { } @@ -14564,10 +14570,13 @@ _PUBLIC_ void ndr_print_spoolss_OSVersionEx(struct ndr_print *ndr, const char *n ndr_print_uint32(ndr, "major", r->major); ndr_print_uint32(ndr, "minor", r->minor); ndr_print_uint32(ndr, "build", r->build); - ndr_print_uint32(ndr, "unknown1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->unknown1); + ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id); ndr_print_string(ndr, "extra_string", r->extra_string); - ndr_print_uint32(ndr, "unknown2", r->unknown2); - ndr_print_uint32(ndr, "unknown3", r->unknown3); + ndr_print_uint16(ndr, "service_pack_major", r->service_pack_major); + ndr_print_uint16(ndr, "service_pack_minor", r->service_pack_minor); + ndr_print_uint16(ndr, "suite_mask", r->suite_mask); + ndr_print_uint8(ndr, "product_type", r->product_type); + ndr_print_uint8(ndr, "reserved", r->reserved); ndr->depth--; } @@ -23702,8 +23711,20 @@ _PUBLIC_ void ndr_print_spoolss_DeletePort(struct ndr_print *ndr, const char *na static enum ndr_err_code ndr_push_spoolss_CreatePrinterIC(struct ndr_push *ndr, int flags, const struct spoolss_CreatePrinterIC *r) { if (flags & NDR_IN) { + if (r->in.handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + if (r->in.devmode_ctr == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr)); } if (flags & NDR_OUT) { + if (r->out.gdi_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -23711,9 +23732,37 @@ static enum ndr_err_code ndr_push_spoolss_CreatePrinterIC(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_spoolss_CreatePrinterIC(struct ndr_pull *ndr, int flags, struct spoolss_CreatePrinterIC *r) { + TALLOC_CTX *_mem_save_handle_0; + TALLOC_CTX *_mem_save_gdi_handle_0; + TALLOC_CTX *_mem_save_devmode_ctr_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.handle); + } + _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.devmode_ctr); + } + _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + ZERO_STRUCTP(r->out.gdi_handle); } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + } + _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -23729,11 +23778,23 @@ _PUBLIC_ void ndr_print_spoolss_CreatePrinterIC(struct ndr_print *ndr, const cha if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "spoolss_CreatePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "handle", r->in.handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "handle", r->in.handle); + ndr->depth--; + ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr); + ndr->depth++; + ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "spoolss_CreatePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } @@ -23784,8 +23845,16 @@ _PUBLIC_ void ndr_print_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_print *ndr, static enum ndr_err_code ndr_push_spoolss_DeletePrinterIC(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterIC *r) { if (flags & NDR_IN) { + if (r->in.gdi_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle)); } if (flags & NDR_OUT) { + if (r->out.gdi_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -23793,9 +23862,28 @@ static enum ndr_err_code ndr_push_spoolss_DeletePrinterIC(struct ndr_push *ndr, static enum ndr_err_code ndr_pull_spoolss_DeletePrinterIC(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterIC *r) { + TALLOC_CTX *_mem_save_gdi_handle_0; if (flags & NDR_IN) { + ZERO_STRUCT(r->out); + + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.gdi_handle); + } + _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.gdi_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + *r->out.gdi_handle = *r->in.gdi_handle; } if (flags & NDR_OUT) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->out.gdi_handle); + } + _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NDR_ERR_SUCCESS; @@ -23811,11 +23899,19 @@ _PUBLIC_ void ndr_print_spoolss_DeletePrinterIC(struct ndr_print *ndr, const cha if (flags & NDR_IN) { ndr_print_struct(ndr, "in", "spoolss_DeletePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "gdi_handle", r->in.gdi_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "gdi_handle", r->in.gdi_handle); + ndr->depth--; ndr->depth--; } if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "spoolss_DeletePrinterIC"); ndr->depth++; + ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle); + ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; } |