diff options
Diffstat (limited to 'librpc/gen_ndr/srv_spoolss.c')
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.c | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index 9cb930f979..79efbb5970 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -2113,12 +2113,18 @@ static bool api_spoolss_GetPrinterData(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.type = talloc_zero(r, enum spoolss_PrinterDataType); + r->out.type = talloc_zero(r, enum winreg_Type); if (r->out.type == NULL) { talloc_free(r); return false; } + r->out.data = talloc_zero(r, union spoolss_PrinterData); + if (r->out.data == NULL) { + talloc_free(r); + return false; + } + r->out.needed = talloc_zero(r, uint32_t); if (r->out.needed == NULL) { talloc_free(r); @@ -5649,14 +5655,14 @@ static bool api_spoolss_EnumPrinterData(pipes_struct *p) return false; } - r->out.printerdata_type = talloc_zero(r, uint32_t); - if (r->out.printerdata_type == NULL) { + r->out.type = talloc_zero(r, enum winreg_Type); + if (r->out.type == NULL) { talloc_free(r); return false; } - r->out.buffer = talloc_zero(r, DATA_BLOB); - if (r->out.buffer == NULL) { + r->out.data = talloc_zero_array(r, uint8_t, r->in.data_offered); + if (r->out.data == NULL) { talloc_free(r); return false; } @@ -6106,7 +6112,7 @@ static bool api_spoolss_GetPrinterDataEx(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.type = talloc_zero(r, uint32_t); + r->out.type = talloc_zero(r, enum winreg_Type); if (r->out.type == NULL) { talloc_free(r); return false; @@ -6198,20 +6204,20 @@ static bool api_spoolss_EnumPrinterDataEx(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered); - if (r->out.buffer == NULL) { + r->out.count = talloc_zero(r, uint32_t); + if (r->out.count == NULL) { talloc_free(r); return false; } - r->out.needed = talloc_zero(r, uint32_t); - if (r->out.needed == NULL) { + r->out.info = talloc_zero(r, struct spoolss_PrinterEnumValues *); + if (r->out.info == NULL) { talloc_free(r); return false; } - r->out.count = talloc_zero(r, uint32_t); - if (r->out.count == NULL) { + r->out.needed = talloc_zero(r, uint32_t); + if (r->out.needed == NULL) { talloc_free(r); return false; } @@ -6290,7 +6296,7 @@ static bool api_spoolss_EnumPrinterKey(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.key_buffer = talloc_zero_array(r, uint16_t, r->in.key_buffer_size / 2); + r->out.key_buffer = talloc_zero(r, const char **); if (r->out.key_buffer == NULL) { talloc_free(r); return false; @@ -7865,11 +7871,16 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_GETPRINTERDATA: { struct spoolss_GetPrinterData *r = (struct spoolss_GetPrinterData *)_r; ZERO_STRUCT(r->out); - r->out.type = talloc_zero(mem_ctx, enum spoolss_PrinterDataType); + r->out.type = talloc_zero(mem_ctx, enum winreg_Type); if (r->out.type == NULL) { return NT_STATUS_NO_MEMORY; } + r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData); + if (r->out.data == NULL) { + return NT_STATUS_NO_MEMORY; + } + r->out.needed = talloc_zero(mem_ctx, uint32_t); if (r->out.needed == NULL) { return NT_STATUS_NO_MEMORY; @@ -8292,13 +8303,13 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.printerdata_type = talloc_zero(mem_ctx, uint32_t); - if (r->out.printerdata_type == NULL) { + r->out.type = talloc_zero(mem_ctx, enum winreg_Type); + if (r->out.type == NULL) { return NT_STATUS_NO_MEMORY; } - r->out.buffer = talloc_zero(mem_ctx, DATA_BLOB); - if (r->out.buffer == NULL) { + r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_offered); + if (r->out.data == NULL) { return NT_STATUS_NO_MEMORY; } @@ -8344,7 +8355,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_GETPRINTERDATAEX: { struct spoolss_GetPrinterDataEx *r = (struct spoolss_GetPrinterDataEx *)_r; ZERO_STRUCT(r->out); - r->out.type = talloc_zero(mem_ctx, uint32_t); + r->out.type = talloc_zero(mem_ctx, enum winreg_Type); if (r->out.type == NULL) { return NT_STATUS_NO_MEMORY; } @@ -8366,18 +8377,18 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_ENUMPRINTERDATAEX: { struct spoolss_EnumPrinterDataEx *r = (struct spoolss_EnumPrinterDataEx *)_r; ZERO_STRUCT(r->out); - r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered); - if (r->out.buffer == NULL) { + r->out.count = talloc_zero(mem_ctx, uint32_t); + if (r->out.count == NULL) { return NT_STATUS_NO_MEMORY; } - r->out.needed = talloc_zero(mem_ctx, uint32_t); - if (r->out.needed == NULL) { + r->out.info = talloc_zero(mem_ctx, struct spoolss_PrinterEnumValues *); + if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } - r->out.count = talloc_zero(mem_ctx, uint32_t); - if (r->out.count == NULL) { + r->out.needed = talloc_zero(mem_ctx, uint32_t); + if (r->out.needed == NULL) { return NT_STATUS_NO_MEMORY; } @@ -8388,7 +8399,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_ENUMPRINTERKEY: { struct spoolss_EnumPrinterKey *r = (struct spoolss_EnumPrinterKey *)_r; ZERO_STRUCT(r->out); - r->out.key_buffer = talloc_zero_array(mem_ctx, uint16_t, r->in.key_buffer_size / 2); + r->out.key_buffer = talloc_zero(mem_ctx, const char **); if (r->out.key_buffer == NULL) { return NT_STATUS_NO_MEMORY; } |