diff options
Diffstat (limited to 'librpc/gen_ndr/srv_spoolss.c')
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.c | 126 |
1 files changed, 86 insertions, 40 deletions
diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index 891be85376..79efbb5970 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -51,7 +51,7 @@ static bool api_spoolss_EnumPrinters(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_PrinterInfo, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_PrinterInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -382,7 +382,7 @@ static bool api_spoolss_EnumJobs(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_JobInfo, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_JobInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -852,7 +852,7 @@ static bool api_spoolss_EnumPrinterDrivers(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_DriverInfo, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_DriverInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -1249,7 +1249,7 @@ static bool api_spoolss_EnumPrintProcessors(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_PrintProcessorInfo, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_PrintProcessorInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -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); @@ -2731,7 +2737,7 @@ static bool api_spoolss_EnumForms(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_FormInfo, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_FormInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -2823,7 +2829,7 @@ static bool api_spoolss_EnumPorts(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_PortInfo, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_PortInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -2915,7 +2921,7 @@ static bool api_spoolss_EnumMonitors(pipes_struct *p) return false; } - r->out.info = talloc_zero_array(r, union spoolss_MonitorInfo, *r->out.count); + r->out.info = talloc_zero(r, union spoolss_MonitorInfo *); if (r->out.info == NULL) { talloc_free(r); return false; @@ -4022,6 +4028,25 @@ static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct *p) NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, r); } + ZERO_STRUCT(r->out); + r->out.count = talloc_zero(r, uint32_t); + if (r->out.count == NULL) { + talloc_free(r); + return false; + } + + r->out.info = talloc_zero(r, union spoolss_PrintProcDataTypesInfo *); + if (r->out.info == NULL) { + talloc_free(r); + return false; + } + + r->out.needed = talloc_zero(r, uint32_t); + if (r->out.needed == NULL) { + talloc_free(r); + return false; + } + r->out.result = _spoolss_EnumPrintProcDataTypes(p, r); if (p->rng_fault_state) { @@ -5630,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; } @@ -6087,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; @@ -6179,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; } @@ -6271,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; @@ -7551,7 +7576,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrinterInfo, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7608,7 +7633,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_JobInfo, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7671,7 +7696,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_DriverInfo, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7728,7 +7753,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrintProcessorInfo, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7846,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; @@ -7923,7 +7953,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_FormInfo, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7945,7 +7975,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_PortInfo, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_PortInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -7967,7 +7997,7 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - r->out.info = talloc_zero_array(mem_ctx, union spoolss_MonitorInfo, *r->out.count); + r->out.info = talloc_zero(mem_ctx, union spoolss_MonitorInfo *); if (r->out.info == NULL) { return NT_STATUS_NO_MEMORY; } @@ -8067,6 +8097,22 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES: { struct spoolss_EnumPrintProcDataTypes *r = (struct spoolss_EnumPrintProcDataTypes *)_r; + ZERO_STRUCT(r->out); + r->out.count = talloc_zero(mem_ctx, uint32_t); + if (r->out.count == NULL) { + return NT_STATUS_NO_MEMORY; + } + + r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcDataTypesInfo *); + if (r->out.info == 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; + } + r->out.result = _spoolss_EnumPrintProcDataTypes(cli->pipes_struct, r); return NT_STATUS_OK; } @@ -8257,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; } @@ -8309,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; } @@ -8331,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; } @@ -8353,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; } |