LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_spoolss_scompat.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 769 2346 32.8 %
Date: 2021-09-23 10:06:22 Functions: 13 15 86.7 %

          Line data    Source code
       1             : /* s3 compat server functions auto-generated by pidl */
       2             : #include "bin/default/librpc/gen_ndr/ndr_spoolss.h"
       3             : #include "bin/default/librpc/gen_ndr/ndr_spoolss_scompat.h"
       4             : #include <librpc/rpc/dcesrv_core.h>
       5             : #include <rpc_server/rpc_config.h>
       6             : #include <rpc_server/rpc_server.h>
       7             : #include <util/debug.h>
       8             : 
       9             : enum s3compat_rpc_dispatch {
      10             :         S3COMPAT_RPC_DISPATCH_EXTERNAL = 0x00000001,
      11             :         S3COMPAT_RPC_DISPATCH_INTERNAL = 0x00000002,
      12             : };
      13             : 
      14             : /* spoolss - dcerpc server boilerplate generated by pidl */
      15          28 : static NTSTATUS spoolss__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      16             : {
      17          28 :         struct pipes_struct *p = NULL;
      18             : 
      19             :         /* Retrieve pipes struct */
      20          28 :         p = dcesrv_get_pipes_struct(context->conn);
      21          28 :         p->pipe_bound = true;
      22             : #ifdef DCESRV_INTERFACE_SPOOLSS_BIND
      23             :         return DCESRV_INTERFACE_SPOOLSS_BIND(context,iface);
      24             : #else
      25          28 :         return NT_STATUS_OK;
      26             : #endif
      27             : }
      28             : 
      29          20 : static void spoolss__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
      30             : {
      31             : #ifdef DCESRV_INTERFACE_SPOOLSS_UNBIND
      32             :         DCESRV_INTERFACE_SPOOLSS_UNBIND(context, iface);
      33             : #else
      34          20 :         return;
      35             : #endif
      36             : }
      37             : 
      38       35014 : NTSTATUS spoolss__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
      39             : {
      40             :         enum ndr_err_code ndr_err;
      41       35014 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      42             : 
      43       35014 :         dce_call->fault_code = 0;
      44             : 
      45       35014 :         if (opnum >= ndr_table_spoolss.num_calls) {
      46           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
      47           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      48             :         }
      49             : 
      50       35014 :         *r = talloc_named(mem_ctx, ndr_table_spoolss.calls[opnum].struct_size, "struct %s", ndr_table_spoolss.calls[opnum].name);
      51       35014 :         NT_STATUS_HAVE_NO_MEMORY(*r);
      52             : 
      53             :         /* unravel the NDR for the packet */
      54       35014 :         ndr_err = ndr_table_spoolss.calls[opnum].ndr_pull(pull, NDR_IN, *r);
      55       35014 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
      56           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
      57           0 :                 return NT_STATUS_NET_WRITE_FAULT;
      58             :         }
      59             : 
      60       35014 :         return NT_STATUS_OK;
      61             : }
      62             : 
      63       35014 : static NTSTATUS spoolss__op_dispatch_internal(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, enum s3compat_rpc_dispatch dispatch)
      64             : {
      65       35014 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
      66       35014 :         struct pipes_struct *p = NULL;
      67       35014 :         struct auth_session_info *pipe_session_info = NULL;
      68       35014 :         NTSTATUS status = NT_STATUS_OK;
      69       35014 :         bool impersonated = false;
      70             : 
      71             :         /* Retrieve pipes struct */
      72       35014 :         p = dcesrv_get_pipes_struct(dce_call->conn);
      73             :         /* Update pipes struct opnum */
      74       35014 :         p->opnum = opnum;
      75       35014 :         p->dce_call = dce_call;
      76       35014 :         p->mem_ctx = mem_ctx;
      77             :         /* Update pipes struct session info */
      78       35014 :         pipe_session_info = p->session_info;
      79       35014 :         p->session_info = dce_call->auth_state->session_info;
      80       35014 :         p->auth.auth_type = dce_call->auth_state->auth_type;
      81       35014 :         p->auth.auth_level = dce_call->auth_state->auth_level;
      82       35014 :         p->auth.auth_context_id = dce_call->auth_state->auth_context_id;
      83             :         /* Reset pipes struct fault state */
      84       35014 :         p->fault_state = 0;
      85             : 
      86             :         /* Impersonate */
      87       35014 :         if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {
      88       34948 :                 impersonated = become_authenticated_pipe_user(p->session_info);
      89       34948 :                 if (!impersonated) {
      90           0 :                         dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
      91           0 :                         status = NT_STATUS_NET_WRITE_FAULT;
      92           0 :                         goto fail;
      93             :                 }
      94             :         }
      95             : 
      96       35014 :         switch (opnum) {
      97         164 :         case 0: { /* spoolss_EnumPrinters */
      98         164 :                 struct spoolss_EnumPrinters *r2 = (struct spoolss_EnumPrinters *)r;
      99         164 :                 if (DEBUGLEVEL >= 10) {
     100           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinters, NDR_IN, r2);
     101             :                 }
     102         164 :                 NDR_ZERO_STRUCT(r2->out);
     103         164 :                 r2->out.count = talloc_zero(r2, uint32_t);
     104         164 :                 if (r2->out.count == NULL) {
     105           0 :                         status = NT_STATUS_NO_MEMORY;
     106           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     107           0 :                         goto fail;
     108             :                 }
     109             : 
     110         164 :                 r2->out.info = talloc_zero(r2, union spoolss_PrinterInfo *);
     111         164 :                 if (r2->out.info == NULL) {
     112           0 :                         status = NT_STATUS_NO_MEMORY;
     113           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     114           0 :                         goto fail;
     115             :                 }
     116             : 
     117         164 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     118         164 :                 if (r2->out.needed == NULL) {
     119           0 :                         status = NT_STATUS_NO_MEMORY;
     120           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     121           0 :                         goto fail;
     122             :                 }
     123             : 
     124         164 :                 r2->out.result = _spoolss_EnumPrinters(p, r2);
     125         164 :                 break;
     126             :         }
     127         166 :         case 1: { /* spoolss_OpenPrinter */
     128         166 :                 struct spoolss_OpenPrinter *r2 = (struct spoolss_OpenPrinter *)r;
     129         166 :                 if (DEBUGLEVEL >= 10) {
     130           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_OpenPrinter, NDR_IN, r2);
     131             :                 }
     132         166 :                 NDR_ZERO_STRUCT(r2->out);
     133         166 :                 r2->out.handle = talloc_zero(r2, struct policy_handle);
     134         166 :                 if (r2->out.handle == NULL) {
     135           0 :                         status = NT_STATUS_NO_MEMORY;
     136           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     137           0 :                         goto fail;
     138             :                 }
     139             : 
     140         166 :                 r2->out.result = _spoolss_OpenPrinter(p, r2);
     141         166 :                 break;
     142             :         }
     143         640 :         case 2: { /* spoolss_SetJob */
     144         640 :                 struct spoolss_SetJob *r2 = (struct spoolss_SetJob *)r;
     145         640 :                 if (DEBUGLEVEL >= 10) {
     146           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetJob, NDR_IN, r2);
     147             :                 }
     148         640 :                 r2->out.result = _spoolss_SetJob(p, r2);
     149         640 :                 break;
     150             :         }
     151        2048 :         case 3: { /* spoolss_GetJob */
     152        2048 :                 struct spoolss_GetJob *r2 = (struct spoolss_GetJob *)r;
     153        2048 :                 if (DEBUGLEVEL >= 10) {
     154           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetJob, NDR_IN, r2);
     155             :                 }
     156        2048 :                 NDR_ZERO_STRUCT(r2->out);
     157        2048 :                 r2->out.info = talloc_zero(r2, union spoolss_JobInfo);
     158        2048 :                 if (r2->out.info == NULL) {
     159           0 :                         status = NT_STATUS_NO_MEMORY;
     160           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     161           0 :                         goto fail;
     162             :                 }
     163             : 
     164        2048 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     165        2048 :                 if (r2->out.needed == NULL) {
     166           0 :                         status = NT_STATUS_NO_MEMORY;
     167           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     168           0 :                         goto fail;
     169             :                 }
     170             : 
     171        2048 :                 r2->out.result = _spoolss_GetJob(p, r2);
     172        2048 :                 break;
     173             :         }
     174          88 :         case 4: { /* spoolss_EnumJobs */
     175          88 :                 struct spoolss_EnumJobs *r2 = (struct spoolss_EnumJobs *)r;
     176          88 :                 if (DEBUGLEVEL >= 10) {
     177           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumJobs, NDR_IN, r2);
     178             :                 }
     179          88 :                 NDR_ZERO_STRUCT(r2->out);
     180          88 :                 r2->out.count = talloc_zero(r2, uint32_t);
     181          88 :                 if (r2->out.count == NULL) {
     182           0 :                         status = NT_STATUS_NO_MEMORY;
     183           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     184           0 :                         goto fail;
     185             :                 }
     186             : 
     187          88 :                 r2->out.info = talloc_zero(r2, union spoolss_JobInfo *);
     188          88 :                 if (r2->out.info == NULL) {
     189           0 :                         status = NT_STATUS_NO_MEMORY;
     190           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     191           0 :                         goto fail;
     192             :                 }
     193             : 
     194          88 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     195          88 :                 if (r2->out.needed == NULL) {
     196           0 :                         status = NT_STATUS_NO_MEMORY;
     197           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     198           0 :                         goto fail;
     199             :                 }
     200             : 
     201          88 :                 r2->out.result = _spoolss_EnumJobs(p, r2);
     202          88 :                 break;
     203             :         }
     204          72 :         case 5: { /* spoolss_AddPrinter */
     205          72 :                 struct spoolss_AddPrinter *r2 = (struct spoolss_AddPrinter *)r;
     206          72 :                 if (DEBUGLEVEL >= 10) {
     207           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinter, NDR_IN, r2);
     208             :                 }
     209          72 :                 NDR_ZERO_STRUCT(r2->out);
     210          72 :                 r2->out.handle = talloc_zero(r2, struct policy_handle);
     211          72 :                 if (r2->out.handle == NULL) {
     212           0 :                         status = NT_STATUS_NO_MEMORY;
     213           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     214           0 :                         goto fail;
     215             :                 }
     216             : 
     217          72 :                 r2->out.result = _spoolss_AddPrinter(p, r2);
     218          72 :                 break;
     219             :         }
     220          16 :         case 6: { /* spoolss_DeletePrinter */
     221          16 :                 struct spoolss_DeletePrinter *r2 = (struct spoolss_DeletePrinter *)r;
     222          16 :                 if (DEBUGLEVEL >= 10) {
     223           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinter, NDR_IN, r2);
     224             :                 }
     225          16 :                 r2->out.result = _spoolss_DeletePrinter(p, r2);
     226          12 :                 break;
     227             :         }
     228         584 :         case 7: { /* spoolss_SetPrinter */
     229         584 :                 struct spoolss_SetPrinter *r2 = (struct spoolss_SetPrinter *)r;
     230         584 :                 if (DEBUGLEVEL >= 10) {
     231           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPrinter, NDR_IN, r2);
     232             :                 }
     233         584 :                 r2->out.result = _spoolss_SetPrinter(p, r2);
     234         584 :                 break;
     235             :         }
     236        3480 :         case 8: { /* spoolss_GetPrinter */
     237        3480 :                 struct spoolss_GetPrinter *r2 = (struct spoolss_GetPrinter *)r;
     238        3480 :                 if (DEBUGLEVEL >= 10) {
     239           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinter, NDR_IN, r2);
     240             :                 }
     241        3480 :                 NDR_ZERO_STRUCT(r2->out);
     242        3480 :                 r2->out.info = talloc_zero(r2, union spoolss_PrinterInfo);
     243        3480 :                 if (r2->out.info == NULL) {
     244           0 :                         status = NT_STATUS_NO_MEMORY;
     245           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     246           0 :                         goto fail;
     247             :                 }
     248             : 
     249        3480 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     250        3480 :                 if (r2->out.needed == NULL) {
     251           0 :                         status = NT_STATUS_NO_MEMORY;
     252           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     253           0 :                         goto fail;
     254             :                 }
     255             : 
     256        3480 :                 r2->out.result = _spoolss_GetPrinter(p, r2);
     257        3480 :                 break;
     258             :         }
     259           0 :         case 9: { /* spoolss_AddPrinterDriver */
     260           0 :                 struct spoolss_AddPrinterDriver *r2 = (struct spoolss_AddPrinterDriver *)r;
     261           0 :                 if (DEBUGLEVEL >= 10) {
     262           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterDriver, NDR_IN, r2);
     263             :                 }
     264           0 :                 r2->out.result = _spoolss_AddPrinterDriver(p, r2);
     265           0 :                 break;
     266             :         }
     267         108 :         case 10: { /* spoolss_EnumPrinterDrivers */
     268         108 :                 struct spoolss_EnumPrinterDrivers *r2 = (struct spoolss_EnumPrinterDrivers *)r;
     269         108 :                 if (DEBUGLEVEL >= 10) {
     270           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterDrivers, NDR_IN, r2);
     271             :                 }
     272         108 :                 NDR_ZERO_STRUCT(r2->out);
     273         108 :                 r2->out.count = talloc_zero(r2, uint32_t);
     274         108 :                 if (r2->out.count == NULL) {
     275           0 :                         status = NT_STATUS_NO_MEMORY;
     276           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     277           0 :                         goto fail;
     278             :                 }
     279             : 
     280         108 :                 r2->out.info = talloc_zero(r2, union spoolss_DriverInfo *);
     281         108 :                 if (r2->out.info == NULL) {
     282           0 :                         status = NT_STATUS_NO_MEMORY;
     283           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     284           0 :                         goto fail;
     285             :                 }
     286             : 
     287         108 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     288         108 :                 if (r2->out.needed == NULL) {
     289           0 :                         status = NT_STATUS_NO_MEMORY;
     290           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     291           0 :                         goto fail;
     292             :                 }
     293             : 
     294         108 :                 r2->out.result = _spoolss_EnumPrinterDrivers(p, r2);
     295         108 :                 break;
     296             :         }
     297           0 :         case 11: { /* spoolss_GetPrinterDriver */
     298           0 :                 struct spoolss_GetPrinterDriver *r2 = (struct spoolss_GetPrinterDriver *)r;
     299           0 :                 if (DEBUGLEVEL >= 10) {
     300           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriver, NDR_IN, r2);
     301             :                 }
     302           0 :                 NDR_ZERO_STRUCT(r2->out);
     303           0 :                 r2->out.info = talloc_zero(r2, union spoolss_DriverInfo);
     304           0 :                 if (r2->out.info == NULL) {
     305           0 :                         status = NT_STATUS_NO_MEMORY;
     306           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     307           0 :                         goto fail;
     308             :                 }
     309             : 
     310           0 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     311           0 :                 if (r2->out.needed == NULL) {
     312           0 :                         status = NT_STATUS_NO_MEMORY;
     313           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     314           0 :                         goto fail;
     315             :                 }
     316             : 
     317           0 :                 r2->out.result = _spoolss_GetPrinterDriver(p, r2);
     318           0 :                 break;
     319             :         }
     320         112 :         case 12: { /* spoolss_GetPrinterDriverDirectory */
     321         112 :                 struct spoolss_GetPrinterDriverDirectory *r2 = (struct spoolss_GetPrinterDriverDirectory *)r;
     322         112 :                 if (DEBUGLEVEL >= 10) {
     323           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriverDirectory, NDR_IN, r2);
     324             :                 }
     325         112 :                 NDR_ZERO_STRUCT(r2->out);
     326         112 :                 r2->out.info = talloc_zero(r2, union spoolss_DriverDirectoryInfo);
     327         112 :                 if (r2->out.info == NULL) {
     328           0 :                         status = NT_STATUS_NO_MEMORY;
     329           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     330           0 :                         goto fail;
     331             :                 }
     332             : 
     333         112 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     334         112 :                 if (r2->out.needed == NULL) {
     335           0 :                         status = NT_STATUS_NO_MEMORY;
     336           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     337           0 :                         goto fail;
     338             :                 }
     339             : 
     340         112 :                 r2->out.result = _spoolss_GetPrinterDriverDirectory(p, r2);
     341         112 :                 break;
     342             :         }
     343           0 :         case 13: { /* spoolss_DeletePrinterDriver */
     344           0 :                 struct spoolss_DeletePrinterDriver *r2 = (struct spoolss_DeletePrinterDriver *)r;
     345           0 :                 if (DEBUGLEVEL >= 10) {
     346           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterDriver, NDR_IN, r2);
     347             :                 }
     348           0 :                 r2->out.result = _spoolss_DeletePrinterDriver(p, r2);
     349           0 :                 break;
     350             :         }
     351           4 :         case 14: { /* spoolss_AddPrintProcessor */
     352           4 :                 struct spoolss_AddPrintProcessor *r2 = (struct spoolss_AddPrintProcessor *)r;
     353           4 :                 if (DEBUGLEVEL >= 10) {
     354           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrintProcessor, NDR_IN, r2);
     355             :                 }
     356           4 :                 r2->out.result = _spoolss_AddPrintProcessor(p, r2);
     357           4 :                 break;
     358             :         }
     359          48 :         case 15: { /* spoolss_EnumPrintProcessors */
     360          48 :                 struct spoolss_EnumPrintProcessors *r2 = (struct spoolss_EnumPrintProcessors *)r;
     361          48 :                 if (DEBUGLEVEL >= 10) {
     362           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrintProcessors, NDR_IN, r2);
     363             :                 }
     364          48 :                 NDR_ZERO_STRUCT(r2->out);
     365          48 :                 r2->out.count = talloc_zero(r2, uint32_t);
     366          48 :                 if (r2->out.count == NULL) {
     367           0 :                         status = NT_STATUS_NO_MEMORY;
     368           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     369           0 :                         goto fail;
     370             :                 }
     371             : 
     372          48 :                 r2->out.info = talloc_zero(r2, union spoolss_PrintProcessorInfo *);
     373          48 :                 if (r2->out.info == NULL) {
     374           0 :                         status = NT_STATUS_NO_MEMORY;
     375           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     376           0 :                         goto fail;
     377             :                 }
     378             : 
     379          48 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     380          48 :                 if (r2->out.needed == NULL) {
     381           0 :                         status = NT_STATUS_NO_MEMORY;
     382           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     383           0 :                         goto fail;
     384             :                 }
     385             : 
     386          48 :                 r2->out.result = _spoolss_EnumPrintProcessors(p, r2);
     387          48 :                 break;
     388             :         }
     389          40 :         case 16: { /* spoolss_GetPrintProcessorDirectory */
     390          40 :                 struct spoolss_GetPrintProcessorDirectory *r2 = (struct spoolss_GetPrintProcessorDirectory *)r;
     391          40 :                 if (DEBUGLEVEL >= 10) {
     392           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrintProcessorDirectory, NDR_IN, r2);
     393             :                 }
     394          40 :                 NDR_ZERO_STRUCT(r2->out);
     395          40 :                 r2->out.info = talloc_zero(r2, union spoolss_PrintProcessorDirectoryInfo);
     396          40 :                 if (r2->out.info == NULL) {
     397           0 :                         status = NT_STATUS_NO_MEMORY;
     398           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     399           0 :                         goto fail;
     400             :                 }
     401             : 
     402          40 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     403          40 :                 if (r2->out.needed == NULL) {
     404           0 :                         status = NT_STATUS_NO_MEMORY;
     405           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     406           0 :                         goto fail;
     407             :                 }
     408             : 
     409          40 :                 r2->out.result = _spoolss_GetPrintProcessorDirectory(p, r2);
     410          40 :                 break;
     411             :         }
     412         668 :         case 17: { /* spoolss_StartDocPrinter */
     413         668 :                 struct spoolss_StartDocPrinter *r2 = (struct spoolss_StartDocPrinter *)r;
     414         668 :                 if (DEBUGLEVEL >= 10) {
     415           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_StartDocPrinter, NDR_IN, r2);
     416             :                 }
     417         668 :                 NDR_ZERO_STRUCT(r2->out);
     418         668 :                 r2->out.job_id = talloc_zero(r2, uint32_t);
     419         668 :                 if (r2->out.job_id == NULL) {
     420           0 :                         status = NT_STATUS_NO_MEMORY;
     421           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     422           0 :                         goto fail;
     423             :                 }
     424             : 
     425         668 :                 r2->out.result = _spoolss_StartDocPrinter(p, r2);
     426         668 :                 break;
     427             :         }
     428        1920 :         case 18: { /* spoolss_StartPagePrinter */
     429        1920 :                 struct spoolss_StartPagePrinter *r2 = (struct spoolss_StartPagePrinter *)r;
     430        1920 :                 if (DEBUGLEVEL >= 10) {
     431           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_StartPagePrinter, NDR_IN, r2);
     432             :                 }
     433        1920 :                 r2->out.result = _spoolss_StartPagePrinter(p, r2);
     434        1920 :                 break;
     435             :         }
     436        1920 :         case 19: { /* spoolss_WritePrinter */
     437        1920 :                 struct spoolss_WritePrinter *r2 = (struct spoolss_WritePrinter *)r;
     438        1920 :                 if (DEBUGLEVEL >= 10) {
     439           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_WritePrinter, NDR_IN, r2);
     440             :                 }
     441        1920 :                 NDR_ZERO_STRUCT(r2->out);
     442        1920 :                 r2->out.num_written = talloc_zero(r2, uint32_t);
     443        1920 :                 if (r2->out.num_written == NULL) {
     444           0 :                         status = NT_STATUS_NO_MEMORY;
     445           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     446           0 :                         goto fail;
     447             :                 }
     448             : 
     449        1920 :                 r2->out.result = _spoolss_WritePrinter(p, r2);
     450        1920 :                 break;
     451             :         }
     452        1920 :         case 20: { /* spoolss_EndPagePrinter */
     453        1920 :                 struct spoolss_EndPagePrinter *r2 = (struct spoolss_EndPagePrinter *)r;
     454        1920 :                 if (DEBUGLEVEL >= 10) {
     455           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EndPagePrinter, NDR_IN, r2);
     456             :                 }
     457        1920 :                 r2->out.result = _spoolss_EndPagePrinter(p, r2);
     458        1920 :                 break;
     459             :         }
     460           0 :         case 21: { /* spoolss_AbortPrinter */
     461           0 :                 struct spoolss_AbortPrinter *r2 = (struct spoolss_AbortPrinter *)r;
     462           0 :                 if (DEBUGLEVEL >= 10) {
     463           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AbortPrinter, NDR_IN, r2);
     464             :                 }
     465           0 :                 r2->out.result = _spoolss_AbortPrinter(p, r2);
     466           0 :                 break;
     467             :         }
     468           0 :         case 22: { /* spoolss_ReadPrinter */
     469           0 :                 struct spoolss_ReadPrinter *r2 = (struct spoolss_ReadPrinter *)r;
     470           0 :                 if (DEBUGLEVEL >= 10) {
     471           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ReadPrinter, NDR_IN, r2);
     472             :                 }
     473           0 :                 NDR_ZERO_STRUCT(r2->out);
     474           0 :                 r2->out.data = talloc_zero_array(r2, uint8_t, r2->in.data_size);
     475           0 :                 if (r2->out.data == NULL) {
     476           0 :                         status = NT_STATUS_NO_MEMORY;
     477           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     478           0 :                         goto fail;
     479             :                 }
     480             : 
     481           0 :                 r2->out._data_size = talloc_zero(r2, uint32_t);
     482           0 :                 if (r2->out._data_size == NULL) {
     483           0 :                         status = NT_STATUS_NO_MEMORY;
     484           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     485           0 :                         goto fail;
     486             :                 }
     487             : 
     488           0 :                 r2->out.result = _spoolss_ReadPrinter(p, r2);
     489           0 :                 break;
     490             :         }
     491         640 :         case 23: { /* spoolss_EndDocPrinter */
     492         640 :                 struct spoolss_EndDocPrinter *r2 = (struct spoolss_EndDocPrinter *)r;
     493         640 :                 if (DEBUGLEVEL >= 10) {
     494           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EndDocPrinter, NDR_IN, r2);
     495             :                 }
     496         640 :                 r2->out.result = _spoolss_EndDocPrinter(p, r2);
     497         640 :                 break;
     498             :         }
     499          16 :         case 24: { /* spoolss_AddJob */
     500          16 :                 struct spoolss_AddJob *r2 = (struct spoolss_AddJob *)r;
     501          16 :                 if (DEBUGLEVEL >= 10) {
     502           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddJob, NDR_IN, r2);
     503             :                 }
     504          16 :                 NDR_ZERO_STRUCT(r2->out);
     505          16 :                 r2->out.buffer = r2->in.buffer;
     506          16 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     507          16 :                 if (r2->out.needed == NULL) {
     508           0 :                         status = NT_STATUS_NO_MEMORY;
     509           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     510           0 :                         goto fail;
     511             :                 }
     512             : 
     513          16 :                 r2->out.result = _spoolss_AddJob(p, r2);
     514          16 :                 break;
     515             :         }
     516           0 :         case 25: { /* spoolss_ScheduleJob */
     517           0 :                 struct spoolss_ScheduleJob *r2 = (struct spoolss_ScheduleJob *)r;
     518           0 :                 if (DEBUGLEVEL >= 10) {
     519           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ScheduleJob, NDR_IN, r2);
     520             :                 }
     521           0 :                 r2->out.result = _spoolss_ScheduleJob(p, r2);
     522           0 :                 break;
     523             :         }
     524         424 :         case 26: { /* spoolss_GetPrinterData */
     525         424 :                 struct spoolss_GetPrinterData *r2 = (struct spoolss_GetPrinterData *)r;
     526         424 :                 if (DEBUGLEVEL >= 10) {
     527           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterData, NDR_IN, r2);
     528             :                 }
     529         424 :                 NDR_ZERO_STRUCT(r2->out);
     530         424 :                 r2->out.type = talloc_zero(r2, enum winreg_Type);
     531         424 :                 if (r2->out.type == NULL) {
     532           0 :                         status = NT_STATUS_NO_MEMORY;
     533           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     534           0 :                         goto fail;
     535             :                 }
     536             : 
     537         424 :                 r2->out.data = talloc_zero_array(r2, uint8_t, r2->in.offered);
     538         424 :                 if (r2->out.data == NULL) {
     539           0 :                         status = NT_STATUS_NO_MEMORY;
     540           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     541           0 :                         goto fail;
     542             :                 }
     543             : 
     544         424 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     545         424 :                 if (r2->out.needed == NULL) {
     546           0 :                         status = NT_STATUS_NO_MEMORY;
     547           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     548           0 :                         goto fail;
     549             :                 }
     550             : 
     551         424 :                 r2->out.result = _spoolss_GetPrinterData(p, r2);
     552         424 :                 break;
     553             :         }
     554         168 :         case 27: { /* spoolss_SetPrinterData */
     555         168 :                 struct spoolss_SetPrinterData *r2 = (struct spoolss_SetPrinterData *)r;
     556         168 :                 if (DEBUGLEVEL >= 10) {
     557           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPrinterData, NDR_IN, r2);
     558             :                 }
     559         168 :                 r2->out.result = _spoolss_SetPrinterData(p, r2);
     560         168 :                 break;
     561             :         }
     562           0 :         case 28: { /* spoolss_WaitForPrinterChange */
     563           0 :                 struct spoolss_WaitForPrinterChange *r2 = (struct spoolss_WaitForPrinterChange *)r;
     564           0 :                 if (DEBUGLEVEL >= 10) {
     565           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_WaitForPrinterChange, NDR_IN, r2);
     566             :                 }
     567           0 :                 r2->out.result = _spoolss_WaitForPrinterChange(p, r2);
     568           0 :                 break;
     569             :         }
     570         582 :         case 29: { /* spoolss_ClosePrinter */
     571         582 :                 struct spoolss_ClosePrinter *r2 = (struct spoolss_ClosePrinter *)r;
     572         582 :                 if (DEBUGLEVEL >= 10) {
     573           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ClosePrinter, NDR_IN, r2);
     574             :                 }
     575         582 :                 NDR_ZERO_STRUCT(r2->out);
     576         582 :                 r2->out.handle = r2->in.handle;
     577         582 :                 r2->out.result = _spoolss_ClosePrinter(p, r2);
     578         578 :                 break;
     579             :         }
     580         576 :         case 30: { /* spoolss_AddForm */
     581         576 :                 struct spoolss_AddForm *r2 = (struct spoolss_AddForm *)r;
     582         576 :                 if (DEBUGLEVEL >= 10) {
     583           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddForm, NDR_IN, r2);
     584             :                 }
     585         576 :                 r2->out.result = _spoolss_AddForm(p, r2);
     586         576 :                 break;
     587             :         }
     588         384 :         case 31: { /* spoolss_DeleteForm */
     589         384 :                 struct spoolss_DeleteForm *r2 = (struct spoolss_DeleteForm *)r;
     590         384 :                 if (DEBUGLEVEL >= 10) {
     591           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeleteForm, NDR_IN, r2);
     592             :                 }
     593         384 :                 r2->out.result = _spoolss_DeleteForm(p, r2);
     594         384 :                 break;
     595             :         }
     596        5040 :         case 32: { /* spoolss_GetForm */
     597        5040 :                 struct spoolss_GetForm *r2 = (struct spoolss_GetForm *)r;
     598        5040 :                 if (DEBUGLEVEL >= 10) {
     599           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetForm, NDR_IN, r2);
     600             :                 }
     601        5040 :                 NDR_ZERO_STRUCT(r2->out);
     602        5040 :                 r2->out.info = talloc_zero(r2, union spoolss_FormInfo);
     603        5040 :                 if (r2->out.info == NULL) {
     604           0 :                         status = NT_STATUS_NO_MEMORY;
     605           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     606           0 :                         goto fail;
     607             :                 }
     608             : 
     609        5040 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     610        5040 :                 if (r2->out.needed == NULL) {
     611           0 :                         status = NT_STATUS_NO_MEMORY;
     612           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     613           0 :                         goto fail;
     614             :                 }
     615             : 
     616        5040 :                 r2->out.result = _spoolss_GetForm(p, r2);
     617        5040 :                 break;
     618             :         }
     619          80 :         case 33: { /* spoolss_SetForm */
     620          80 :                 struct spoolss_SetForm *r2 = (struct spoolss_SetForm *)r;
     621          80 :                 if (DEBUGLEVEL >= 10) {
     622           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetForm, NDR_IN, r2);
     623             :                 }
     624          80 :                 r2->out.result = _spoolss_SetForm(p, r2);
     625          80 :                 break;
     626             :         }
     627         560 :         case 34: { /* spoolss_EnumForms */
     628         560 :                 struct spoolss_EnumForms *r2 = (struct spoolss_EnumForms *)r;
     629         560 :                 if (DEBUGLEVEL >= 10) {
     630           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumForms, NDR_IN, r2);
     631             :                 }
     632         560 :                 NDR_ZERO_STRUCT(r2->out);
     633         560 :                 r2->out.count = talloc_zero(r2, uint32_t);
     634         560 :                 if (r2->out.count == NULL) {
     635           0 :                         status = NT_STATUS_NO_MEMORY;
     636           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     637           0 :                         goto fail;
     638             :                 }
     639             : 
     640         560 :                 r2->out.info = talloc_zero(r2, union spoolss_FormInfo *);
     641         560 :                 if (r2->out.info == NULL) {
     642           0 :                         status = NT_STATUS_NO_MEMORY;
     643           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     644           0 :                         goto fail;
     645             :                 }
     646             : 
     647         560 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     648         560 :                 if (r2->out.needed == NULL) {
     649           0 :                         status = NT_STATUS_NO_MEMORY;
     650           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     651           0 :                         goto fail;
     652             :                 }
     653             : 
     654         560 :                 r2->out.result = _spoolss_EnumForms(p, r2);
     655         560 :                 break;
     656             :         }
     657          24 :         case 35: { /* spoolss_EnumPorts */
     658          24 :                 struct spoolss_EnumPorts *r2 = (struct spoolss_EnumPorts *)r;
     659          24 :                 if (DEBUGLEVEL >= 10) {
     660           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPorts, NDR_IN, r2);
     661             :                 }
     662          24 :                 NDR_ZERO_STRUCT(r2->out);
     663          24 :                 r2->out.count = talloc_zero(r2, uint32_t);
     664          24 :                 if (r2->out.count == NULL) {
     665           0 :                         status = NT_STATUS_NO_MEMORY;
     666           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     667           0 :                         goto fail;
     668             :                 }
     669             : 
     670          24 :                 r2->out.info = talloc_zero(r2, union spoolss_PortInfo *);
     671          24 :                 if (r2->out.info == NULL) {
     672           0 :                         status = NT_STATUS_NO_MEMORY;
     673           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     674           0 :                         goto fail;
     675             :                 }
     676             : 
     677          24 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     678          24 :                 if (r2->out.needed == NULL) {
     679           0 :                         status = NT_STATUS_NO_MEMORY;
     680           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     681           0 :                         goto fail;
     682             :                 }
     683             : 
     684          24 :                 r2->out.result = _spoolss_EnumPorts(p, r2);
     685          24 :                 break;
     686             :         }
     687          16 :         case 36: { /* spoolss_EnumMonitors */
     688          16 :                 struct spoolss_EnumMonitors *r2 = (struct spoolss_EnumMonitors *)r;
     689          16 :                 if (DEBUGLEVEL >= 10) {
     690           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumMonitors, NDR_IN, r2);
     691             :                 }
     692          16 :                 NDR_ZERO_STRUCT(r2->out);
     693          16 :                 r2->out.count = talloc_zero(r2, uint32_t);
     694          16 :                 if (r2->out.count == NULL) {
     695           0 :                         status = NT_STATUS_NO_MEMORY;
     696           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     697           0 :                         goto fail;
     698             :                 }
     699             : 
     700          16 :                 r2->out.info = talloc_zero(r2, union spoolss_MonitorInfo *);
     701          16 :                 if (r2->out.info == NULL) {
     702           0 :                         status = NT_STATUS_NO_MEMORY;
     703           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     704           0 :                         goto fail;
     705             :                 }
     706             : 
     707          16 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     708          16 :                 if (r2->out.needed == NULL) {
     709           0 :                         status = NT_STATUS_NO_MEMORY;
     710           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     711           0 :                         goto fail;
     712             :                 }
     713             : 
     714          16 :                 r2->out.result = _spoolss_EnumMonitors(p, r2);
     715          16 :                 break;
     716             :         }
     717           4 :         case 37: { /* spoolss_AddPort */
     718           4 :                 struct spoolss_AddPort *r2 = (struct spoolss_AddPort *)r;
     719           4 :                 if (DEBUGLEVEL >= 10) {
     720           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPort, NDR_IN, r2);
     721             :                 }
     722           4 :                 r2->out.result = _spoolss_AddPort(p, r2);
     723           4 :                 break;
     724             :         }
     725           0 :         case 38: { /* spoolss_ConfigurePort */
     726           0 :                 struct spoolss_ConfigurePort *r2 = (struct spoolss_ConfigurePort *)r;
     727           0 :                 if (DEBUGLEVEL >= 10) {
     728           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ConfigurePort, NDR_IN, r2);
     729             :                 }
     730           0 :                 r2->out.result = _spoolss_ConfigurePort(p, r2);
     731           0 :                 break;
     732             :         }
     733           0 :         case 39: { /* spoolss_DeletePort */
     734           0 :                 struct spoolss_DeletePort *r2 = (struct spoolss_DeletePort *)r;
     735           0 :                 if (DEBUGLEVEL >= 10) {
     736           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePort, NDR_IN, r2);
     737             :                 }
     738           0 :                 r2->out.result = _spoolss_DeletePort(p, r2);
     739           0 :                 break;
     740             :         }
     741           0 :         case 40: { /* spoolss_CreatePrinterIC */
     742           0 :                 struct spoolss_CreatePrinterIC *r2 = (struct spoolss_CreatePrinterIC *)r;
     743           0 :                 if (DEBUGLEVEL >= 10) {
     744           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_CreatePrinterIC, NDR_IN, r2);
     745             :                 }
     746           0 :                 NDR_ZERO_STRUCT(r2->out);
     747           0 :                 r2->out.gdi_handle = talloc_zero(r2, struct policy_handle);
     748           0 :                 if (r2->out.gdi_handle == NULL) {
     749           0 :                         status = NT_STATUS_NO_MEMORY;
     750           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     751           0 :                         goto fail;
     752             :                 }
     753             : 
     754           0 :                 r2->out.result = _spoolss_CreatePrinterIC(p, r2);
     755           0 :                 break;
     756             :         }
     757           0 :         case 41: { /* spoolss_PlayGDIScriptOnPrinterIC */
     758           0 :                 struct spoolss_PlayGDIScriptOnPrinterIC *r2 = (struct spoolss_PlayGDIScriptOnPrinterIC *)r;
     759           0 :                 if (DEBUGLEVEL >= 10) {
     760           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, NDR_IN, r2);
     761             :                 }
     762           0 :                 NDR_ZERO_STRUCT(r2->out);
     763           0 :                 r2->out.pOut = talloc_zero_array(r2, uint8_t, r2->in.cOut);
     764           0 :                 if (r2->out.pOut == NULL) {
     765           0 :                         status = NT_STATUS_NO_MEMORY;
     766           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     767           0 :                         goto fail;
     768             :                 }
     769             : 
     770           0 :                 r2->out.result = _spoolss_PlayGDIScriptOnPrinterIC(p, r2);
     771           0 :                 break;
     772             :         }
     773           0 :         case 42: { /* spoolss_DeletePrinterIC */
     774           0 :                 struct spoolss_DeletePrinterIC *r2 = (struct spoolss_DeletePrinterIC *)r;
     775           0 :                 if (DEBUGLEVEL >= 10) {
     776           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterIC, NDR_IN, r2);
     777             :                 }
     778           0 :                 NDR_ZERO_STRUCT(r2->out);
     779           0 :                 r2->out.gdi_handle = r2->in.gdi_handle;
     780           0 :                 r2->out.result = _spoolss_DeletePrinterIC(p, r2);
     781           0 :                 break;
     782             :         }
     783           0 :         case 43: { /* spoolss_AddPrinterConnection */
     784           0 :                 struct spoolss_AddPrinterConnection *r2 = (struct spoolss_AddPrinterConnection *)r;
     785           0 :                 if (DEBUGLEVEL >= 10) {
     786           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterConnection, NDR_IN, r2);
     787             :                 }
     788           0 :                 r2->out.result = _spoolss_AddPrinterConnection(p, r2);
     789           0 :                 break;
     790             :         }
     791           0 :         case 44: { /* spoolss_DeletePrinterConnection */
     792           0 :                 struct spoolss_DeletePrinterConnection *r2 = (struct spoolss_DeletePrinterConnection *)r;
     793           0 :                 if (DEBUGLEVEL >= 10) {
     794           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterConnection, NDR_IN, r2);
     795             :                 }
     796           0 :                 r2->out.result = _spoolss_DeletePrinterConnection(p, r2);
     797           0 :                 break;
     798             :         }
     799           0 :         case 45: { /* spoolss_PrinterMessageBox */
     800           0 :                 struct spoolss_PrinterMessageBox *r2 = (struct spoolss_PrinterMessageBox *)r;
     801           0 :                 if (DEBUGLEVEL >= 10) {
     802           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_PrinterMessageBox, NDR_IN, r2);
     803             :                 }
     804           0 :                 r2->out.result = _spoolss_PrinterMessageBox(p, r2);
     805           0 :                 break;
     806             :         }
     807           0 :         case 46: { /* spoolss_AddMonitor */
     808           0 :                 struct spoolss_AddMonitor *r2 = (struct spoolss_AddMonitor *)r;
     809           0 :                 if (DEBUGLEVEL >= 10) {
     810           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddMonitor, NDR_IN, r2);
     811             :                 }
     812           0 :                 r2->out.result = _spoolss_AddMonitor(p, r2);
     813           0 :                 break;
     814             :         }
     815           0 :         case 47: { /* spoolss_DeleteMonitor */
     816           0 :                 struct spoolss_DeleteMonitor *r2 = (struct spoolss_DeleteMonitor *)r;
     817           0 :                 if (DEBUGLEVEL >= 10) {
     818           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeleteMonitor, NDR_IN, r2);
     819             :                 }
     820           0 :                 r2->out.result = _spoolss_DeleteMonitor(p, r2);
     821           0 :                 break;
     822             :         }
     823           0 :         case 48: { /* spoolss_DeletePrintProcessor */
     824           0 :                 struct spoolss_DeletePrintProcessor *r2 = (struct spoolss_DeletePrintProcessor *)r;
     825           0 :                 if (DEBUGLEVEL >= 10) {
     826           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrintProcessor, NDR_IN, r2);
     827             :                 }
     828           0 :                 r2->out.result = _spoolss_DeletePrintProcessor(p, r2);
     829           0 :                 break;
     830             :         }
     831           0 :         case 49: { /* spoolss_AddPrintProvidor */
     832           0 :                 struct spoolss_AddPrintProvidor *r2 = (struct spoolss_AddPrintProvidor *)r;
     833           0 :                 if (DEBUGLEVEL >= 10) {
     834           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrintProvidor, NDR_IN, r2);
     835             :                 }
     836           0 :                 r2->out.result = _spoolss_AddPrintProvidor(p, r2);
     837           0 :                 break;
     838             :         }
     839           0 :         case 50: { /* spoolss_DeletePrintProvidor */
     840           0 :                 struct spoolss_DeletePrintProvidor *r2 = (struct spoolss_DeletePrintProvidor *)r;
     841           0 :                 if (DEBUGLEVEL >= 10) {
     842           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrintProvidor, NDR_IN, r2);
     843             :                 }
     844           0 :                 r2->out.result = _spoolss_DeletePrintProvidor(p, r2);
     845           0 :                 break;
     846             :         }
     847          44 :         case 51: { /* spoolss_EnumPrintProcessorDataTypes */
     848          44 :                 struct spoolss_EnumPrintProcessorDataTypes *r2 = (struct spoolss_EnumPrintProcessorDataTypes *)r;
     849          44 :                 if (DEBUGLEVEL >= 10) {
     850           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrintProcessorDataTypes, NDR_IN, r2);
     851             :                 }
     852          44 :                 NDR_ZERO_STRUCT(r2->out);
     853          44 :                 r2->out.count = talloc_zero(r2, uint32_t);
     854          44 :                 if (r2->out.count == NULL) {
     855           0 :                         status = NT_STATUS_NO_MEMORY;
     856           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     857           0 :                         goto fail;
     858             :                 }
     859             : 
     860          44 :                 r2->out.info = talloc_zero(r2, union spoolss_PrintProcDataTypesInfo *);
     861          44 :                 if (r2->out.info == NULL) {
     862           0 :                         status = NT_STATUS_NO_MEMORY;
     863           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     864           0 :                         goto fail;
     865             :                 }
     866             : 
     867          44 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     868          44 :                 if (r2->out.needed == NULL) {
     869           0 :                         status = NT_STATUS_NO_MEMORY;
     870           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     871           0 :                         goto fail;
     872             :                 }
     873             : 
     874          44 :                 r2->out.result = _spoolss_EnumPrintProcessorDataTypes(p, r2);
     875          44 :                 break;
     876             :         }
     877           0 :         case 52: { /* spoolss_ResetPrinter */
     878           0 :                 struct spoolss_ResetPrinter *r2 = (struct spoolss_ResetPrinter *)r;
     879           0 :                 if (DEBUGLEVEL >= 10) {
     880           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ResetPrinter, NDR_IN, r2);
     881             :                 }
     882           0 :                 r2->out.result = _spoolss_ResetPrinter(p, r2);
     883           0 :                 break;
     884             :         }
     885           4 :         case 53: { /* spoolss_GetPrinterDriver2 */
     886           4 :                 struct spoolss_GetPrinterDriver2 *r2 = (struct spoolss_GetPrinterDriver2 *)r;
     887           4 :                 if (DEBUGLEVEL >= 10) {
     888           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriver2, NDR_IN, r2);
     889             :                 }
     890           4 :                 NDR_ZERO_STRUCT(r2->out);
     891           4 :                 r2->out.info = talloc_zero(r2, union spoolss_DriverInfo);
     892           4 :                 if (r2->out.info == NULL) {
     893           0 :                         status = NT_STATUS_NO_MEMORY;
     894           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     895           0 :                         goto fail;
     896             :                 }
     897             : 
     898           4 :                 r2->out.needed = talloc_zero(r2, uint32_t);
     899           4 :                 if (r2->out.needed == NULL) {
     900           0 :                         status = NT_STATUS_NO_MEMORY;
     901           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     902           0 :                         goto fail;
     903             :                 }
     904             : 
     905           4 :                 r2->out.server_major_version = talloc_zero(r2, uint32_t);
     906           4 :                 if (r2->out.server_major_version == NULL) {
     907           0 :                         status = NT_STATUS_NO_MEMORY;
     908           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     909           0 :                         goto fail;
     910             :                 }
     911             : 
     912           4 :                 r2->out.server_minor_version = talloc_zero(r2, uint32_t);
     913           4 :                 if (r2->out.server_minor_version == NULL) {
     914           0 :                         status = NT_STATUS_NO_MEMORY;
     915           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     916           0 :                         goto fail;
     917             :                 }
     918             : 
     919           4 :                 r2->out.result = _spoolss_GetPrinterDriver2(p, r2);
     920           4 :                 break;
     921             :         }
     922           0 :         case 54: { /* spoolss_FindFirstPrinterChangeNotification */
     923           0 :                 struct spoolss_FindFirstPrinterChangeNotification *r2 = (struct spoolss_FindFirstPrinterChangeNotification *)r;
     924           0 :                 if (DEBUGLEVEL >= 10) {
     925           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_FindFirstPrinterChangeNotification, NDR_IN, r2);
     926             :                 }
     927           0 :                 r2->out.result = _spoolss_FindFirstPrinterChangeNotification(p, r2);
     928           0 :                 break;
     929             :         }
     930           0 :         case 55: { /* spoolss_FindNextPrinterChangeNotification */
     931           0 :                 struct spoolss_FindNextPrinterChangeNotification *r2 = (struct spoolss_FindNextPrinterChangeNotification *)r;
     932           0 :                 if (DEBUGLEVEL >= 10) {
     933           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_FindNextPrinterChangeNotification, NDR_IN, r2);
     934             :                 }
     935           0 :                 r2->out.result = _spoolss_FindNextPrinterChangeNotification(p, r2);
     936           0 :                 break;
     937             :         }
     938           0 :         case 56: { /* spoolss_FindClosePrinterNotify */
     939           0 :                 struct spoolss_FindClosePrinterNotify *r2 = (struct spoolss_FindClosePrinterNotify *)r;
     940           0 :                 if (DEBUGLEVEL >= 10) {
     941           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_FindClosePrinterNotify, NDR_IN, r2);
     942             :                 }
     943           0 :                 r2->out.result = _spoolss_FindClosePrinterNotify(p, r2);
     944           0 :                 break;
     945             :         }
     946           0 :         case 57: { /* spoolss_RouterFindFirstPrinterChangeNotificationOld */
     947           0 :                 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r2 = (struct spoolss_RouterFindFirstPrinterChangeNotificationOld *)r;
     948           0 :                 if (DEBUGLEVEL >= 10) {
     949           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, NDR_IN, r2);
     950             :                 }
     951           0 :                 r2->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(p, r2);
     952           0 :                 break;
     953             :         }
     954           0 :         case 58: { /* spoolss_ReplyOpenPrinter */
     955           0 :                 struct spoolss_ReplyOpenPrinter *r2 = (struct spoolss_ReplyOpenPrinter *)r;
     956           0 :                 if (DEBUGLEVEL >= 10) {
     957           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ReplyOpenPrinter, NDR_IN, r2);
     958             :                 }
     959           0 :                 NDR_ZERO_STRUCT(r2->out);
     960           0 :                 r2->out.handle = talloc_zero(r2, struct policy_handle);
     961           0 :                 if (r2->out.handle == NULL) {
     962           0 :                         status = NT_STATUS_NO_MEMORY;
     963           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
     964           0 :                         goto fail;
     965             :                 }
     966             : 
     967           0 :                 r2->out.result = _spoolss_ReplyOpenPrinter(p, r2);
     968           0 :                 break;
     969             :         }
     970           0 :         case 59: { /* spoolss_RouterReplyPrinter */
     971           0 :                 struct spoolss_RouterReplyPrinter *r2 = (struct spoolss_RouterReplyPrinter *)r;
     972           0 :                 if (DEBUGLEVEL >= 10) {
     973           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterReplyPrinter, NDR_IN, r2);
     974             :                 }
     975           0 :                 r2->out.result = _spoolss_RouterReplyPrinter(p, r2);
     976           0 :                 break;
     977             :         }
     978           0 :         case 60: { /* spoolss_ReplyClosePrinter */
     979           0 :                 struct spoolss_ReplyClosePrinter *r2 = (struct spoolss_ReplyClosePrinter *)r;
     980           0 :                 if (DEBUGLEVEL >= 10) {
     981           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ReplyClosePrinter, NDR_IN, r2);
     982             :                 }
     983           0 :                 NDR_ZERO_STRUCT(r2->out);
     984           0 :                 r2->out.handle = r2->in.handle;
     985           0 :                 r2->out.result = _spoolss_ReplyClosePrinter(p, r2);
     986           0 :                 break;
     987             :         }
     988           0 :         case 61: { /* spoolss_AddPortEx */
     989           0 :                 struct spoolss_AddPortEx *r2 = (struct spoolss_AddPortEx *)r;
     990           0 :                 if (DEBUGLEVEL >= 10) {
     991           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPortEx, NDR_IN, r2);
     992             :                 }
     993           0 :                 r2->out.result = _spoolss_AddPortEx(p, r2);
     994           0 :                 break;
     995             :         }
     996           0 :         case 62: { /* spoolss_RouterFindFirstPrinterChangeNotification */
     997           0 :                 struct spoolss_RouterFindFirstPrinterChangeNotification *r2 = (struct spoolss_RouterFindFirstPrinterChangeNotification *)r;
     998           0 :                 if (DEBUGLEVEL >= 10) {
     999           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, NDR_IN, r2);
    1000             :                 }
    1001           0 :                 r2->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(p, r2);
    1002           0 :                 break;
    1003             :         }
    1004           0 :         case 63: { /* spoolss_SpoolerInit */
    1005           0 :                 struct spoolss_SpoolerInit *r2 = (struct spoolss_SpoolerInit *)r;
    1006           0 :                 if (DEBUGLEVEL >= 10) {
    1007           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SpoolerInit, NDR_IN, r2);
    1008             :                 }
    1009           0 :                 r2->out.result = _spoolss_SpoolerInit(p, r2);
    1010           0 :                 break;
    1011             :         }
    1012           0 :         case 64: { /* spoolss_ResetPrinterEx */
    1013           0 :                 struct spoolss_ResetPrinterEx *r2 = (struct spoolss_ResetPrinterEx *)r;
    1014           0 :                 if (DEBUGLEVEL >= 10) {
    1015           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ResetPrinterEx, NDR_IN, r2);
    1016             :                 }
    1017           0 :                 r2->out.result = _spoolss_ResetPrinterEx(p, r2);
    1018           0 :                 break;
    1019             :         }
    1020           2 :         case 65: { /* spoolss_RemoteFindFirstPrinterChangeNotifyEx */
    1021           2 :                 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r2 = (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *)r;
    1022           2 :                 if (DEBUGLEVEL >= 10) {
    1023           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, NDR_IN, r2);
    1024             :                 }
    1025           2 :                 r2->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p, r2);
    1026           2 :                 break;
    1027             :         }
    1028           0 :         case 66: { /* spoolss_RouterReplyPrinterEx */
    1029           0 :                 struct spoolss_RouterReplyPrinterEx *r2 = (struct spoolss_RouterReplyPrinterEx *)r;
    1030           0 :                 if (DEBUGLEVEL >= 10) {
    1031           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterReplyPrinterEx, NDR_IN, r2);
    1032             :                 }
    1033           0 :                 NDR_ZERO_STRUCT(r2->out);
    1034           0 :                 r2->out.reply_result = talloc_zero(r2, uint32_t);
    1035           0 :                 if (r2->out.reply_result == NULL) {
    1036           0 :                         status = NT_STATUS_NO_MEMORY;
    1037           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1038           0 :                         goto fail;
    1039             :                 }
    1040             : 
    1041           0 :                 r2->out.result = _spoolss_RouterReplyPrinterEx(p, r2);
    1042           0 :                 break;
    1043             :         }
    1044           4 :         case 67: { /* spoolss_RouterRefreshPrinterChangeNotify */
    1045           4 :                 struct spoolss_RouterRefreshPrinterChangeNotify *r2 = (struct spoolss_RouterRefreshPrinterChangeNotify *)r;
    1046           4 :                 if (DEBUGLEVEL >= 10) {
    1047           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, NDR_IN, r2);
    1048             :                 }
    1049           4 :                 NDR_ZERO_STRUCT(r2->out);
    1050           4 :                 r2->out.info = talloc_zero(r2, struct spoolss_NotifyInfo *);
    1051           4 :                 if (r2->out.info == NULL) {
    1052           0 :                         status = NT_STATUS_NO_MEMORY;
    1053           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1054           0 :                         goto fail;
    1055             :                 }
    1056             : 
    1057           4 :                 r2->out.result = _spoolss_RouterRefreshPrinterChangeNotify(p, r2);
    1058           4 :                 break;
    1059             :         }
    1060           0 :         case 68: { /* spoolss_44 */
    1061           0 :                 struct spoolss_44 *r2 = (struct spoolss_44 *)r;
    1062           0 :                 if (DEBUGLEVEL >= 10) {
    1063           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_44, NDR_IN, r2);
    1064             :                 }
    1065           0 :                 r2->out.result = _spoolss_44(p, r2);
    1066           0 :                 break;
    1067             :         }
    1068         784 :         case 69: { /* spoolss_OpenPrinterEx */
    1069         784 :                 struct spoolss_OpenPrinterEx *r2 = (struct spoolss_OpenPrinterEx *)r;
    1070         784 :                 if (DEBUGLEVEL >= 10) {
    1071           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_OpenPrinterEx, NDR_IN, r2);
    1072             :                 }
    1073         784 :                 NDR_ZERO_STRUCT(r2->out);
    1074         784 :                 r2->out.handle = talloc_zero(r2, struct policy_handle);
    1075         784 :                 if (r2->out.handle == NULL) {
    1076           0 :                         status = NT_STATUS_NO_MEMORY;
    1077           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1078           0 :                         goto fail;
    1079             :                 }
    1080             : 
    1081         784 :                 r2->out.result = _spoolss_OpenPrinterEx(p, r2);
    1082         784 :                 break;
    1083             :         }
    1084          24 :         case 70: { /* spoolss_AddPrinterEx */
    1085          24 :                 struct spoolss_AddPrinterEx *r2 = (struct spoolss_AddPrinterEx *)r;
    1086          24 :                 if (DEBUGLEVEL >= 10) {
    1087           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterEx, NDR_IN, r2);
    1088             :                 }
    1089          24 :                 NDR_ZERO_STRUCT(r2->out);
    1090          24 :                 r2->out.handle = talloc_zero(r2, struct policy_handle);
    1091          24 :                 if (r2->out.handle == NULL) {
    1092           0 :                         status = NT_STATUS_NO_MEMORY;
    1093           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1094           0 :                         goto fail;
    1095             :                 }
    1096             : 
    1097          24 :                 r2->out.result = _spoolss_AddPrinterEx(p, r2);
    1098          24 :                 break;
    1099             :         }
    1100           0 :         case 71: { /* spoolss_SetPort */
    1101           0 :                 struct spoolss_SetPort *r2 = (struct spoolss_SetPort *)r;
    1102           0 :                 if (DEBUGLEVEL >= 10) {
    1103           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPort, NDR_IN, r2);
    1104             :                 }
    1105           0 :                 r2->out.result = _spoolss_SetPort(p, r2);
    1106           0 :                 break;
    1107             :         }
    1108         152 :         case 72: { /* spoolss_EnumPrinterData */
    1109         152 :                 struct spoolss_EnumPrinterData *r2 = (struct spoolss_EnumPrinterData *)r;
    1110         152 :                 if (DEBUGLEVEL >= 10) {
    1111           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterData, NDR_IN, r2);
    1112             :                 }
    1113         152 :                 NDR_ZERO_STRUCT(r2->out);
    1114         152 :                 r2->out.value_name = talloc_zero_array(r2, const char, r2->in.value_offered / 2);
    1115         152 :                 if (r2->out.value_name == NULL) {
    1116           0 :                         status = NT_STATUS_NO_MEMORY;
    1117           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1118           0 :                         goto fail;
    1119             :                 }
    1120             : 
    1121         152 :                 r2->out.value_needed = talloc_zero(r2, uint32_t);
    1122         152 :                 if (r2->out.value_needed == NULL) {
    1123           0 :                         status = NT_STATUS_NO_MEMORY;
    1124           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1125           0 :                         goto fail;
    1126             :                 }
    1127             : 
    1128         152 :                 r2->out.type = talloc_zero(r2, enum winreg_Type);
    1129         152 :                 if (r2->out.type == NULL) {
    1130           0 :                         status = NT_STATUS_NO_MEMORY;
    1131           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1132           0 :                         goto fail;
    1133             :                 }
    1134             : 
    1135         152 :                 r2->out.data = talloc_zero_array(r2, uint8_t, r2->in.data_offered);
    1136         152 :                 if (r2->out.data == NULL) {
    1137           0 :                         status = NT_STATUS_NO_MEMORY;
    1138           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1139           0 :                         goto fail;
    1140             :                 }
    1141             : 
    1142         152 :                 r2->out.data_needed = talloc_zero(r2, uint32_t);
    1143         152 :                 if (r2->out.data_needed == NULL) {
    1144           0 :                         status = NT_STATUS_NO_MEMORY;
    1145           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1146           0 :                         goto fail;
    1147             :                 }
    1148             : 
    1149         152 :                 r2->out.result = _spoolss_EnumPrinterData(p, r2);
    1150         152 :                 break;
    1151             :         }
    1152         168 :         case 73: { /* spoolss_DeletePrinterData */
    1153         168 :                 struct spoolss_DeletePrinterData *r2 = (struct spoolss_DeletePrinterData *)r;
    1154         168 :                 if (DEBUGLEVEL >= 10) {
    1155           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterData, NDR_IN, r2);
    1156             :                 }
    1157         168 :                 r2->out.result = _spoolss_DeletePrinterData(p, r2);
    1158         168 :                 break;
    1159             :         }
    1160           0 :         case 74: { /* spoolss_4a */
    1161           0 :                 struct spoolss_4a *r2 = (struct spoolss_4a *)r;
    1162           0 :                 if (DEBUGLEVEL >= 10) {
    1163           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_4a, NDR_IN, r2);
    1164             :                 }
    1165           0 :                 r2->out.result = _spoolss_4a(p, r2);
    1166           0 :                 break;
    1167             :         }
    1168           0 :         case 75: { /* spoolss_4b */
    1169           0 :                 struct spoolss_4b *r2 = (struct spoolss_4b *)r;
    1170           0 :                 if (DEBUGLEVEL >= 10) {
    1171           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_4b, NDR_IN, r2);
    1172             :                 }
    1173           0 :                 r2->out.result = _spoolss_4b(p, r2);
    1174           0 :                 break;
    1175             :         }
    1176           0 :         case 76: { /* spoolss_4c */
    1177           0 :                 struct spoolss_4c *r2 = (struct spoolss_4c *)r;
    1178           0 :                 if (DEBUGLEVEL >= 10) {
    1179           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_4c, NDR_IN, r2);
    1180             :                 }
    1181           0 :                 r2->out.result = _spoolss_4c(p, r2);
    1182           0 :                 break;
    1183             :         }
    1184        1200 :         case 77: { /* spoolss_SetPrinterDataEx */
    1185        1200 :                 struct spoolss_SetPrinterDataEx *r2 = (struct spoolss_SetPrinterDataEx *)r;
    1186        1200 :                 if (DEBUGLEVEL >= 10) {
    1187           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPrinterDataEx, NDR_IN, r2);
    1188             :                 }
    1189        1200 :                 r2->out.result = _spoolss_SetPrinterDataEx(p, r2);
    1190        1200 :                 break;
    1191             :         }
    1192        2700 :         case 78: { /* spoolss_GetPrinterDataEx */
    1193        2700 :                 struct spoolss_GetPrinterDataEx *r2 = (struct spoolss_GetPrinterDataEx *)r;
    1194        2700 :                 if (DEBUGLEVEL >= 10) {
    1195           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDataEx, NDR_IN, r2);
    1196             :                 }
    1197        2700 :                 NDR_ZERO_STRUCT(r2->out);
    1198        2700 :                 r2->out.type = talloc_zero(r2, enum winreg_Type);
    1199        2700 :                 if (r2->out.type == NULL) {
    1200           0 :                         status = NT_STATUS_NO_MEMORY;
    1201           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1202           0 :                         goto fail;
    1203             :                 }
    1204             : 
    1205        2700 :                 r2->out.data = talloc_zero_array(r2, uint8_t, r2->in.offered);
    1206        2700 :                 if (r2->out.data == NULL) {
    1207           0 :                         status = NT_STATUS_NO_MEMORY;
    1208           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1209           0 :                         goto fail;
    1210             :                 }
    1211             : 
    1212        2700 :                 r2->out.needed = talloc_zero(r2, uint32_t);
    1213        2700 :                 if (r2->out.needed == NULL) {
    1214           0 :                         status = NT_STATUS_NO_MEMORY;
    1215           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1216           0 :                         goto fail;
    1217             :                 }
    1218             : 
    1219        2700 :                 r2->out.result = _spoolss_GetPrinterDataEx(p, r2);
    1220        2700 :                 break;
    1221             :         }
    1222        2596 :         case 79: { /* spoolss_EnumPrinterDataEx */
    1223        2596 :                 struct spoolss_EnumPrinterDataEx *r2 = (struct spoolss_EnumPrinterDataEx *)r;
    1224        2596 :                 if (DEBUGLEVEL >= 10) {
    1225           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterDataEx, NDR_IN, r2);
    1226             :                 }
    1227        2596 :                 NDR_ZERO_STRUCT(r2->out);
    1228        2596 :                 r2->out.count = talloc_zero(r2, uint32_t);
    1229        2596 :                 if (r2->out.count == NULL) {
    1230           0 :                         status = NT_STATUS_NO_MEMORY;
    1231           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1232           0 :                         goto fail;
    1233             :                 }
    1234             : 
    1235        2596 :                 r2->out.info = talloc_zero(r2, struct spoolss_PrinterEnumValues *);
    1236        2596 :                 if (r2->out.info == NULL) {
    1237           0 :                         status = NT_STATUS_NO_MEMORY;
    1238           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1239           0 :                         goto fail;
    1240             :                 }
    1241             : 
    1242        2596 :                 r2->out.needed = talloc_zero(r2, uint32_t);
    1243        2596 :                 if (r2->out.needed == NULL) {
    1244           0 :                         status = NT_STATUS_NO_MEMORY;
    1245           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1246           0 :                         goto fail;
    1247             :                 }
    1248             : 
    1249        2596 :                 r2->out.result = _spoolss_EnumPrinterDataEx(p, r2);
    1250        2596 :                 break;
    1251             :         }
    1252        3384 :         case 80: { /* spoolss_EnumPrinterKey */
    1253        3384 :                 struct spoolss_EnumPrinterKey *r2 = (struct spoolss_EnumPrinterKey *)r;
    1254        3384 :                 if (DEBUGLEVEL >= 10) {
    1255           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterKey, NDR_IN, r2);
    1256             :                 }
    1257        3384 :                 NDR_ZERO_STRUCT(r2->out);
    1258        3384 :                 r2->out._ndr_size = talloc_zero(r2, uint32_t);
    1259        3384 :                 if (r2->out._ndr_size == NULL) {
    1260           0 :                         status = NT_STATUS_NO_MEMORY;
    1261           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1262           0 :                         goto fail;
    1263             :                 }
    1264             : 
    1265        3384 :                 r2->out.key_buffer = talloc_zero(r2, union spoolss_KeyNames);
    1266        3384 :                 if (r2->out.key_buffer == NULL) {
    1267           0 :                         status = NT_STATUS_NO_MEMORY;
    1268           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1269           0 :                         goto fail;
    1270             :                 }
    1271             : 
    1272        3384 :                 r2->out.needed = talloc_zero(r2, uint32_t);
    1273        3384 :                 if (r2->out.needed == NULL) {
    1274           0 :                         status = NT_STATUS_NO_MEMORY;
    1275           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1276           0 :                         goto fail;
    1277             :                 }
    1278             : 
    1279        3384 :                 r2->out.result = _spoolss_EnumPrinterKey(p, r2);
    1280        3384 :                 break;
    1281             :         }
    1282        1200 :         case 81: { /* spoolss_DeletePrinterDataEx */
    1283        1200 :                 struct spoolss_DeletePrinterDataEx *r2 = (struct spoolss_DeletePrinterDataEx *)r;
    1284        1200 :                 if (DEBUGLEVEL >= 10) {
    1285           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterDataEx, NDR_IN, r2);
    1286             :                 }
    1287        1200 :                 r2->out.result = _spoolss_DeletePrinterDataEx(p, r2);
    1288        1200 :                 break;
    1289             :         }
    1290         216 :         case 82: { /* spoolss_DeletePrinterKey */
    1291         216 :                 struct spoolss_DeletePrinterKey *r2 = (struct spoolss_DeletePrinterKey *)r;
    1292         216 :                 if (DEBUGLEVEL >= 10) {
    1293           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterKey, NDR_IN, r2);
    1294             :                 }
    1295         216 :                 r2->out.result = _spoolss_DeletePrinterKey(p, r2);
    1296         216 :                 break;
    1297             :         }
    1298           0 :         case 83: { /* spoolss_53 */
    1299           0 :                 struct spoolss_53 *r2 = (struct spoolss_53 *)r;
    1300           0 :                 if (DEBUGLEVEL >= 10) {
    1301           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_53, NDR_IN, r2);
    1302             :                 }
    1303           0 :                 r2->out.result = _spoolss_53(p, r2);
    1304           0 :                 break;
    1305             :         }
    1306           0 :         case 84: { /* spoolss_DeletePrinterDriverEx */
    1307           0 :                 struct spoolss_DeletePrinterDriverEx *r2 = (struct spoolss_DeletePrinterDriverEx *)r;
    1308           0 :                 if (DEBUGLEVEL >= 10) {
    1309           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterDriverEx, NDR_IN, r2);
    1310             :                 }
    1311           0 :                 r2->out.result = _spoolss_DeletePrinterDriverEx(p, r2);
    1312           0 :                 break;
    1313             :         }
    1314           4 :         case 85: { /* spoolss_AddPerMachineConnection */
    1315           4 :                 struct spoolss_AddPerMachineConnection *r2 = (struct spoolss_AddPerMachineConnection *)r;
    1316           4 :                 if (DEBUGLEVEL >= 10) {
    1317           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPerMachineConnection, NDR_IN, r2);
    1318             :                 }
    1319           4 :                 r2->out.result = _spoolss_AddPerMachineConnection(p, r2);
    1320           4 :                 break;
    1321             :         }
    1322           0 :         case 86: { /* spoolss_DeletePerMachineConnection */
    1323           0 :                 struct spoolss_DeletePerMachineConnection *r2 = (struct spoolss_DeletePerMachineConnection *)r;
    1324           0 :                 if (DEBUGLEVEL >= 10) {
    1325           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePerMachineConnection, NDR_IN, r2);
    1326             :                 }
    1327           0 :                 r2->out.result = _spoolss_DeletePerMachineConnection(p, r2);
    1328           0 :                 break;
    1329             :         }
    1330           0 :         case 87: { /* spoolss_EnumPerMachineConnections */
    1331           0 :                 struct spoolss_EnumPerMachineConnections *r2 = (struct spoolss_EnumPerMachineConnections *)r;
    1332           0 :                 if (DEBUGLEVEL >= 10) {
    1333           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPerMachineConnections, NDR_IN, r2);
    1334             :                 }
    1335           0 :                 NDR_ZERO_STRUCT(r2->out);
    1336           0 :                 r2->out.count = talloc_zero(r2, uint32_t);
    1337           0 :                 if (r2->out.count == NULL) {
    1338           0 :                         status = NT_STATUS_NO_MEMORY;
    1339           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1340           0 :                         goto fail;
    1341             :                 }
    1342             : 
    1343           0 :                 r2->out.info = talloc_zero(r2, struct spoolss_PrinterInfo4 *);
    1344           0 :                 if (r2->out.info == NULL) {
    1345           0 :                         status = NT_STATUS_NO_MEMORY;
    1346           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1347           0 :                         goto fail;
    1348             :                 }
    1349             : 
    1350           0 :                 r2->out.needed = talloc_zero(r2, uint32_t);
    1351           0 :                 if (r2->out.needed == NULL) {
    1352           0 :                         status = NT_STATUS_NO_MEMORY;
    1353           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1354           0 :                         goto fail;
    1355             :                 }
    1356             : 
    1357           0 :                 r2->out.result = _spoolss_EnumPerMachineConnections(p, r2);
    1358           0 :                 break;
    1359             :         }
    1360           0 :         case 88: { /* spoolss_XcvData */
    1361           0 :                 struct spoolss_XcvData *r2 = (struct spoolss_XcvData *)r;
    1362           0 :                 if (DEBUGLEVEL >= 10) {
    1363           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_XcvData, NDR_IN, r2);
    1364             :                 }
    1365           0 :                 NDR_ZERO_STRUCT(r2->out);
    1366           0 :                 r2->out.status_code = r2->in.status_code;
    1367           0 :                 r2->out.out_data = talloc_zero_array(r2, uint8_t, r2->in.out_data_size);
    1368           0 :                 if (r2->out.out_data == NULL) {
    1369           0 :                         status = NT_STATUS_NO_MEMORY;
    1370           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1371           0 :                         goto fail;
    1372             :                 }
    1373             : 
    1374           0 :                 r2->out.needed = talloc_zero(r2, uint32_t);
    1375           0 :                 if (r2->out.needed == NULL) {
    1376           0 :                         status = NT_STATUS_NO_MEMORY;
    1377           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1378           0 :                         goto fail;
    1379             :                 }
    1380             : 
    1381           0 :                 r2->out.result = _spoolss_XcvData(p, r2);
    1382           0 :                 break;
    1383             :         }
    1384           0 :         case 89: { /* spoolss_AddPrinterDriverEx */
    1385           0 :                 struct spoolss_AddPrinterDriverEx *r2 = (struct spoolss_AddPrinterDriverEx *)r;
    1386           0 :                 if (DEBUGLEVEL >= 10) {
    1387           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterDriverEx, NDR_IN, r2);
    1388             :                 }
    1389           0 :                 r2->out.result = _spoolss_AddPrinterDriverEx(p, r2);
    1390           0 :                 break;
    1391             :         }
    1392           0 :         case 90: { /* spoolss_5a */
    1393           0 :                 struct spoolss_5a *r2 = (struct spoolss_5a *)r;
    1394           0 :                 if (DEBUGLEVEL >= 10) {
    1395           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5a, NDR_IN, r2);
    1396             :                 }
    1397           0 :                 r2->out.result = _spoolss_5a(p, r2);
    1398           0 :                 break;
    1399             :         }
    1400           0 :         case 91: { /* spoolss_5b */
    1401           0 :                 struct spoolss_5b *r2 = (struct spoolss_5b *)r;
    1402           0 :                 if (DEBUGLEVEL >= 10) {
    1403           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5b, NDR_IN, r2);
    1404             :                 }
    1405           0 :                 r2->out.result = _spoolss_5b(p, r2);
    1406           0 :                 break;
    1407             :         }
    1408           0 :         case 92: { /* spoolss_5c */
    1409           0 :                 struct spoolss_5c *r2 = (struct spoolss_5c *)r;
    1410           0 :                 if (DEBUGLEVEL >= 10) {
    1411           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5c, NDR_IN, r2);
    1412             :                 }
    1413           0 :                 r2->out.result = _spoolss_5c(p, r2);
    1414           0 :                 break;
    1415             :         }
    1416           0 :         case 93: { /* spoolss_5d */
    1417           0 :                 struct spoolss_5d *r2 = (struct spoolss_5d *)r;
    1418           0 :                 if (DEBUGLEVEL >= 10) {
    1419           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5d, NDR_IN, r2);
    1420             :                 }
    1421           0 :                 r2->out.result = _spoolss_5d(p, r2);
    1422           0 :                 break;
    1423             :         }
    1424           0 :         case 94: { /* spoolss_5e */
    1425           0 :                 struct spoolss_5e *r2 = (struct spoolss_5e *)r;
    1426           0 :                 if (DEBUGLEVEL >= 10) {
    1427           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5e, NDR_IN, r2);
    1428             :                 }
    1429           0 :                 r2->out.result = _spoolss_5e(p, r2);
    1430           0 :                 break;
    1431             :         }
    1432           0 :         case 95: { /* spoolss_5f */
    1433           0 :                 struct spoolss_5f *r2 = (struct spoolss_5f *)r;
    1434           0 :                 if (DEBUGLEVEL >= 10) {
    1435           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5f, NDR_IN, r2);
    1436             :                 }
    1437           0 :                 r2->out.result = _spoolss_5f(p, r2);
    1438           0 :                 break;
    1439             :         }
    1440           0 :         case 96: { /* spoolss_60 */
    1441           0 :                 struct spoolss_60 *r2 = (struct spoolss_60 *)r;
    1442           0 :                 if (DEBUGLEVEL >= 10) {
    1443           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_60, NDR_IN, r2);
    1444             :                 }
    1445           0 :                 r2->out.result = _spoolss_60(p, r2);
    1446           0 :                 break;
    1447             :         }
    1448           0 :         case 97: { /* spoolss_SendRecvBidiData */
    1449           0 :                 struct spoolss_SendRecvBidiData *r2 = (struct spoolss_SendRecvBidiData *)r;
    1450           0 :                 if (DEBUGLEVEL >= 10) {
    1451           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SendRecvBidiData, NDR_IN, r2);
    1452             :                 }
    1453           0 :                 NDR_ZERO_STRUCT(r2->out);
    1454           0 :                 r2->out.ppRespData = talloc_zero(r2, struct RPC_BIDI_RESPONSE_CONTAINER *);
    1455           0 :                 if (r2->out.ppRespData == NULL) {
    1456           0 :                         status = NT_STATUS_NO_MEMORY;
    1457           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1458           0 :                         goto fail;
    1459             :                 }
    1460             : 
    1461           0 :                 r2->out.result = _spoolss_SendRecvBidiData(p, r2);
    1462           0 :                 break;
    1463             :         }
    1464           0 :         case 98: { /* spoolss_62 */
    1465           0 :                 struct spoolss_62 *r2 = (struct spoolss_62 *)r;
    1466           0 :                 if (DEBUGLEVEL >= 10) {
    1467           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_62, NDR_IN, r2);
    1468             :                 }
    1469           0 :                 r2->out.result = _spoolss_62(p, r2);
    1470           0 :                 break;
    1471             :         }
    1472           0 :         case 99: { /* spoolss_63 */
    1473           0 :                 struct spoolss_63 *r2 = (struct spoolss_63 *)r;
    1474           0 :                 if (DEBUGLEVEL >= 10) {
    1475           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_63, NDR_IN, r2);
    1476             :                 }
    1477           0 :                 r2->out.result = _spoolss_63(p, r2);
    1478           0 :                 break;
    1479             :         }
    1480           0 :         case 100: { /* spoolss_64 */
    1481           0 :                 struct spoolss_64 *r2 = (struct spoolss_64 *)r;
    1482           0 :                 if (DEBUGLEVEL >= 10) {
    1483           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_64, NDR_IN, r2);
    1484             :                 }
    1485           0 :                 r2->out.result = _spoolss_64(p, r2);
    1486           0 :                 break;
    1487             :         }
    1488           0 :         case 101: { /* spoolss_65 */
    1489           0 :                 struct spoolss_65 *r2 = (struct spoolss_65 *)r;
    1490           0 :                 if (DEBUGLEVEL >= 10) {
    1491           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_65, NDR_IN, r2);
    1492             :                 }
    1493           0 :                 r2->out.result = _spoolss_65(p, r2);
    1494           0 :                 break;
    1495             :         }
    1496           8 :         case 102: { /* spoolss_GetCorePrinterDrivers */
    1497           8 :                 struct spoolss_GetCorePrinterDrivers *r2 = (struct spoolss_GetCorePrinterDrivers *)r;
    1498           8 :                 if (DEBUGLEVEL >= 10) {
    1499           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetCorePrinterDrivers, NDR_IN, r2);
    1500             :                 }
    1501           8 :                 NDR_ZERO_STRUCT(r2->out);
    1502           8 :                 r2->out.core_printer_drivers = talloc_zero_array(r2, struct spoolss_CorePrinterDriver, r2->in.core_printer_driver_count);
    1503           8 :                 if (r2->out.core_printer_drivers == NULL) {
    1504           0 :                         status = NT_STATUS_NO_MEMORY;
    1505           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1506           0 :                         goto fail;
    1507             :                 }
    1508             : 
    1509           8 :                 r2->out.result = _spoolss_GetCorePrinterDrivers(p, r2);
    1510           8 :                 break;
    1511             :         }
    1512           0 :         case 103: { /* spoolss_67 */
    1513           0 :                 struct spoolss_67 *r2 = (struct spoolss_67 *)r;
    1514           0 :                 if (DEBUGLEVEL >= 10) {
    1515           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_67, NDR_IN, r2);
    1516             :                 }
    1517           0 :                 r2->out.result = _spoolss_67(p, r2);
    1518           0 :                 break;
    1519             :         }
    1520           4 :         case 104: { /* spoolss_GetPrinterDriverPackagePath */
    1521           4 :                 struct spoolss_GetPrinterDriverPackagePath *r2 = (struct spoolss_GetPrinterDriverPackagePath *)r;
    1522           4 :                 if (DEBUGLEVEL >= 10) {
    1523           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriverPackagePath, NDR_IN, r2);
    1524             :                 }
    1525           4 :                 NDR_ZERO_STRUCT(r2->out);
    1526           4 :                 r2->out.driver_package_cab = r2->in.driver_package_cab;
    1527           4 :                 r2->out.required = talloc_zero(r2, uint32_t);
    1528           4 :                 if (r2->out.required == NULL) {
    1529           0 :                         status = NT_STATUS_NO_MEMORY;
    1530           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1531           0 :                         goto fail;
    1532             :                 }
    1533             : 
    1534           4 :                 r2->out.result = _spoolss_GetPrinterDriverPackagePath(p, r2);
    1535           4 :                 break;
    1536             :         }
    1537           0 :         case 105: { /* spoolss_69 */
    1538           0 :                 struct spoolss_69 *r2 = (struct spoolss_69 *)r;
    1539           0 :                 if (DEBUGLEVEL >= 10) {
    1540           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_69, NDR_IN, r2);
    1541             :                 }
    1542           0 :                 r2->out.result = _spoolss_69(p, r2);
    1543           0 :                 break;
    1544             :         }
    1545           0 :         case 106: { /* spoolss_6a */
    1546           0 :                 struct spoolss_6a *r2 = (struct spoolss_6a *)r;
    1547           0 :                 if (DEBUGLEVEL >= 10) {
    1548           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6a, NDR_IN, r2);
    1549             :                 }
    1550           0 :                 r2->out.result = _spoolss_6a(p, r2);
    1551           0 :                 break;
    1552             :         }
    1553           0 :         case 107: { /* spoolss_6b */
    1554           0 :                 struct spoolss_6b *r2 = (struct spoolss_6b *)r;
    1555           0 :                 if (DEBUGLEVEL >= 10) {
    1556           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6b, NDR_IN, r2);
    1557             :                 }
    1558           0 :                 r2->out.result = _spoolss_6b(p, r2);
    1559           0 :                 break;
    1560             :         }
    1561           0 :         case 108: { /* spoolss_6c */
    1562           0 :                 struct spoolss_6c *r2 = (struct spoolss_6c *)r;
    1563           0 :                 if (DEBUGLEVEL >= 10) {
    1564           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6c, NDR_IN, r2);
    1565             :                 }
    1566           0 :                 r2->out.result = _spoolss_6c(p, r2);
    1567           0 :                 break;
    1568             :         }
    1569           0 :         case 109: { /* spoolss_6d */
    1570           0 :                 struct spoolss_6d *r2 = (struct spoolss_6d *)r;
    1571           0 :                 if (DEBUGLEVEL >= 10) {
    1572           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6d, NDR_IN, r2);
    1573             :                 }
    1574           0 :                 r2->out.result = _spoolss_6d(p, r2);
    1575           0 :                 break;
    1576             :         }
    1577           0 :         case 110: { /* spoolss_GetJobNamedPropertyValue */
    1578           0 :                 struct spoolss_GetJobNamedPropertyValue *r2 = (struct spoolss_GetJobNamedPropertyValue *)r;
    1579           0 :                 if (DEBUGLEVEL >= 10) {
    1580           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetJobNamedPropertyValue, NDR_IN, r2);
    1581             :                 }
    1582           0 :                 NDR_ZERO_STRUCT(r2->out);
    1583           0 :                 r2->out.pValue = talloc_zero(r2, struct spoolss_PrintPropertyValue);
    1584           0 :                 if (r2->out.pValue == NULL) {
    1585           0 :                         status = NT_STATUS_NO_MEMORY;
    1586           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1587           0 :                         goto fail;
    1588             :                 }
    1589             : 
    1590           0 :                 r2->out.result = _spoolss_GetJobNamedPropertyValue(p, r2);
    1591           0 :                 break;
    1592             :         }
    1593           0 :         case 111: { /* spoolss_SetJobNamedProperty */
    1594           0 :                 struct spoolss_SetJobNamedProperty *r2 = (struct spoolss_SetJobNamedProperty *)r;
    1595           0 :                 if (DEBUGLEVEL >= 10) {
    1596           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetJobNamedProperty, NDR_IN, r2);
    1597             :                 }
    1598           0 :                 r2->out.result = _spoolss_SetJobNamedProperty(p, r2);
    1599           0 :                 break;
    1600             :         }
    1601           0 :         case 112: { /* spoolss_DeleteJobNamedProperty */
    1602           0 :                 struct spoolss_DeleteJobNamedProperty *r2 = (struct spoolss_DeleteJobNamedProperty *)r;
    1603           0 :                 if (DEBUGLEVEL >= 10) {
    1604           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeleteJobNamedProperty, NDR_IN, r2);
    1605             :                 }
    1606           0 :                 r2->out.result = _spoolss_DeleteJobNamedProperty(p, r2);
    1607           0 :                 break;
    1608             :         }
    1609           0 :         case 113: { /* spoolss_EnumJobNamedProperties */
    1610           0 :                 struct spoolss_EnumJobNamedProperties *r2 = (struct spoolss_EnumJobNamedProperties *)r;
    1611           0 :                 if (DEBUGLEVEL >= 10) {
    1612           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumJobNamedProperties, NDR_IN, r2);
    1613             :                 }
    1614           0 :                 NDR_ZERO_STRUCT(r2->out);
    1615           0 :                 r2->out.pcProperties = talloc_zero(r2, uint32_t);
    1616           0 :                 if (r2->out.pcProperties == NULL) {
    1617           0 :                         status = NT_STATUS_NO_MEMORY;
    1618           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1619           0 :                         goto fail;
    1620             :                 }
    1621             : 
    1622           0 :                 r2->out.ppProperties = talloc_zero(r2, struct spoolss_PrintNamedProperty *);
    1623           0 :                 if (r2->out.ppProperties == NULL) {
    1624           0 :                         status = NT_STATUS_NO_MEMORY;
    1625           0 :                         p->fault_state = DCERPC_FAULT_CANT_PERFORM;
    1626           0 :                         goto fail;
    1627             :                 }
    1628             : 
    1629           0 :                 r2->out.result = _spoolss_EnumJobNamedProperties(p, r2);
    1630           0 :                 break;
    1631             :         }
    1632           0 :         case 114: { /* spoolss_72 */
    1633           0 :                 struct spoolss_72 *r2 = (struct spoolss_72 *)r;
    1634           0 :                 if (DEBUGLEVEL >= 10) {
    1635           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_72, NDR_IN, r2);
    1636             :                 }
    1637           0 :                 r2->out.result = _spoolss_72(p, r2);
    1638           0 :                 break;
    1639             :         }
    1640           0 :         case 115: { /* spoolss_73 */
    1641           0 :                 struct spoolss_73 *r2 = (struct spoolss_73 *)r;
    1642           0 :                 if (DEBUGLEVEL >= 10) {
    1643           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_73, NDR_IN, r2);
    1644             :                 }
    1645           0 :                 r2->out.result = _spoolss_73(p, r2);
    1646           0 :                 break;
    1647             :         }
    1648           8 :         case 116: { /* spoolss_LogJobInfoForBranchOffice */
    1649           8 :                 struct spoolss_LogJobInfoForBranchOffice *r2 = (struct spoolss_LogJobInfoForBranchOffice *)r;
    1650           8 :                 if (DEBUGLEVEL >= 10) {
    1651           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_LogJobInfoForBranchOffice, NDR_IN, r2);
    1652             :                 }
    1653           8 :                 r2->out.result = _spoolss_LogJobInfoForBranchOffice(p, r2);
    1654           8 :                 break;
    1655             :         }
    1656           0 :         default:
    1657           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
    1658           0 :                 break;
    1659             :         }
    1660             : 
    1661       35006 : fail:
    1662             :         /* Unimpersonate */
    1663       35006 :         if (impersonated) {
    1664       34940 :                 unbecome_authenticated_pipe_user();
    1665             :         }
    1666             : 
    1667       35006 :         p->dce_call = NULL;
    1668       35006 :         p->mem_ctx = NULL;
    1669             :         /* Restore session info */
    1670       35006 :         p->session_info = pipe_session_info;
    1671       35006 :         p->auth.auth_type = 0;
    1672       35006 :         p->auth.auth_level = 0;
    1673       35006 :         p->auth.auth_context_id = 0;
    1674             :         /* Check pipes struct fault state */
    1675       35006 :         if (p->fault_state != 0) {
    1676          24 :                 dce_call->fault_code = p->fault_state;
    1677             :         }
    1678       35006 :         if (dce_call->fault_code != 0) {
    1679          24 :                 status = NT_STATUS_NET_WRITE_FAULT;
    1680             :         }
    1681             : 
    1682       35006 :         return status;
    1683             : }
    1684             : 
    1685       34948 : NTSTATUS spoolss__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
    1686             : {
    1687       34948 :         return spoolss__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_EXTERNAL);
    1688             : }
    1689             : 
    1690       34982 : NTSTATUS spoolss__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
    1691             : {
    1692       34982 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
    1693             : 
    1694       34982 :         switch (opnum) {
    1695         164 :         case 0: { /* spoolss_EnumPrinters */
    1696         164 :                 struct spoolss_EnumPrinters *r2 = (struct spoolss_EnumPrinters *)r;
    1697         164 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1698           0 :                         DEBUG(5,("function spoolss_EnumPrinters replied async\n"));
    1699             :                 }
    1700         164 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1701           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinters, NDR_OUT | NDR_SET_VALUES, r2);
    1702             :                 }
    1703         164 :                 if (dce_call->fault_code != 0) {
    1704           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPrinters\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1705             :                 }
    1706         164 :                 break;
    1707             :         }
    1708         166 :         case 1: { /* spoolss_OpenPrinter */
    1709         166 :                 struct spoolss_OpenPrinter *r2 = (struct spoolss_OpenPrinter *)r;
    1710         166 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1711           0 :                         DEBUG(5,("function spoolss_OpenPrinter replied async\n"));
    1712             :                 }
    1713         166 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1714           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_OpenPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1715             :                 }
    1716         166 :                 if (dce_call->fault_code != 0) {
    1717           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_OpenPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1718             :                 }
    1719         166 :                 break;
    1720             :         }
    1721         640 :         case 2: { /* spoolss_SetJob */
    1722         640 :                 struct spoolss_SetJob *r2 = (struct spoolss_SetJob *)r;
    1723         640 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1724           0 :                         DEBUG(5,("function spoolss_SetJob replied async\n"));
    1725             :                 }
    1726         640 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1727           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetJob, NDR_OUT | NDR_SET_VALUES, r2);
    1728             :                 }
    1729         640 :                 if (dce_call->fault_code != 0) {
    1730           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SetJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1731             :                 }
    1732         640 :                 break;
    1733             :         }
    1734        2048 :         case 3: { /* spoolss_GetJob */
    1735        2048 :                 struct spoolss_GetJob *r2 = (struct spoolss_GetJob *)r;
    1736        2048 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1737           0 :                         DEBUG(5,("function spoolss_GetJob replied async\n"));
    1738             :                 }
    1739        2048 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1740           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetJob, NDR_OUT | NDR_SET_VALUES, r2);
    1741             :                 }
    1742        2048 :                 if (dce_call->fault_code != 0) {
    1743           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1744             :                 }
    1745        2048 :                 break;
    1746             :         }
    1747          88 :         case 4: { /* spoolss_EnumJobs */
    1748          88 :                 struct spoolss_EnumJobs *r2 = (struct spoolss_EnumJobs *)r;
    1749          88 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1750           0 :                         DEBUG(5,("function spoolss_EnumJobs replied async\n"));
    1751             :                 }
    1752          88 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1753           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumJobs, NDR_OUT | NDR_SET_VALUES, r2);
    1754             :                 }
    1755          88 :                 if (dce_call->fault_code != 0) {
    1756           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumJobs\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1757             :                 }
    1758          88 :                 break;
    1759             :         }
    1760          72 :         case 5: { /* spoolss_AddPrinter */
    1761          72 :                 struct spoolss_AddPrinter *r2 = (struct spoolss_AddPrinter *)r;
    1762          72 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1763           0 :                         DEBUG(5,("function spoolss_AddPrinter replied async\n"));
    1764             :                 }
    1765          72 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1766           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1767             :                 }
    1768          72 :                 if (dce_call->fault_code != 0) {
    1769           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1770             :                 }
    1771          72 :                 break;
    1772             :         }
    1773          12 :         case 6: { /* spoolss_DeletePrinter */
    1774          12 :                 struct spoolss_DeletePrinter *r2 = (struct spoolss_DeletePrinter *)r;
    1775          12 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1776           0 :                         DEBUG(5,("function spoolss_DeletePrinter replied async\n"));
    1777             :                 }
    1778          12 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1779           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1780             :                 }
    1781          12 :                 if (dce_call->fault_code != 0) {
    1782           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1783             :                 }
    1784          12 :                 break;
    1785             :         }
    1786         584 :         case 7: { /* spoolss_SetPrinter */
    1787         584 :                 struct spoolss_SetPrinter *r2 = (struct spoolss_SetPrinter *)r;
    1788         584 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1789           0 :                         DEBUG(5,("function spoolss_SetPrinter replied async\n"));
    1790             :                 }
    1791         584 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1792           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1793             :                 }
    1794         584 :                 if (dce_call->fault_code != 0) {
    1795           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SetPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1796             :                 }
    1797         584 :                 break;
    1798             :         }
    1799        3480 :         case 8: { /* spoolss_GetPrinter */
    1800        3480 :                 struct spoolss_GetPrinter *r2 = (struct spoolss_GetPrinter *)r;
    1801        3480 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1802           0 :                         DEBUG(5,("function spoolss_GetPrinter replied async\n"));
    1803             :                 }
    1804        3480 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1805           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1806             :                 }
    1807        3480 :                 if (dce_call->fault_code != 0) {
    1808           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1809             :                 }
    1810        3480 :                 break;
    1811             :         }
    1812           0 :         case 9: { /* spoolss_AddPrinterDriver */
    1813           0 :                 struct spoolss_AddPrinterDriver *r2 = (struct spoolss_AddPrinterDriver *)r;
    1814           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1815           0 :                         DEBUG(5,("function spoolss_AddPrinterDriver replied async\n"));
    1816             :                 }
    1817           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1818           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterDriver, NDR_OUT | NDR_SET_VALUES, r2);
    1819             :                 }
    1820           0 :                 if (dce_call->fault_code != 0) {
    1821           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPrinterDriver\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1822             :                 }
    1823           0 :                 break;
    1824             :         }
    1825         108 :         case 10: { /* spoolss_EnumPrinterDrivers */
    1826         108 :                 struct spoolss_EnumPrinterDrivers *r2 = (struct spoolss_EnumPrinterDrivers *)r;
    1827         108 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1828           0 :                         DEBUG(5,("function spoolss_EnumPrinterDrivers replied async\n"));
    1829             :                 }
    1830         108 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1831           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterDrivers, NDR_OUT | NDR_SET_VALUES, r2);
    1832             :                 }
    1833         108 :                 if (dce_call->fault_code != 0) {
    1834           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPrinterDrivers\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1835             :                 }
    1836         108 :                 break;
    1837             :         }
    1838           0 :         case 11: { /* spoolss_GetPrinterDriver */
    1839           0 :                 struct spoolss_GetPrinterDriver *r2 = (struct spoolss_GetPrinterDriver *)r;
    1840           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1841           0 :                         DEBUG(5,("function spoolss_GetPrinterDriver replied async\n"));
    1842             :                 }
    1843           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1844           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriver, NDR_OUT | NDR_SET_VALUES, r2);
    1845             :                 }
    1846           0 :                 if (dce_call->fault_code != 0) {
    1847           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrinterDriver\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1848             :                 }
    1849           0 :                 break;
    1850             :         }
    1851         112 :         case 12: { /* spoolss_GetPrinterDriverDirectory */
    1852         112 :                 struct spoolss_GetPrinterDriverDirectory *r2 = (struct spoolss_GetPrinterDriverDirectory *)r;
    1853         112 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1854           0 :                         DEBUG(5,("function spoolss_GetPrinterDriverDirectory replied async\n"));
    1855             :                 }
    1856         112 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1857           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriverDirectory, NDR_OUT | NDR_SET_VALUES, r2);
    1858             :                 }
    1859         112 :                 if (dce_call->fault_code != 0) {
    1860           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrinterDriverDirectory\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1861             :                 }
    1862         112 :                 break;
    1863             :         }
    1864           0 :         case 13: { /* spoolss_DeletePrinterDriver */
    1865           0 :                 struct spoolss_DeletePrinterDriver *r2 = (struct spoolss_DeletePrinterDriver *)r;
    1866           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1867           0 :                         DEBUG(5,("function spoolss_DeletePrinterDriver replied async\n"));
    1868             :                 }
    1869           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1870           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterDriver, NDR_OUT | NDR_SET_VALUES, r2);
    1871             :                 }
    1872           0 :                 if (dce_call->fault_code != 0) {
    1873           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinterDriver\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1874             :                 }
    1875           0 :                 break;
    1876             :         }
    1877           4 :         case 14: { /* spoolss_AddPrintProcessor */
    1878           4 :                 struct spoolss_AddPrintProcessor *r2 = (struct spoolss_AddPrintProcessor *)r;
    1879           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1880           0 :                         DEBUG(5,("function spoolss_AddPrintProcessor replied async\n"));
    1881             :                 }
    1882           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1883           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrintProcessor, NDR_OUT | NDR_SET_VALUES, r2);
    1884             :                 }
    1885           4 :                 if (dce_call->fault_code != 0) {
    1886           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPrintProcessor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1887             :                 }
    1888           4 :                 break;
    1889             :         }
    1890          48 :         case 15: { /* spoolss_EnumPrintProcessors */
    1891          48 :                 struct spoolss_EnumPrintProcessors *r2 = (struct spoolss_EnumPrintProcessors *)r;
    1892          48 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1893           0 :                         DEBUG(5,("function spoolss_EnumPrintProcessors replied async\n"));
    1894             :                 }
    1895          48 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1896           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrintProcessors, NDR_OUT | NDR_SET_VALUES, r2);
    1897             :                 }
    1898          48 :                 if (dce_call->fault_code != 0) {
    1899           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPrintProcessors\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1900             :                 }
    1901          48 :                 break;
    1902             :         }
    1903          40 :         case 16: { /* spoolss_GetPrintProcessorDirectory */
    1904          40 :                 struct spoolss_GetPrintProcessorDirectory *r2 = (struct spoolss_GetPrintProcessorDirectory *)r;
    1905          40 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1906           0 :                         DEBUG(5,("function spoolss_GetPrintProcessorDirectory replied async\n"));
    1907             :                 }
    1908          40 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1909           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrintProcessorDirectory, NDR_OUT | NDR_SET_VALUES, r2);
    1910             :                 }
    1911          40 :                 if (dce_call->fault_code != 0) {
    1912           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrintProcessorDirectory\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1913             :                 }
    1914          40 :                 break;
    1915             :         }
    1916         668 :         case 17: { /* spoolss_StartDocPrinter */
    1917         668 :                 struct spoolss_StartDocPrinter *r2 = (struct spoolss_StartDocPrinter *)r;
    1918         668 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1919           0 :                         DEBUG(5,("function spoolss_StartDocPrinter replied async\n"));
    1920             :                 }
    1921         668 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1922           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_StartDocPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1923             :                 }
    1924         668 :                 if (dce_call->fault_code != 0) {
    1925           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_StartDocPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1926             :                 }
    1927         668 :                 break;
    1928             :         }
    1929        1920 :         case 18: { /* spoolss_StartPagePrinter */
    1930        1920 :                 struct spoolss_StartPagePrinter *r2 = (struct spoolss_StartPagePrinter *)r;
    1931        1920 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1932           0 :                         DEBUG(5,("function spoolss_StartPagePrinter replied async\n"));
    1933             :                 }
    1934        1920 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1935           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_StartPagePrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1936             :                 }
    1937        1920 :                 if (dce_call->fault_code != 0) {
    1938           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_StartPagePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1939             :                 }
    1940        1920 :                 break;
    1941             :         }
    1942        1920 :         case 19: { /* spoolss_WritePrinter */
    1943        1920 :                 struct spoolss_WritePrinter *r2 = (struct spoolss_WritePrinter *)r;
    1944        1920 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1945           0 :                         DEBUG(5,("function spoolss_WritePrinter replied async\n"));
    1946             :                 }
    1947        1920 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1948           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_WritePrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1949             :                 }
    1950        1920 :                 if (dce_call->fault_code != 0) {
    1951           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_WritePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1952             :                 }
    1953        1920 :                 break;
    1954             :         }
    1955        1920 :         case 20: { /* spoolss_EndPagePrinter */
    1956        1920 :                 struct spoolss_EndPagePrinter *r2 = (struct spoolss_EndPagePrinter *)r;
    1957        1920 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1958           0 :                         DEBUG(5,("function spoolss_EndPagePrinter replied async\n"));
    1959             :                 }
    1960        1920 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1961           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EndPagePrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1962             :                 }
    1963        1920 :                 if (dce_call->fault_code != 0) {
    1964           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EndPagePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1965             :                 }
    1966        1920 :                 break;
    1967             :         }
    1968           0 :         case 21: { /* spoolss_AbortPrinter */
    1969           0 :                 struct spoolss_AbortPrinter *r2 = (struct spoolss_AbortPrinter *)r;
    1970           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1971           0 :                         DEBUG(5,("function spoolss_AbortPrinter replied async\n"));
    1972             :                 }
    1973           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1974           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AbortPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1975             :                 }
    1976           0 :                 if (dce_call->fault_code != 0) {
    1977           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AbortPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1978             :                 }
    1979           0 :                 break;
    1980             :         }
    1981           0 :         case 22: { /* spoolss_ReadPrinter */
    1982           0 :                 struct spoolss_ReadPrinter *r2 = (struct spoolss_ReadPrinter *)r;
    1983           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1984           0 :                         DEBUG(5,("function spoolss_ReadPrinter replied async\n"));
    1985             :                 }
    1986           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    1987           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ReadPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    1988             :                 }
    1989           0 :                 if (dce_call->fault_code != 0) {
    1990           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ReadPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    1991             :                 }
    1992           0 :                 break;
    1993             :         }
    1994         640 :         case 23: { /* spoolss_EndDocPrinter */
    1995         640 :                 struct spoolss_EndDocPrinter *r2 = (struct spoolss_EndDocPrinter *)r;
    1996         640 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    1997           0 :                         DEBUG(5,("function spoolss_EndDocPrinter replied async\n"));
    1998             :                 }
    1999         640 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2000           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EndDocPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    2001             :                 }
    2002         640 :                 if (dce_call->fault_code != 0) {
    2003           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EndDocPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2004             :                 }
    2005         640 :                 break;
    2006             :         }
    2007          16 :         case 24: { /* spoolss_AddJob */
    2008          16 :                 struct spoolss_AddJob *r2 = (struct spoolss_AddJob *)r;
    2009          16 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2010           0 :                         DEBUG(5,("function spoolss_AddJob replied async\n"));
    2011             :                 }
    2012          16 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2013           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddJob, NDR_OUT | NDR_SET_VALUES, r2);
    2014             :                 }
    2015          16 :                 if (dce_call->fault_code != 0) {
    2016           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2017             :                 }
    2018          16 :                 break;
    2019             :         }
    2020           0 :         case 25: { /* spoolss_ScheduleJob */
    2021           0 :                 struct spoolss_ScheduleJob *r2 = (struct spoolss_ScheduleJob *)r;
    2022           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2023           0 :                         DEBUG(5,("function spoolss_ScheduleJob replied async\n"));
    2024             :                 }
    2025           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2026           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ScheduleJob, NDR_OUT | NDR_SET_VALUES, r2);
    2027             :                 }
    2028           0 :                 if (dce_call->fault_code != 0) {
    2029           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ScheduleJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2030             :                 }
    2031           0 :                 break;
    2032             :         }
    2033         424 :         case 26: { /* spoolss_GetPrinterData */
    2034         424 :                 struct spoolss_GetPrinterData *r2 = (struct spoolss_GetPrinterData *)r;
    2035         424 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2036           0 :                         DEBUG(5,("function spoolss_GetPrinterData replied async\n"));
    2037             :                 }
    2038         424 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2039           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterData, NDR_OUT | NDR_SET_VALUES, r2);
    2040             :                 }
    2041         424 :                 if (dce_call->fault_code != 0) {
    2042           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2043             :                 }
    2044         424 :                 break;
    2045             :         }
    2046         168 :         case 27: { /* spoolss_SetPrinterData */
    2047         168 :                 struct spoolss_SetPrinterData *r2 = (struct spoolss_SetPrinterData *)r;
    2048         168 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2049           0 :                         DEBUG(5,("function spoolss_SetPrinterData replied async\n"));
    2050             :                 }
    2051         168 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2052           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPrinterData, NDR_OUT | NDR_SET_VALUES, r2);
    2053             :                 }
    2054         168 :                 if (dce_call->fault_code != 0) {
    2055           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SetPrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2056             :                 }
    2057         168 :                 break;
    2058             :         }
    2059           0 :         case 28: { /* spoolss_WaitForPrinterChange */
    2060           0 :                 struct spoolss_WaitForPrinterChange *r2 = (struct spoolss_WaitForPrinterChange *)r;
    2061           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2062           0 :                         DEBUG(5,("function spoolss_WaitForPrinterChange replied async\n"));
    2063             :                 }
    2064           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2065           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_WaitForPrinterChange, NDR_OUT | NDR_SET_VALUES, r2);
    2066             :                 }
    2067           0 :                 if (dce_call->fault_code != 0) {
    2068           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_WaitForPrinterChange\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2069             :                 }
    2070           0 :                 break;
    2071             :         }
    2072         578 :         case 29: { /* spoolss_ClosePrinter */
    2073         578 :                 struct spoolss_ClosePrinter *r2 = (struct spoolss_ClosePrinter *)r;
    2074         578 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2075           0 :                         DEBUG(5,("function spoolss_ClosePrinter replied async\n"));
    2076             :                 }
    2077         578 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2078           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ClosePrinter, NDR_OUT | NDR_SET_VALUES, r2);
    2079             :                 }
    2080         578 :                 if (dce_call->fault_code != 0) {
    2081           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ClosePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2082             :                 }
    2083         578 :                 break;
    2084             :         }
    2085         576 :         case 30: { /* spoolss_AddForm */
    2086         576 :                 struct spoolss_AddForm *r2 = (struct spoolss_AddForm *)r;
    2087         576 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2088           0 :                         DEBUG(5,("function spoolss_AddForm replied async\n"));
    2089             :                 }
    2090         576 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2091           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddForm, NDR_OUT | NDR_SET_VALUES, r2);
    2092             :                 }
    2093         576 :                 if (dce_call->fault_code != 0) {
    2094           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2095             :                 }
    2096         576 :                 break;
    2097             :         }
    2098         384 :         case 31: { /* spoolss_DeleteForm */
    2099         384 :                 struct spoolss_DeleteForm *r2 = (struct spoolss_DeleteForm *)r;
    2100         384 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2101           0 :                         DEBUG(5,("function spoolss_DeleteForm replied async\n"));
    2102             :                 }
    2103         384 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2104           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeleteForm, NDR_OUT | NDR_SET_VALUES, r2);
    2105             :                 }
    2106         384 :                 if (dce_call->fault_code != 0) {
    2107           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeleteForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2108             :                 }
    2109         384 :                 break;
    2110             :         }
    2111        5040 :         case 32: { /* spoolss_GetForm */
    2112        5040 :                 struct spoolss_GetForm *r2 = (struct spoolss_GetForm *)r;
    2113        5040 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2114           0 :                         DEBUG(5,("function spoolss_GetForm replied async\n"));
    2115             :                 }
    2116        5040 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2117           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetForm, NDR_OUT | NDR_SET_VALUES, r2);
    2118             :                 }
    2119        5040 :                 if (dce_call->fault_code != 0) {
    2120           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2121             :                 }
    2122        5040 :                 break;
    2123             :         }
    2124          80 :         case 33: { /* spoolss_SetForm */
    2125          80 :                 struct spoolss_SetForm *r2 = (struct spoolss_SetForm *)r;
    2126          80 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2127           0 :                         DEBUG(5,("function spoolss_SetForm replied async\n"));
    2128             :                 }
    2129          80 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2130           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetForm, NDR_OUT | NDR_SET_VALUES, r2);
    2131             :                 }
    2132          80 :                 if (dce_call->fault_code != 0) {
    2133           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SetForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2134             :                 }
    2135          80 :                 break;
    2136             :         }
    2137         560 :         case 34: { /* spoolss_EnumForms */
    2138         560 :                 struct spoolss_EnumForms *r2 = (struct spoolss_EnumForms *)r;
    2139         560 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2140           0 :                         DEBUG(5,("function spoolss_EnumForms replied async\n"));
    2141             :                 }
    2142         560 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2143           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumForms, NDR_OUT | NDR_SET_VALUES, r2);
    2144             :                 }
    2145         560 :                 if (dce_call->fault_code != 0) {
    2146           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumForms\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2147             :                 }
    2148         560 :                 break;
    2149             :         }
    2150          24 :         case 35: { /* spoolss_EnumPorts */
    2151          24 :                 struct spoolss_EnumPorts *r2 = (struct spoolss_EnumPorts *)r;
    2152          24 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2153           0 :                         DEBUG(5,("function spoolss_EnumPorts replied async\n"));
    2154             :                 }
    2155          24 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2156           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPorts, NDR_OUT | NDR_SET_VALUES, r2);
    2157             :                 }
    2158          24 :                 if (dce_call->fault_code != 0) {
    2159           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPorts\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2160             :                 }
    2161          24 :                 break;
    2162             :         }
    2163          16 :         case 36: { /* spoolss_EnumMonitors */
    2164          16 :                 struct spoolss_EnumMonitors *r2 = (struct spoolss_EnumMonitors *)r;
    2165          16 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2166           0 :                         DEBUG(5,("function spoolss_EnumMonitors replied async\n"));
    2167             :                 }
    2168          16 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2169           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumMonitors, NDR_OUT | NDR_SET_VALUES, r2);
    2170             :                 }
    2171          16 :                 if (dce_call->fault_code != 0) {
    2172           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumMonitors\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2173             :                 }
    2174          16 :                 break;
    2175             :         }
    2176           4 :         case 37: { /* spoolss_AddPort */
    2177           4 :                 struct spoolss_AddPort *r2 = (struct spoolss_AddPort *)r;
    2178           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2179           0 :                         DEBUG(5,("function spoolss_AddPort replied async\n"));
    2180             :                 }
    2181           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2182           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPort, NDR_OUT | NDR_SET_VALUES, r2);
    2183             :                 }
    2184           4 :                 if (dce_call->fault_code != 0) {
    2185           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPort\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2186             :                 }
    2187           4 :                 break;
    2188             :         }
    2189           0 :         case 38: { /* spoolss_ConfigurePort */
    2190           0 :                 struct spoolss_ConfigurePort *r2 = (struct spoolss_ConfigurePort *)r;
    2191           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2192           0 :                         DEBUG(5,("function spoolss_ConfigurePort replied async\n"));
    2193             :                 }
    2194           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2195           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ConfigurePort, NDR_OUT | NDR_SET_VALUES, r2);
    2196             :                 }
    2197           0 :                 if (dce_call->fault_code != 0) {
    2198           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ConfigurePort\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2199             :                 }
    2200           0 :                 break;
    2201             :         }
    2202           0 :         case 39: { /* spoolss_DeletePort */
    2203           0 :                 struct spoolss_DeletePort *r2 = (struct spoolss_DeletePort *)r;
    2204           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2205           0 :                         DEBUG(5,("function spoolss_DeletePort replied async\n"));
    2206             :                 }
    2207           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2208           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePort, NDR_OUT | NDR_SET_VALUES, r2);
    2209             :                 }
    2210           0 :                 if (dce_call->fault_code != 0) {
    2211           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePort\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2212             :                 }
    2213           0 :                 break;
    2214             :         }
    2215           0 :         case 40: { /* spoolss_CreatePrinterIC */
    2216           0 :                 struct spoolss_CreatePrinterIC *r2 = (struct spoolss_CreatePrinterIC *)r;
    2217           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2218           0 :                         DEBUG(5,("function spoolss_CreatePrinterIC replied async\n"));
    2219             :                 }
    2220           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2221           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_CreatePrinterIC, NDR_OUT | NDR_SET_VALUES, r2);
    2222             :                 }
    2223           0 :                 if (dce_call->fault_code != 0) {
    2224           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_CreatePrinterIC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2225             :                 }
    2226           0 :                 break;
    2227             :         }
    2228           0 :         case 41: { /* spoolss_PlayGDIScriptOnPrinterIC */
    2229           0 :                 struct spoolss_PlayGDIScriptOnPrinterIC *r2 = (struct spoolss_PlayGDIScriptOnPrinterIC *)r;
    2230           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2231           0 :                         DEBUG(5,("function spoolss_PlayGDIScriptOnPrinterIC replied async\n"));
    2232             :                 }
    2233           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2234           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, NDR_OUT | NDR_SET_VALUES, r2);
    2235             :                 }
    2236           0 :                 if (dce_call->fault_code != 0) {
    2237           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_PlayGDIScriptOnPrinterIC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2238             :                 }
    2239           0 :                 break;
    2240             :         }
    2241           0 :         case 42: { /* spoolss_DeletePrinterIC */
    2242           0 :                 struct spoolss_DeletePrinterIC *r2 = (struct spoolss_DeletePrinterIC *)r;
    2243           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2244           0 :                         DEBUG(5,("function spoolss_DeletePrinterIC replied async\n"));
    2245             :                 }
    2246           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2247           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterIC, NDR_OUT | NDR_SET_VALUES, r2);
    2248             :                 }
    2249           0 :                 if (dce_call->fault_code != 0) {
    2250           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinterIC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2251             :                 }
    2252           0 :                 break;
    2253             :         }
    2254           0 :         case 43: { /* spoolss_AddPrinterConnection */
    2255           0 :                 struct spoolss_AddPrinterConnection *r2 = (struct spoolss_AddPrinterConnection *)r;
    2256           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2257           0 :                         DEBUG(5,("function spoolss_AddPrinterConnection replied async\n"));
    2258             :                 }
    2259           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2260           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterConnection, NDR_OUT | NDR_SET_VALUES, r2);
    2261             :                 }
    2262           0 :                 if (dce_call->fault_code != 0) {
    2263           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPrinterConnection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2264             :                 }
    2265           0 :                 break;
    2266             :         }
    2267           0 :         case 44: { /* spoolss_DeletePrinterConnection */
    2268           0 :                 struct spoolss_DeletePrinterConnection *r2 = (struct spoolss_DeletePrinterConnection *)r;
    2269           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2270           0 :                         DEBUG(5,("function spoolss_DeletePrinterConnection replied async\n"));
    2271             :                 }
    2272           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2273           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterConnection, NDR_OUT | NDR_SET_VALUES, r2);
    2274             :                 }
    2275           0 :                 if (dce_call->fault_code != 0) {
    2276           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinterConnection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2277             :                 }
    2278           0 :                 break;
    2279             :         }
    2280           0 :         case 45: { /* spoolss_PrinterMessageBox */
    2281           0 :                 struct spoolss_PrinterMessageBox *r2 = (struct spoolss_PrinterMessageBox *)r;
    2282           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2283           0 :                         DEBUG(5,("function spoolss_PrinterMessageBox replied async\n"));
    2284             :                 }
    2285           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2286           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_PrinterMessageBox, NDR_OUT | NDR_SET_VALUES, r2);
    2287             :                 }
    2288           0 :                 if (dce_call->fault_code != 0) {
    2289           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_PrinterMessageBox\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2290             :                 }
    2291           0 :                 break;
    2292             :         }
    2293           0 :         case 46: { /* spoolss_AddMonitor */
    2294           0 :                 struct spoolss_AddMonitor *r2 = (struct spoolss_AddMonitor *)r;
    2295           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2296           0 :                         DEBUG(5,("function spoolss_AddMonitor replied async\n"));
    2297             :                 }
    2298           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2299           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddMonitor, NDR_OUT | NDR_SET_VALUES, r2);
    2300             :                 }
    2301           0 :                 if (dce_call->fault_code != 0) {
    2302           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddMonitor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2303             :                 }
    2304           0 :                 break;
    2305             :         }
    2306           0 :         case 47: { /* spoolss_DeleteMonitor */
    2307           0 :                 struct spoolss_DeleteMonitor *r2 = (struct spoolss_DeleteMonitor *)r;
    2308           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2309           0 :                         DEBUG(5,("function spoolss_DeleteMonitor replied async\n"));
    2310             :                 }
    2311           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2312           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeleteMonitor, NDR_OUT | NDR_SET_VALUES, r2);
    2313             :                 }
    2314           0 :                 if (dce_call->fault_code != 0) {
    2315           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeleteMonitor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2316             :                 }
    2317           0 :                 break;
    2318             :         }
    2319           0 :         case 48: { /* spoolss_DeletePrintProcessor */
    2320           0 :                 struct spoolss_DeletePrintProcessor *r2 = (struct spoolss_DeletePrintProcessor *)r;
    2321           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2322           0 :                         DEBUG(5,("function spoolss_DeletePrintProcessor replied async\n"));
    2323             :                 }
    2324           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2325           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrintProcessor, NDR_OUT | NDR_SET_VALUES, r2);
    2326             :                 }
    2327           0 :                 if (dce_call->fault_code != 0) {
    2328           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrintProcessor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2329             :                 }
    2330           0 :                 break;
    2331             :         }
    2332           0 :         case 49: { /* spoolss_AddPrintProvidor */
    2333           0 :                 struct spoolss_AddPrintProvidor *r2 = (struct spoolss_AddPrintProvidor *)r;
    2334           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2335           0 :                         DEBUG(5,("function spoolss_AddPrintProvidor replied async\n"));
    2336             :                 }
    2337           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2338           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrintProvidor, NDR_OUT | NDR_SET_VALUES, r2);
    2339             :                 }
    2340           0 :                 if (dce_call->fault_code != 0) {
    2341           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPrintProvidor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2342             :                 }
    2343           0 :                 break;
    2344             :         }
    2345           0 :         case 50: { /* spoolss_DeletePrintProvidor */
    2346           0 :                 struct spoolss_DeletePrintProvidor *r2 = (struct spoolss_DeletePrintProvidor *)r;
    2347           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2348           0 :                         DEBUG(5,("function spoolss_DeletePrintProvidor replied async\n"));
    2349             :                 }
    2350           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2351           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrintProvidor, NDR_OUT | NDR_SET_VALUES, r2);
    2352             :                 }
    2353           0 :                 if (dce_call->fault_code != 0) {
    2354           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrintProvidor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2355             :                 }
    2356           0 :                 break;
    2357             :         }
    2358          44 :         case 51: { /* spoolss_EnumPrintProcessorDataTypes */
    2359          44 :                 struct spoolss_EnumPrintProcessorDataTypes *r2 = (struct spoolss_EnumPrintProcessorDataTypes *)r;
    2360          44 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2361           0 :                         DEBUG(5,("function spoolss_EnumPrintProcessorDataTypes replied async\n"));
    2362             :                 }
    2363          44 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2364           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrintProcessorDataTypes, NDR_OUT | NDR_SET_VALUES, r2);
    2365             :                 }
    2366          44 :                 if (dce_call->fault_code != 0) {
    2367           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPrintProcessorDataTypes\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2368             :                 }
    2369          44 :                 break;
    2370             :         }
    2371           0 :         case 52: { /* spoolss_ResetPrinter */
    2372           0 :                 struct spoolss_ResetPrinter *r2 = (struct spoolss_ResetPrinter *)r;
    2373           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2374           0 :                         DEBUG(5,("function spoolss_ResetPrinter replied async\n"));
    2375             :                 }
    2376           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2377           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ResetPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    2378             :                 }
    2379           0 :                 if (dce_call->fault_code != 0) {
    2380           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ResetPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2381             :                 }
    2382           0 :                 break;
    2383             :         }
    2384           4 :         case 53: { /* spoolss_GetPrinterDriver2 */
    2385           4 :                 struct spoolss_GetPrinterDriver2 *r2 = (struct spoolss_GetPrinterDriver2 *)r;
    2386           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2387           0 :                         DEBUG(5,("function spoolss_GetPrinterDriver2 replied async\n"));
    2388             :                 }
    2389           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2390           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriver2, NDR_OUT | NDR_SET_VALUES, r2);
    2391             :                 }
    2392           4 :                 if (dce_call->fault_code != 0) {
    2393           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrinterDriver2\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2394             :                 }
    2395           4 :                 break;
    2396             :         }
    2397           0 :         case 54: { /* spoolss_FindFirstPrinterChangeNotification */
    2398           0 :                 struct spoolss_FindFirstPrinterChangeNotification *r2 = (struct spoolss_FindFirstPrinterChangeNotification *)r;
    2399           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2400           0 :                         DEBUG(5,("function spoolss_FindFirstPrinterChangeNotification replied async\n"));
    2401             :                 }
    2402           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2403           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_FindFirstPrinterChangeNotification, NDR_OUT | NDR_SET_VALUES, r2);
    2404             :                 }
    2405           0 :                 if (dce_call->fault_code != 0) {
    2406           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_FindFirstPrinterChangeNotification\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2407             :                 }
    2408           0 :                 break;
    2409             :         }
    2410           0 :         case 55: { /* spoolss_FindNextPrinterChangeNotification */
    2411           0 :                 struct spoolss_FindNextPrinterChangeNotification *r2 = (struct spoolss_FindNextPrinterChangeNotification *)r;
    2412           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2413           0 :                         DEBUG(5,("function spoolss_FindNextPrinterChangeNotification replied async\n"));
    2414             :                 }
    2415           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2416           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_FindNextPrinterChangeNotification, NDR_OUT | NDR_SET_VALUES, r2);
    2417             :                 }
    2418           0 :                 if (dce_call->fault_code != 0) {
    2419           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_FindNextPrinterChangeNotification\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2420             :                 }
    2421           0 :                 break;
    2422             :         }
    2423           0 :         case 56: { /* spoolss_FindClosePrinterNotify */
    2424           0 :                 struct spoolss_FindClosePrinterNotify *r2 = (struct spoolss_FindClosePrinterNotify *)r;
    2425           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2426           0 :                         DEBUG(5,("function spoolss_FindClosePrinterNotify replied async\n"));
    2427             :                 }
    2428           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2429           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_FindClosePrinterNotify, NDR_OUT | NDR_SET_VALUES, r2);
    2430             :                 }
    2431           0 :                 if (dce_call->fault_code != 0) {
    2432           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_FindClosePrinterNotify\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2433             :                 }
    2434           0 :                 break;
    2435             :         }
    2436           0 :         case 57: { /* spoolss_RouterFindFirstPrinterChangeNotificationOld */
    2437           0 :                 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r2 = (struct spoolss_RouterFindFirstPrinterChangeNotificationOld *)r;
    2438           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2439           0 :                         DEBUG(5,("function spoolss_RouterFindFirstPrinterChangeNotificationOld replied async\n"));
    2440             :                 }
    2441           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2442           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, NDR_OUT | NDR_SET_VALUES, r2);
    2443             :                 }
    2444           0 :                 if (dce_call->fault_code != 0) {
    2445           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_RouterFindFirstPrinterChangeNotificationOld\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2446             :                 }
    2447           0 :                 break;
    2448             :         }
    2449           0 :         case 58: { /* spoolss_ReplyOpenPrinter */
    2450           0 :                 struct spoolss_ReplyOpenPrinter *r2 = (struct spoolss_ReplyOpenPrinter *)r;
    2451           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2452           0 :                         DEBUG(5,("function spoolss_ReplyOpenPrinter replied async\n"));
    2453             :                 }
    2454           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2455           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ReplyOpenPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    2456             :                 }
    2457           0 :                 if (dce_call->fault_code != 0) {
    2458           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ReplyOpenPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2459             :                 }
    2460           0 :                 break;
    2461             :         }
    2462           0 :         case 59: { /* spoolss_RouterReplyPrinter */
    2463           0 :                 struct spoolss_RouterReplyPrinter *r2 = (struct spoolss_RouterReplyPrinter *)r;
    2464           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2465           0 :                         DEBUG(5,("function spoolss_RouterReplyPrinter replied async\n"));
    2466             :                 }
    2467           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2468           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterReplyPrinter, NDR_OUT | NDR_SET_VALUES, r2);
    2469             :                 }
    2470           0 :                 if (dce_call->fault_code != 0) {
    2471           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_RouterReplyPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2472             :                 }
    2473           0 :                 break;
    2474             :         }
    2475           0 :         case 60: { /* spoolss_ReplyClosePrinter */
    2476           0 :                 struct spoolss_ReplyClosePrinter *r2 = (struct spoolss_ReplyClosePrinter *)r;
    2477           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2478           0 :                         DEBUG(5,("function spoolss_ReplyClosePrinter replied async\n"));
    2479             :                 }
    2480           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2481           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ReplyClosePrinter, NDR_OUT | NDR_SET_VALUES, r2);
    2482             :                 }
    2483           0 :                 if (dce_call->fault_code != 0) {
    2484           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ReplyClosePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2485             :                 }
    2486           0 :                 break;
    2487             :         }
    2488           0 :         case 61: { /* spoolss_AddPortEx */
    2489           0 :                 struct spoolss_AddPortEx *r2 = (struct spoolss_AddPortEx *)r;
    2490           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2491           0 :                         DEBUG(5,("function spoolss_AddPortEx replied async\n"));
    2492             :                 }
    2493           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2494           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPortEx, NDR_OUT | NDR_SET_VALUES, r2);
    2495             :                 }
    2496           0 :                 if (dce_call->fault_code != 0) {
    2497           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPortEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2498             :                 }
    2499           0 :                 break;
    2500             :         }
    2501           0 :         case 62: { /* spoolss_RouterFindFirstPrinterChangeNotification */
    2502           0 :                 struct spoolss_RouterFindFirstPrinterChangeNotification *r2 = (struct spoolss_RouterFindFirstPrinterChangeNotification *)r;
    2503           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2504           0 :                         DEBUG(5,("function spoolss_RouterFindFirstPrinterChangeNotification replied async\n"));
    2505             :                 }
    2506           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2507           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, NDR_OUT | NDR_SET_VALUES, r2);
    2508             :                 }
    2509           0 :                 if (dce_call->fault_code != 0) {
    2510           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_RouterFindFirstPrinterChangeNotification\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2511             :                 }
    2512           0 :                 break;
    2513             :         }
    2514           0 :         case 63: { /* spoolss_SpoolerInit */
    2515           0 :                 struct spoolss_SpoolerInit *r2 = (struct spoolss_SpoolerInit *)r;
    2516           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2517           0 :                         DEBUG(5,("function spoolss_SpoolerInit replied async\n"));
    2518             :                 }
    2519           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2520           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SpoolerInit, NDR_OUT | NDR_SET_VALUES, r2);
    2521             :                 }
    2522           0 :                 if (dce_call->fault_code != 0) {
    2523           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SpoolerInit\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2524             :                 }
    2525           0 :                 break;
    2526             :         }
    2527           0 :         case 64: { /* spoolss_ResetPrinterEx */
    2528           0 :                 struct spoolss_ResetPrinterEx *r2 = (struct spoolss_ResetPrinterEx *)r;
    2529           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2530           0 :                         DEBUG(5,("function spoolss_ResetPrinterEx replied async\n"));
    2531             :                 }
    2532           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2533           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_ResetPrinterEx, NDR_OUT | NDR_SET_VALUES, r2);
    2534             :                 }
    2535           0 :                 if (dce_call->fault_code != 0) {
    2536           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_ResetPrinterEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2537             :                 }
    2538           0 :                 break;
    2539             :         }
    2540           2 :         case 65: { /* spoolss_RemoteFindFirstPrinterChangeNotifyEx */
    2541           2 :                 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r2 = (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *)r;
    2542           2 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2543           0 :                         DEBUG(5,("function spoolss_RemoteFindFirstPrinterChangeNotifyEx replied async\n"));
    2544             :                 }
    2545           2 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2546           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, NDR_OUT | NDR_SET_VALUES, r2);
    2547             :                 }
    2548           2 :                 if (dce_call->fault_code != 0) {
    2549           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_RemoteFindFirstPrinterChangeNotifyEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2550             :                 }
    2551           2 :                 break;
    2552             :         }
    2553           0 :         case 66: { /* spoolss_RouterReplyPrinterEx */
    2554           0 :                 struct spoolss_RouterReplyPrinterEx *r2 = (struct spoolss_RouterReplyPrinterEx *)r;
    2555           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2556           0 :                         DEBUG(5,("function spoolss_RouterReplyPrinterEx replied async\n"));
    2557             :                 }
    2558           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2559           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterReplyPrinterEx, NDR_OUT | NDR_SET_VALUES, r2);
    2560             :                 }
    2561           0 :                 if (dce_call->fault_code != 0) {
    2562           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_RouterReplyPrinterEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2563             :                 }
    2564           0 :                 break;
    2565             :         }
    2566           4 :         case 67: { /* spoolss_RouterRefreshPrinterChangeNotify */
    2567           4 :                 struct spoolss_RouterRefreshPrinterChangeNotify *r2 = (struct spoolss_RouterRefreshPrinterChangeNotify *)r;
    2568           4 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2569           0 :                         DEBUG(5,("function spoolss_RouterRefreshPrinterChangeNotify replied async\n"));
    2570             :                 }
    2571           4 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2572           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, NDR_OUT | NDR_SET_VALUES, r2);
    2573             :                 }
    2574           4 :                 if (dce_call->fault_code != 0) {
    2575           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_RouterRefreshPrinterChangeNotify\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2576             :                 }
    2577           4 :                 break;
    2578             :         }
    2579           0 :         case 68: { /* spoolss_44 */
    2580           0 :                 struct spoolss_44 *r2 = (struct spoolss_44 *)r;
    2581           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2582           0 :                         DEBUG(5,("function spoolss_44 replied async\n"));
    2583             :                 }
    2584           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2585           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_44, NDR_OUT | NDR_SET_VALUES, r2);
    2586             :                 }
    2587           0 :                 if (dce_call->fault_code != 0) {
    2588           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_44\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2589             :                 }
    2590           0 :                 break;
    2591             :         }
    2592         784 :         case 69: { /* spoolss_OpenPrinterEx */
    2593         784 :                 struct spoolss_OpenPrinterEx *r2 = (struct spoolss_OpenPrinterEx *)r;
    2594         784 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2595           0 :                         DEBUG(5,("function spoolss_OpenPrinterEx replied async\n"));
    2596             :                 }
    2597         784 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2598           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_OpenPrinterEx, NDR_OUT | NDR_SET_VALUES, r2);
    2599             :                 }
    2600         784 :                 if (dce_call->fault_code != 0) {
    2601           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_OpenPrinterEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2602             :                 }
    2603         784 :                 break;
    2604             :         }
    2605          24 :         case 70: { /* spoolss_AddPrinterEx */
    2606          24 :                 struct spoolss_AddPrinterEx *r2 = (struct spoolss_AddPrinterEx *)r;
    2607          24 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2608           0 :                         DEBUG(5,("function spoolss_AddPrinterEx replied async\n"));
    2609             :                 }
    2610          24 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2611           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterEx, NDR_OUT | NDR_SET_VALUES, r2);
    2612             :                 }
    2613          24 :                 if (dce_call->fault_code != 0) {
    2614           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPrinterEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2615             :                 }
    2616          24 :                 break;
    2617             :         }
    2618           0 :         case 71: { /* spoolss_SetPort */
    2619           0 :                 struct spoolss_SetPort *r2 = (struct spoolss_SetPort *)r;
    2620           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2621           0 :                         DEBUG(5,("function spoolss_SetPort replied async\n"));
    2622             :                 }
    2623           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2624           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPort, NDR_OUT | NDR_SET_VALUES, r2);
    2625             :                 }
    2626           0 :                 if (dce_call->fault_code != 0) {
    2627           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SetPort\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2628             :                 }
    2629           0 :                 break;
    2630             :         }
    2631         152 :         case 72: { /* spoolss_EnumPrinterData */
    2632         152 :                 struct spoolss_EnumPrinterData *r2 = (struct spoolss_EnumPrinterData *)r;
    2633         152 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2634           0 :                         DEBUG(5,("function spoolss_EnumPrinterData replied async\n"));
    2635             :                 }
    2636         152 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2637           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterData, NDR_OUT | NDR_SET_VALUES, r2);
    2638             :                 }
    2639         152 :                 if (dce_call->fault_code != 0) {
    2640           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2641             :                 }
    2642         152 :                 break;
    2643             :         }
    2644         168 :         case 73: { /* spoolss_DeletePrinterData */
    2645         168 :                 struct spoolss_DeletePrinterData *r2 = (struct spoolss_DeletePrinterData *)r;
    2646         168 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2647           0 :                         DEBUG(5,("function spoolss_DeletePrinterData replied async\n"));
    2648             :                 }
    2649         168 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2650           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterData, NDR_OUT | NDR_SET_VALUES, r2);
    2651             :                 }
    2652         168 :                 if (dce_call->fault_code != 0) {
    2653           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2654             :                 }
    2655         168 :                 break;
    2656             :         }
    2657           0 :         case 74: { /* spoolss_4a */
    2658           0 :                 struct spoolss_4a *r2 = (struct spoolss_4a *)r;
    2659           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2660           0 :                         DEBUG(5,("function spoolss_4a replied async\n"));
    2661             :                 }
    2662           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2663           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_4a, NDR_OUT | NDR_SET_VALUES, r2);
    2664             :                 }
    2665           0 :                 if (dce_call->fault_code != 0) {
    2666           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_4a\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2667             :                 }
    2668           0 :                 break;
    2669             :         }
    2670           0 :         case 75: { /* spoolss_4b */
    2671           0 :                 struct spoolss_4b *r2 = (struct spoolss_4b *)r;
    2672           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2673           0 :                         DEBUG(5,("function spoolss_4b replied async\n"));
    2674             :                 }
    2675           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2676           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_4b, NDR_OUT | NDR_SET_VALUES, r2);
    2677             :                 }
    2678           0 :                 if (dce_call->fault_code != 0) {
    2679           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_4b\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2680             :                 }
    2681           0 :                 break;
    2682             :         }
    2683           0 :         case 76: { /* spoolss_4c */
    2684           0 :                 struct spoolss_4c *r2 = (struct spoolss_4c *)r;
    2685           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2686           0 :                         DEBUG(5,("function spoolss_4c replied async\n"));
    2687             :                 }
    2688           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2689           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_4c, NDR_OUT | NDR_SET_VALUES, r2);
    2690             :                 }
    2691           0 :                 if (dce_call->fault_code != 0) {
    2692           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_4c\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2693             :                 }
    2694           0 :                 break;
    2695             :         }
    2696        1200 :         case 77: { /* spoolss_SetPrinterDataEx */
    2697        1200 :                 struct spoolss_SetPrinterDataEx *r2 = (struct spoolss_SetPrinterDataEx *)r;
    2698        1200 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2699           0 :                         DEBUG(5,("function spoolss_SetPrinterDataEx replied async\n"));
    2700             :                 }
    2701        1200 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2702           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetPrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
    2703             :                 }
    2704        1200 :                 if (dce_call->fault_code != 0) {
    2705           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SetPrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2706             :                 }
    2707        1200 :                 break;
    2708             :         }
    2709        2700 :         case 78: { /* spoolss_GetPrinterDataEx */
    2710        2700 :                 struct spoolss_GetPrinterDataEx *r2 = (struct spoolss_GetPrinterDataEx *)r;
    2711        2700 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2712           0 :                         DEBUG(5,("function spoolss_GetPrinterDataEx replied async\n"));
    2713             :                 }
    2714        2700 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2715           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
    2716             :                 }
    2717        2700 :                 if (dce_call->fault_code != 0) {
    2718           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2719             :                 }
    2720        2700 :                 break;
    2721             :         }
    2722        2596 :         case 79: { /* spoolss_EnumPrinterDataEx */
    2723        2596 :                 struct spoolss_EnumPrinterDataEx *r2 = (struct spoolss_EnumPrinterDataEx *)r;
    2724        2596 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2725           0 :                         DEBUG(5,("function spoolss_EnumPrinterDataEx replied async\n"));
    2726             :                 }
    2727        2596 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2728           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
    2729             :                 }
    2730        2596 :                 if (dce_call->fault_code != 0) {
    2731           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2732             :                 }
    2733        2596 :                 break;
    2734             :         }
    2735        3384 :         case 80: { /* spoolss_EnumPrinterKey */
    2736        3384 :                 struct spoolss_EnumPrinterKey *r2 = (struct spoolss_EnumPrinterKey *)r;
    2737        3384 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2738           0 :                         DEBUG(5,("function spoolss_EnumPrinterKey replied async\n"));
    2739             :                 }
    2740        3384 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2741           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPrinterKey, NDR_OUT | NDR_SET_VALUES, r2);
    2742             :                 }
    2743        3384 :                 if (dce_call->fault_code != 0) {
    2744           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPrinterKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2745             :                 }
    2746        3384 :                 break;
    2747             :         }
    2748        1200 :         case 81: { /* spoolss_DeletePrinterDataEx */
    2749        1200 :                 struct spoolss_DeletePrinterDataEx *r2 = (struct spoolss_DeletePrinterDataEx *)r;
    2750        1200 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2751           0 :                         DEBUG(5,("function spoolss_DeletePrinterDataEx replied async\n"));
    2752             :                 }
    2753        1200 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2754           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
    2755             :                 }
    2756        1200 :                 if (dce_call->fault_code != 0) {
    2757           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2758             :                 }
    2759        1200 :                 break;
    2760             :         }
    2761         216 :         case 82: { /* spoolss_DeletePrinterKey */
    2762         216 :                 struct spoolss_DeletePrinterKey *r2 = (struct spoolss_DeletePrinterKey *)r;
    2763         216 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2764           0 :                         DEBUG(5,("function spoolss_DeletePrinterKey replied async\n"));
    2765             :                 }
    2766         216 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2767           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterKey, NDR_OUT | NDR_SET_VALUES, r2);
    2768             :                 }
    2769         216 :                 if (dce_call->fault_code != 0) {
    2770           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinterKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2771             :                 }
    2772         216 :                 break;
    2773             :         }
    2774           0 :         case 83: { /* spoolss_53 */
    2775           0 :                 struct spoolss_53 *r2 = (struct spoolss_53 *)r;
    2776           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2777           0 :                         DEBUG(5,("function spoolss_53 replied async\n"));
    2778             :                 }
    2779           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2780           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_53, NDR_OUT | NDR_SET_VALUES, r2);
    2781             :                 }
    2782           0 :                 if (dce_call->fault_code != 0) {
    2783           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_53\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2784             :                 }
    2785           0 :                 break;
    2786             :         }
    2787           0 :         case 84: { /* spoolss_DeletePrinterDriverEx */
    2788           0 :                 struct spoolss_DeletePrinterDriverEx *r2 = (struct spoolss_DeletePrinterDriverEx *)r;
    2789           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2790           0 :                         DEBUG(5,("function spoolss_DeletePrinterDriverEx replied async\n"));
    2791             :                 }
    2792           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2793           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePrinterDriverEx, NDR_OUT | NDR_SET_VALUES, r2);
    2794             :                 }
    2795           0 :                 if (dce_call->fault_code != 0) {
    2796           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePrinterDriverEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2797             :                 }
    2798           0 :                 break;
    2799             :         }
    2800           0 :         case 85: { /* spoolss_AddPerMachineConnection */
    2801           0 :                 struct spoolss_AddPerMachineConnection *r2 = (struct spoolss_AddPerMachineConnection *)r;
    2802           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2803           0 :                         DEBUG(5,("function spoolss_AddPerMachineConnection replied async\n"));
    2804             :                 }
    2805           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2806           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPerMachineConnection, NDR_OUT | NDR_SET_VALUES, r2);
    2807             :                 }
    2808           0 :                 if (dce_call->fault_code != 0) {
    2809           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPerMachineConnection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2810             :                 }
    2811           0 :                 break;
    2812             :         }
    2813           0 :         case 86: { /* spoolss_DeletePerMachineConnection */
    2814           0 :                 struct spoolss_DeletePerMachineConnection *r2 = (struct spoolss_DeletePerMachineConnection *)r;
    2815           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2816           0 :                         DEBUG(5,("function spoolss_DeletePerMachineConnection replied async\n"));
    2817             :                 }
    2818           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2819           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeletePerMachineConnection, NDR_OUT | NDR_SET_VALUES, r2);
    2820             :                 }
    2821           0 :                 if (dce_call->fault_code != 0) {
    2822           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeletePerMachineConnection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2823             :                 }
    2824           0 :                 break;
    2825             :         }
    2826           0 :         case 87: { /* spoolss_EnumPerMachineConnections */
    2827           0 :                 struct spoolss_EnumPerMachineConnections *r2 = (struct spoolss_EnumPerMachineConnections *)r;
    2828           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2829           0 :                         DEBUG(5,("function spoolss_EnumPerMachineConnections replied async\n"));
    2830             :                 }
    2831           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2832           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumPerMachineConnections, NDR_OUT | NDR_SET_VALUES, r2);
    2833             :                 }
    2834           0 :                 if (dce_call->fault_code != 0) {
    2835           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumPerMachineConnections\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2836             :                 }
    2837           0 :                 break;
    2838             :         }
    2839           0 :         case 88: { /* spoolss_XcvData */
    2840           0 :                 struct spoolss_XcvData *r2 = (struct spoolss_XcvData *)r;
    2841           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2842           0 :                         DEBUG(5,("function spoolss_XcvData replied async\n"));
    2843             :                 }
    2844           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2845           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_XcvData, NDR_OUT | NDR_SET_VALUES, r2);
    2846             :                 }
    2847           0 :                 if (dce_call->fault_code != 0) {
    2848           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_XcvData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2849             :                 }
    2850           0 :                 break;
    2851             :         }
    2852           0 :         case 89: { /* spoolss_AddPrinterDriverEx */
    2853           0 :                 struct spoolss_AddPrinterDriverEx *r2 = (struct spoolss_AddPrinterDriverEx *)r;
    2854           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2855           0 :                         DEBUG(5,("function spoolss_AddPrinterDriverEx replied async\n"));
    2856             :                 }
    2857           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2858           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_AddPrinterDriverEx, NDR_OUT | NDR_SET_VALUES, r2);
    2859             :                 }
    2860           0 :                 if (dce_call->fault_code != 0) {
    2861           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_AddPrinterDriverEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2862             :                 }
    2863           0 :                 break;
    2864             :         }
    2865           0 :         case 90: { /* spoolss_5a */
    2866           0 :                 struct spoolss_5a *r2 = (struct spoolss_5a *)r;
    2867           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2868           0 :                         DEBUG(5,("function spoolss_5a replied async\n"));
    2869             :                 }
    2870           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2871           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5a, NDR_OUT | NDR_SET_VALUES, r2);
    2872             :                 }
    2873           0 :                 if (dce_call->fault_code != 0) {
    2874           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_5a\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2875             :                 }
    2876           0 :                 break;
    2877             :         }
    2878           0 :         case 91: { /* spoolss_5b */
    2879           0 :                 struct spoolss_5b *r2 = (struct spoolss_5b *)r;
    2880           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2881           0 :                         DEBUG(5,("function spoolss_5b replied async\n"));
    2882             :                 }
    2883           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2884           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5b, NDR_OUT | NDR_SET_VALUES, r2);
    2885             :                 }
    2886           0 :                 if (dce_call->fault_code != 0) {
    2887           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_5b\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2888             :                 }
    2889           0 :                 break;
    2890             :         }
    2891           0 :         case 92: { /* spoolss_5c */
    2892           0 :                 struct spoolss_5c *r2 = (struct spoolss_5c *)r;
    2893           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2894           0 :                         DEBUG(5,("function spoolss_5c replied async\n"));
    2895             :                 }
    2896           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2897           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5c, NDR_OUT | NDR_SET_VALUES, r2);
    2898             :                 }
    2899           0 :                 if (dce_call->fault_code != 0) {
    2900           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_5c\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2901             :                 }
    2902           0 :                 break;
    2903             :         }
    2904           0 :         case 93: { /* spoolss_5d */
    2905           0 :                 struct spoolss_5d *r2 = (struct spoolss_5d *)r;
    2906           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2907           0 :                         DEBUG(5,("function spoolss_5d replied async\n"));
    2908             :                 }
    2909           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2910           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5d, NDR_OUT | NDR_SET_VALUES, r2);
    2911             :                 }
    2912           0 :                 if (dce_call->fault_code != 0) {
    2913           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_5d\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2914             :                 }
    2915           0 :                 break;
    2916             :         }
    2917           0 :         case 94: { /* spoolss_5e */
    2918           0 :                 struct spoolss_5e *r2 = (struct spoolss_5e *)r;
    2919           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2920           0 :                         DEBUG(5,("function spoolss_5e replied async\n"));
    2921             :                 }
    2922           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2923           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5e, NDR_OUT | NDR_SET_VALUES, r2);
    2924             :                 }
    2925           0 :                 if (dce_call->fault_code != 0) {
    2926           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_5e\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2927             :                 }
    2928           0 :                 break;
    2929             :         }
    2930           0 :         case 95: { /* spoolss_5f */
    2931           0 :                 struct spoolss_5f *r2 = (struct spoolss_5f *)r;
    2932           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2933           0 :                         DEBUG(5,("function spoolss_5f replied async\n"));
    2934             :                 }
    2935           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2936           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_5f, NDR_OUT | NDR_SET_VALUES, r2);
    2937             :                 }
    2938           0 :                 if (dce_call->fault_code != 0) {
    2939           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_5f\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2940             :                 }
    2941           0 :                 break;
    2942             :         }
    2943           0 :         case 96: { /* spoolss_60 */
    2944           0 :                 struct spoolss_60 *r2 = (struct spoolss_60 *)r;
    2945           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2946           0 :                         DEBUG(5,("function spoolss_60 replied async\n"));
    2947             :                 }
    2948           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2949           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_60, NDR_OUT | NDR_SET_VALUES, r2);
    2950             :                 }
    2951           0 :                 if (dce_call->fault_code != 0) {
    2952           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_60\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2953             :                 }
    2954           0 :                 break;
    2955             :         }
    2956           0 :         case 97: { /* spoolss_SendRecvBidiData */
    2957           0 :                 struct spoolss_SendRecvBidiData *r2 = (struct spoolss_SendRecvBidiData *)r;
    2958           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2959           0 :                         DEBUG(5,("function spoolss_SendRecvBidiData replied async\n"));
    2960             :                 }
    2961           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2962           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SendRecvBidiData, NDR_OUT | NDR_SET_VALUES, r2);
    2963             :                 }
    2964           0 :                 if (dce_call->fault_code != 0) {
    2965           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SendRecvBidiData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2966             :                 }
    2967           0 :                 break;
    2968             :         }
    2969           0 :         case 98: { /* spoolss_62 */
    2970           0 :                 struct spoolss_62 *r2 = (struct spoolss_62 *)r;
    2971           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2972           0 :                         DEBUG(5,("function spoolss_62 replied async\n"));
    2973             :                 }
    2974           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2975           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_62, NDR_OUT | NDR_SET_VALUES, r2);
    2976             :                 }
    2977           0 :                 if (dce_call->fault_code != 0) {
    2978           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_62\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2979             :                 }
    2980           0 :                 break;
    2981             :         }
    2982           0 :         case 99: { /* spoolss_63 */
    2983           0 :                 struct spoolss_63 *r2 = (struct spoolss_63 *)r;
    2984           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2985           0 :                         DEBUG(5,("function spoolss_63 replied async\n"));
    2986             :                 }
    2987           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    2988           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_63, NDR_OUT | NDR_SET_VALUES, r2);
    2989             :                 }
    2990           0 :                 if (dce_call->fault_code != 0) {
    2991           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_63\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    2992             :                 }
    2993           0 :                 break;
    2994             :         }
    2995           0 :         case 100: { /* spoolss_64 */
    2996           0 :                 struct spoolss_64 *r2 = (struct spoolss_64 *)r;
    2997           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    2998           0 :                         DEBUG(5,("function spoolss_64 replied async\n"));
    2999             :                 }
    3000           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3001           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_64, NDR_OUT | NDR_SET_VALUES, r2);
    3002             :                 }
    3003           0 :                 if (dce_call->fault_code != 0) {
    3004           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_64\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3005             :                 }
    3006           0 :                 break;
    3007             :         }
    3008           0 :         case 101: { /* spoolss_65 */
    3009           0 :                 struct spoolss_65 *r2 = (struct spoolss_65 *)r;
    3010           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3011           0 :                         DEBUG(5,("function spoolss_65 replied async\n"));
    3012             :                 }
    3013           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3014           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_65, NDR_OUT | NDR_SET_VALUES, r2);
    3015             :                 }
    3016           0 :                 if (dce_call->fault_code != 0) {
    3017           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_65\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3018             :                 }
    3019           0 :                 break;
    3020             :         }
    3021           0 :         case 102: { /* spoolss_GetCorePrinterDrivers */
    3022           0 :                 struct spoolss_GetCorePrinterDrivers *r2 = (struct spoolss_GetCorePrinterDrivers *)r;
    3023           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3024           0 :                         DEBUG(5,("function spoolss_GetCorePrinterDrivers replied async\n"));
    3025             :                 }
    3026           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3027           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetCorePrinterDrivers, NDR_OUT | NDR_SET_VALUES, r2);
    3028             :                 }
    3029           0 :                 if (dce_call->fault_code != 0) {
    3030           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetCorePrinterDrivers\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3031             :                 }
    3032           0 :                 break;
    3033             :         }
    3034           0 :         case 103: { /* spoolss_67 */
    3035           0 :                 struct spoolss_67 *r2 = (struct spoolss_67 *)r;
    3036           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3037           0 :                         DEBUG(5,("function spoolss_67 replied async\n"));
    3038             :                 }
    3039           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3040           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_67, NDR_OUT | NDR_SET_VALUES, r2);
    3041             :                 }
    3042           0 :                 if (dce_call->fault_code != 0) {
    3043           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_67\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3044             :                 }
    3045           0 :                 break;
    3046             :         }
    3047           0 :         case 104: { /* spoolss_GetPrinterDriverPackagePath */
    3048           0 :                 struct spoolss_GetPrinterDriverPackagePath *r2 = (struct spoolss_GetPrinterDriverPackagePath *)r;
    3049           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3050           0 :                         DEBUG(5,("function spoolss_GetPrinterDriverPackagePath replied async\n"));
    3051             :                 }
    3052           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3053           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetPrinterDriverPackagePath, NDR_OUT | NDR_SET_VALUES, r2);
    3054             :                 }
    3055           0 :                 if (dce_call->fault_code != 0) {
    3056           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetPrinterDriverPackagePath\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3057             :                 }
    3058           0 :                 break;
    3059             :         }
    3060           0 :         case 105: { /* spoolss_69 */
    3061           0 :                 struct spoolss_69 *r2 = (struct spoolss_69 *)r;
    3062           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3063           0 :                         DEBUG(5,("function spoolss_69 replied async\n"));
    3064             :                 }
    3065           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3066           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_69, NDR_OUT | NDR_SET_VALUES, r2);
    3067             :                 }
    3068           0 :                 if (dce_call->fault_code != 0) {
    3069           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_69\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3070             :                 }
    3071           0 :                 break;
    3072             :         }
    3073           0 :         case 106: { /* spoolss_6a */
    3074           0 :                 struct spoolss_6a *r2 = (struct spoolss_6a *)r;
    3075           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3076           0 :                         DEBUG(5,("function spoolss_6a replied async\n"));
    3077             :                 }
    3078           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3079           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6a, NDR_OUT | NDR_SET_VALUES, r2);
    3080             :                 }
    3081           0 :                 if (dce_call->fault_code != 0) {
    3082           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_6a\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3083             :                 }
    3084           0 :                 break;
    3085             :         }
    3086           0 :         case 107: { /* spoolss_6b */
    3087           0 :                 struct spoolss_6b *r2 = (struct spoolss_6b *)r;
    3088           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3089           0 :                         DEBUG(5,("function spoolss_6b replied async\n"));
    3090             :                 }
    3091           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3092           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6b, NDR_OUT | NDR_SET_VALUES, r2);
    3093             :                 }
    3094           0 :                 if (dce_call->fault_code != 0) {
    3095           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_6b\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3096             :                 }
    3097           0 :                 break;
    3098             :         }
    3099           0 :         case 108: { /* spoolss_6c */
    3100           0 :                 struct spoolss_6c *r2 = (struct spoolss_6c *)r;
    3101           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3102           0 :                         DEBUG(5,("function spoolss_6c replied async\n"));
    3103             :                 }
    3104           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3105           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6c, NDR_OUT | NDR_SET_VALUES, r2);
    3106             :                 }
    3107           0 :                 if (dce_call->fault_code != 0) {
    3108           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_6c\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3109             :                 }
    3110           0 :                 break;
    3111             :         }
    3112           0 :         case 109: { /* spoolss_6d */
    3113           0 :                 struct spoolss_6d *r2 = (struct spoolss_6d *)r;
    3114           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3115           0 :                         DEBUG(5,("function spoolss_6d replied async\n"));
    3116             :                 }
    3117           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3118           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_6d, NDR_OUT | NDR_SET_VALUES, r2);
    3119             :                 }
    3120           0 :                 if (dce_call->fault_code != 0) {
    3121           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_6d\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3122             :                 }
    3123           0 :                 break;
    3124             :         }
    3125           0 :         case 110: { /* spoolss_GetJobNamedPropertyValue */
    3126           0 :                 struct spoolss_GetJobNamedPropertyValue *r2 = (struct spoolss_GetJobNamedPropertyValue *)r;
    3127           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3128           0 :                         DEBUG(5,("function spoolss_GetJobNamedPropertyValue replied async\n"));
    3129             :                 }
    3130           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3131           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_GetJobNamedPropertyValue, NDR_OUT | NDR_SET_VALUES, r2);
    3132             :                 }
    3133           0 :                 if (dce_call->fault_code != 0) {
    3134           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_GetJobNamedPropertyValue\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3135             :                 }
    3136           0 :                 break;
    3137             :         }
    3138           0 :         case 111: { /* spoolss_SetJobNamedProperty */
    3139           0 :                 struct spoolss_SetJobNamedProperty *r2 = (struct spoolss_SetJobNamedProperty *)r;
    3140           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3141           0 :                         DEBUG(5,("function spoolss_SetJobNamedProperty replied async\n"));
    3142             :                 }
    3143           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3144           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_SetJobNamedProperty, NDR_OUT | NDR_SET_VALUES, r2);
    3145             :                 }
    3146           0 :                 if (dce_call->fault_code != 0) {
    3147           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_SetJobNamedProperty\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3148             :                 }
    3149           0 :                 break;
    3150             :         }
    3151           0 :         case 112: { /* spoolss_DeleteJobNamedProperty */
    3152           0 :                 struct spoolss_DeleteJobNamedProperty *r2 = (struct spoolss_DeleteJobNamedProperty *)r;
    3153           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3154           0 :                         DEBUG(5,("function spoolss_DeleteJobNamedProperty replied async\n"));
    3155             :                 }
    3156           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3157           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_DeleteJobNamedProperty, NDR_OUT | NDR_SET_VALUES, r2);
    3158             :                 }
    3159           0 :                 if (dce_call->fault_code != 0) {
    3160           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_DeleteJobNamedProperty\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3161             :                 }
    3162           0 :                 break;
    3163             :         }
    3164           0 :         case 113: { /* spoolss_EnumJobNamedProperties */
    3165           0 :                 struct spoolss_EnumJobNamedProperties *r2 = (struct spoolss_EnumJobNamedProperties *)r;
    3166           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3167           0 :                         DEBUG(5,("function spoolss_EnumJobNamedProperties replied async\n"));
    3168             :                 }
    3169           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3170           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_EnumJobNamedProperties, NDR_OUT | NDR_SET_VALUES, r2);
    3171             :                 }
    3172           0 :                 if (dce_call->fault_code != 0) {
    3173           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_EnumJobNamedProperties\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3174             :                 }
    3175           0 :                 break;
    3176             :         }
    3177           0 :         case 114: { /* spoolss_72 */
    3178           0 :                 struct spoolss_72 *r2 = (struct spoolss_72 *)r;
    3179           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3180           0 :                         DEBUG(5,("function spoolss_72 replied async\n"));
    3181             :                 }
    3182           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3183           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_72, NDR_OUT | NDR_SET_VALUES, r2);
    3184             :                 }
    3185           0 :                 if (dce_call->fault_code != 0) {
    3186           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_72\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3187             :                 }
    3188           0 :                 break;
    3189             :         }
    3190           0 :         case 115: { /* spoolss_73 */
    3191           0 :                 struct spoolss_73 *r2 = (struct spoolss_73 *)r;
    3192           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3193           0 :                         DEBUG(5,("function spoolss_73 replied async\n"));
    3194             :                 }
    3195           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3196           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_73, NDR_OUT | NDR_SET_VALUES, r2);
    3197             :                 }
    3198           0 :                 if (dce_call->fault_code != 0) {
    3199           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_73\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3200             :                 }
    3201           0 :                 break;
    3202             :         }
    3203           0 :         case 116: { /* spoolss_LogJobInfoForBranchOffice */
    3204           0 :                 struct spoolss_LogJobInfoForBranchOffice *r2 = (struct spoolss_LogJobInfoForBranchOffice *)r;
    3205           0 :                 if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
    3206           0 :                         DEBUG(5,("function spoolss_LogJobInfoForBranchOffice replied async\n"));
    3207             :                 }
    3208           0 :                 if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
    3209           0 :                         NDR_PRINT_FUNCTION_DEBUG(spoolss_LogJobInfoForBranchOffice, NDR_OUT | NDR_SET_VALUES, r2);
    3210             :                 }
    3211           0 :                 if (dce_call->fault_code != 0) {
    3212           0 :                         DBG_WARNING("dcerpc_fault %s in spoolss_LogJobInfoForBranchOffice\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
    3213             :                 }
    3214           0 :                 break;
    3215             :         }
    3216           0 :         default:
    3217           0 :                 dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
    3218           0 :                 break;
    3219             :         }
    3220             : 
    3221       34982 :         if (dce_call->fault_code != 0) {
    3222           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    3223             :         }
    3224             : 
    3225       34982 :         return NT_STATUS_OK;
    3226             : }
    3227             : 
    3228       34982 : NTSTATUS spoolss__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
    3229             : {
    3230             :         enum ndr_err_code ndr_err;
    3231       34982 :         uint16_t opnum = dce_call->pkt.u.request.opnum;
    3232             : 
    3233       34982 :         ndr_err = ndr_table_spoolss.calls[opnum].ndr_push(push, NDR_OUT, r);
    3234       34982 :         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
    3235           0 :                 dce_call->fault_code = DCERPC_FAULT_NDR;
    3236           0 :                 return NT_STATUS_NET_WRITE_FAULT;
    3237             :         }
    3238             : 
    3239       34982 :         return NT_STATUS_OK;
    3240             : }
    3241             : 
    3242          66 : NTSTATUS spoolss__op_local(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
    3243             : {
    3244          66 :         return spoolss__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_INTERNAL);
    3245             : }
    3246             : 
    3247             : static const struct dcesrv_interface dcesrv_spoolss_interface = {
    3248             :         .name      = "spoolss",
    3249             :         .syntax_id = {{0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},1.0},
    3250             :         .bind      = spoolss__op_bind,
    3251             :         .unbind    = spoolss__op_unbind,
    3252             :         .ndr_pull  = spoolss__op_ndr_pull,
    3253             :         .dispatch  = spoolss__op_dispatch,
    3254             :         .reply     = spoolss__op_reply,
    3255             :         .ndr_push  = spoolss__op_ndr_push,
    3256             :         .local     = spoolss__op_local,
    3257             : #ifdef DCESRV_INTERFACE_SPOOLSS_FLAGS
    3258             :         .flags     = DCESRV_INTERFACE_SPOOLSS_FLAGS
    3259             : #else
    3260             :         .flags     = 0
    3261             : #endif
    3262             : };
    3263             : 
    3264         120 : static NTSTATUS spoolss__check_register_in_endpoint(const char *name, struct dcerpc_binding *binding) {
    3265         120 :         enum dcerpc_transport_t transport = dcerpc_binding_get_transport(binding);
    3266             :         NTSTATUS status;
    3267             : 
    3268             :         /* If service is disabled, do not register */
    3269         120 :         if (rpc_service_mode(name) == RPC_SERVICE_MODE_DISABLED) {
    3270           0 :                 return NT_STATUS_NOT_IMPLEMENTED;
    3271             :         }
    3272             : 
    3273             :         /* If service is embedded, register only for ncacn_np
    3274             :          * see 8466b3c85e4b835e57e41776853093f4a0edc8b8
    3275             :          */
    3276         120 :         if (rpc_service_mode(name) == RPC_SERVICE_MODE_EMBEDDED && (transport != NCACN_NP && transport != NCALRPC)) {
    3277           0 :                 DBG_INFO("Interface 'spoolss' not registered in endpoint '%s' as service is embedded\n", name);
    3278           0 :                 return NT_STATUS_NOT_SUPPORTED;
    3279             :         }
    3280             : 
    3281             :         /*
    3282             :          * If rpc service is external then change the default ncalrpc endpoint,
    3283             :          * otherwise if the rpc daemon running this service is configured in
    3284             :          * fork mode the forked process will race with main smbd to accept the
    3285             :          * connections in the default ncalrpc socket, and the forked process
    3286             :          * may not have the requested interface registered.
    3287             :          * For example, in the ad_member test environment:
    3288             :          *
    3289             :          *   rpc_server:lsarpc = external
    3290             :          *   rpc_server:samr = external
    3291             :          *   rpc_server:netlogon = disabled
    3292             :          *   rpc_daemon:lsasd = fork
    3293             :          *
    3294             :          * With these settings both, the main smbd and all the preforked lsasd
    3295             :          * processes would be listening in the default ncalrpc socket if it is
    3296             :          * not changed. If a client connection is accepted by one of the lsasd
    3297             :          * worker processes and the client asks for an interface not registered
    3298             :          * in these processes (winreg for example) it will get an error.
    3299             :          */
    3300         120 :         if (rpc_service_mode(name) == RPC_SERVICE_MODE_EXTERNAL && transport == NCALRPC) {
    3301           8 :                 status = dcerpc_binding_set_string_option(binding, "endpoint", "SPOOLSS");
    3302           8 :                 if (!NT_STATUS_IS_OK(status)) {
    3303           0 :                         return status;
    3304             :                 }
    3305             :         }
    3306             : 
    3307         120 :         return NT_STATUS_OK;
    3308             : }
    3309             : 
    3310          60 : static NTSTATUS spoolss__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    3311             : {
    3312             :         uint32_t i;
    3313             :         NTSTATUS ret;
    3314             :         struct dcerpc_binding *binding;
    3315          58 :         struct dcerpc_binding *binding2 = NULL;
    3316             : 
    3317             : #ifdef DCESRV_INTERFACE_SPOOLSS_NCACN_NP_SECONDARY_ENDPOINT
    3318             :         const char *ncacn_np_secondary_endpoint = DCESRV_INTERFACE_SPOOLSS_NCACN_NP_SECONDARY_ENDPOINT;
    3319             : #else
    3320          58 :         const char *ncacn_np_secondary_endpoint = NULL;
    3321             : #endif
    3322             : 
    3323         178 :         for (i=0;i<ndr_table_spoolss.endpoints->count;i++) {
    3324         120 :                 const char *name = ndr_table_spoolss.endpoints->names[i];
    3325             : 
    3326         120 :                 ret = dcerpc_parse_binding(dce_ctx, name, &binding);
    3327         120 :                 if (NT_STATUS_IS_ERR(ret)) {
    3328           0 :                         DBG_ERR("Failed to parse binding string '%s'\n", name);
    3329           0 :                         return ret;
    3330             :                 }
    3331             : 
    3332         120 :                 ret = spoolss__check_register_in_endpoint("spoolss", binding);
    3333         120 :                 if (NT_STATUS_IS_ERR(ret)) {
    3334           0 :                         talloc_free(binding);
    3335           0 :                         continue;
    3336             :                 }
    3337             : 
    3338         116 :                 if (ncacn_np_secondary_endpoint != NULL) {
    3339           0 :                         ret = dcerpc_parse_binding(dce_ctx, ncacn_np_secondary_endpoint, &binding2);
    3340           0 :                         if (NT_STATUS_IS_ERR(ret)) {
    3341           0 :                                 DBG_ERR("Failed to parse 2nd binding string '%s'\n", ncacn_np_secondary_endpoint);
    3342           0 :                                 TALLOC_FREE(binding);
    3343           0 :                                 return ret;
    3344             :                         }
    3345             :                 }
    3346             : 
    3347         120 :                 ret = dcesrv_interface_register_b(dce_ctx, binding, binding2, &dcesrv_spoolss_interface, NULL);
    3348         120 :                 TALLOC_FREE(binding);
    3349         116 :                 TALLOC_FREE(binding2);
    3350         120 :                 if (!NT_STATUS_IS_OK(ret)) {
    3351           0 :                         DBG_ERR("Failed to register endpoint '%s'\n",name);
    3352           0 :                         return ret;
    3353             :                 }
    3354             :         }
    3355             : 
    3356          60 :         return NT_STATUS_OK;
    3357             : }
    3358             : 
    3359           1 : static NTSTATUS spoolss__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
    3360             : {
    3361           1 :         return NT_STATUS_OK;
    3362             : }
    3363             : 
    3364           0 : static bool spoolss__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
    3365             : {
    3366           0 :         if (dcesrv_spoolss_interface.syntax_id.if_version == if_version && GUID_equal(&dcesrv_spoolss_interface.syntax_id.uuid, uuid)) {
    3367           0 :                 memcpy(iface,&dcesrv_spoolss_interface, sizeof(*iface));
    3368           0 :                 return true;
    3369             :         }
    3370             : 
    3371           0 :         return false;
    3372             : }
    3373             : 
    3374           0 : static bool spoolss__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
    3375             : {
    3376           0 :         if (strcmp(dcesrv_spoolss_interface.name, name)==0) {
    3377           0 :                 memcpy(iface, &dcesrv_spoolss_interface, sizeof(*iface));
    3378           0 :                 return true;
    3379             :         }
    3380             : 
    3381           0 :         return false;
    3382             : }
    3383             : 
    3384             : static const struct dcesrv_endpoint_server spoolss_ep_server = {
    3385             :         /* fill in our name */
    3386             :         .name = "spoolss",
    3387             : 
    3388             :         /* Initialization flag */
    3389             :         .initialized = false,
    3390             : 
    3391             :         /* fill in all the operations */
    3392             : #ifdef DCESRV_INTERFACE_SPOOLSS_INIT_SERVER
    3393             :         .init_server = DCESRV_INTERFACE_SPOOLSS_INIT_SERVER,
    3394             : #else
    3395             :         .init_server = spoolss__op_init_server,
    3396             : #endif
    3397             : #ifdef DCESRV_INTERFACE_SPOOLSS_SHUTDOWN_SERVER
    3398             :         .shutdown_server = DCESRV_INTERFACE_SPOOLSS_SHUTDOWN_SERVER,
    3399             : #else
    3400             :         .shutdown_server = spoolss__op_shutdown_server,
    3401             : #endif
    3402             :         .interface_by_uuid = spoolss__op_interface_by_uuid,
    3403             :         .interface_by_name = spoolss__op_interface_by_name
    3404             : };
    3405             : 
    3406          68 : const struct dcesrv_endpoint_server *spoolss_get_ep_server(void)
    3407             : {
    3408          68 :         return &spoolss_ep_server;
    3409             : }

Generated by: LCOV version 1.13