}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(r, union spoolss_PrinterInfo, r->out.count);
+ 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_PrinterInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(r, union spoolss_JobInfo, r->out.count);
+ 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_JobInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.handle = talloc_zero(r, struct policy_handle);
+ if (r->out.handle == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _spoolss_AddPrinter(p, r);
if (p->rng_fault_state) {
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(r, union spoolss_DriverInfo, r->out.count);
+ 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_DriverInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(r, union spoolss_DriverInfo);
+ 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_GetPrinterDriver(p, r);
if (p->rng_fault_state) {
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(r, union spoolss_PrintProcessorInfo, r->out.count);
+ 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_PrintProcessorInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(r, union spoolss_PrintProcessorDirectoryInfo);
+ 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_GetPrintProcessorDirectory(p, r);
if (p->rng_fault_state) {
}
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);
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(r, union spoolss_FormInfo, r->out.count);
+ 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_FormInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(r, union spoolss_PortInfo, r->out.count);
+ 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_PortInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(r, union spoolss_MonitorInfo, r->out.count);
+ 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_MonitorInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.gdi_handle = talloc_zero(r, struct policy_handle);
+ if (r->out.gdi_handle == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _spoolss_CreatePrinterIC(p, r);
if (p->rng_fault_state) {
NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.gdi_handle = r->in.gdi_handle;
r->out.result = _spoolss_DeletePrinterIC(p, r);
if (p->rng_fault_state) {
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) {
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero(r, DATA_BLOB);
+ r->out.info = talloc_zero(r, union spoolss_DriverInfo);
if (r->out.info == NULL) {
talloc_free(r);
return false;
NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.handle = talloc_zero(r, struct policy_handle);
+ if (r->out.handle == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _spoolss_AddPrinterEx(p, r);
if (p->rng_fault_state) {
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;
}
}
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;
}
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;
}
}
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;
case NDR_SPOOLSS_ENUMPRINTERS: {
struct spoolss_EnumPrinters *r = (struct spoolss_EnumPrinters *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrinterInfo, r->out.count);
+ 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_PrinterInfo *);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_ENUMJOBS: {
struct spoolss_EnumJobs *r = (struct spoolss_EnumJobs *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(mem_ctx, union spoolss_JobInfo, r->out.count);
+ 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_JobInfo *);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_ADDPRINTER: {
struct spoolss_AddPrinter *r = (struct spoolss_AddPrinter *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
+ if (r->out.handle == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _spoolss_AddPrinter(cli->pipes_struct, r);
return NT_STATUS_OK;
}
case NDR_SPOOLSS_ENUMPRINTERDRIVERS: {
struct spoolss_EnumPrinterDrivers *r = (struct spoolss_EnumPrinterDrivers *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(mem_ctx, union spoolss_DriverInfo, r->out.count);
+ 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_DriverInfo *);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_GETPRINTERDRIVER: {
struct spoolss_GetPrinterDriver *r = (struct spoolss_GetPrinterDriver *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo);
+ 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_GetPrinterDriver(cli->pipes_struct, r);
return NT_STATUS_OK;
}
case NDR_SPOOLSS_ENUMPRINTPROCESSORS: {
struct spoolss_EnumPrintProcessors *r = (struct spoolss_EnumPrintProcessors *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrintProcessorInfo, r->out.count);
+ 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_PrintProcessorInfo *);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY: {
struct spoolss_GetPrintProcessorDirectory *r = (struct spoolss_GetPrintProcessorDirectory *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorDirectoryInfo);
+ 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_GetPrintProcessorDirectory(cli->pipes_struct, r);
return NT_STATUS_OK;
}
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;
case NDR_SPOOLSS_ENUMFORMS: {
struct spoolss_EnumForms *r = (struct spoolss_EnumForms *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(mem_ctx, union spoolss_FormInfo, r->out.count);
+ 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_FormInfo *);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_ENUMPORTS: {
struct spoolss_EnumPorts *r = (struct spoolss_EnumPorts *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(mem_ctx, union spoolss_PortInfo, r->out.count);
+ 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_PortInfo *);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_ENUMMONITORS: {
struct spoolss_EnumMonitors *r = (struct spoolss_EnumMonitors *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero_array(mem_ctx, union spoolss_MonitorInfo, r->out.count);
+ 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_MonitorInfo *);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_CREATEPRINTERIC: {
struct spoolss_CreatePrinterIC *r = (struct spoolss_CreatePrinterIC *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.gdi_handle = talloc_zero(mem_ctx, struct policy_handle);
+ if (r->out.gdi_handle == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _spoolss_CreatePrinterIC(cli->pipes_struct, r);
return NT_STATUS_OK;
}
case NDR_SPOOLSS_DELETEPRINTERIC: {
struct spoolss_DeletePrinterIC *r = (struct spoolss_DeletePrinterIC *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.gdi_handle = r->in.gdi_handle;
r->out.result = _spoolss_DeletePrinterIC(cli->pipes_struct, r);
return NT_STATUS_OK;
}
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;
}
case NDR_SPOOLSS_GETPRINTERDRIVER2: {
struct spoolss_GetPrinterDriver2 *r = (struct spoolss_GetPrinterDriver2 *)_r;
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero(mem_ctx, DATA_BLOB);
+ r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo);
if (r->out.info == NULL) {
return NT_STATUS_NO_MEMORY;
}
case NDR_SPOOLSS_ADDPRINTEREX: {
struct spoolss_AddPrinterEx *r = (struct spoolss_AddPrinterEx *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
+ if (r->out.handle == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.result = _spoolss_AddPrinterEx(cli->pipes_struct, r);
return NT_STATUS_OK;
}
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;
}
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;
}
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;
}
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;
}