Line data Source code
1 : /*
2 : * Unix SMB/CIFS implementation.
3 : * server auto-generated by pidl. DO NOT MODIFY!
4 : */
5 :
6 : #include "includes.h"
7 : #include "ntdomain.h"
8 : #include "librpc/rpc/dcesrv_core.h"
9 : #include "librpc/gen_ndr/ndr_spoolss.h"
10 : #include "librpc/gen_ndr/ndr_winspool.h"
11 : #include "librpc/gen_ndr/ndr_winspool_scompat.h"
12 : #include "librpc/gen_ndr/ndr_spoolss_scompat.h"
13 : #include "rpc_server/rpc_config.h"
14 : #include "rpc_server/rpc_server.h"
15 : #include "rpc_server/spoolss/iremotewinspool_util.h"
16 :
17 0 : static bool forward_opnum_to_spoolss(uint16_t opnum) {
18 0 : switch (opnum) {
19 0 : case 58: /* winspool_SyncRegisterForRemoteNotifications */
20 : case 59: /* winspool_SyncUnRegisterForRemoteNotifications */
21 : case 60: /* winspool_SyncRefreshRemoteNotifications */
22 : case 61: /* winspool_AsyncGetRemoteNotifications */
23 : case 62: /* winspool_AsyncInstallPrinterDriverFromPackage */
24 : case 63: /* winspool_AsyncUploadPrinterDriverPackage */
25 : case 65: /* winspool_AsyncCorePrinterDriverInstalled */
26 : case 67: /* winspool_AsyncDeletePrinterDriverPackage */
27 0 : return false;
28 0 : default:
29 0 : break;
30 : }
31 0 : return true;
32 : }
33 :
34 : /* iremotewinspool - dcerpc server boilerplate generated by pidl */
35 0 : static NTSTATUS iremotewinspool__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
36 : {
37 : #ifdef DCESRV_INTERFACE_IREMOTEWINSPOOL_BIND
38 : return DCESRV_INTERFACE_IREMOTEWINSPOOL_BIND(context,iface);
39 : #else
40 0 : return NT_STATUS_OK;
41 : #endif
42 : }
43 :
44 0 : static void iremotewinspool__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
45 : {
46 : #ifdef DCESRV_INTERFACE_IREMOTEWINSPOOL_UNBIND
47 : DCESRV_INTERFACE_IREMOTEWINSPOOL_UNBIND(context, iface);
48 : #else
49 0 : return;
50 : #endif
51 : }
52 :
53 0 : NTSTATUS iremotewinspool__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
54 : {
55 0 : enum ndr_err_code ndr_err;
56 0 : uint16_t opnum = dce_call->pkt.u.request.opnum;
57 0 : uint16_t mapped_opnum;
58 :
59 0 : dce_call->fault_code = 0;
60 :
61 0 : if (forward_opnum_to_spoolss(opnum)) {
62 0 : bool ok;
63 0 : ok = iremotewinspool_map_opcode(opnum, &mapped_opnum);
64 0 : if (ok) {
65 0 : dce_call->pkt.u.request.opnum = mapped_opnum;
66 : }
67 0 : return spoolss__op_ndr_pull(dce_call, mem_ctx, pull, r);
68 : }
69 :
70 0 : if (opnum >= ndr_table_iremotewinspool.num_calls) {
71 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
72 0 : return NT_STATUS_NET_WRITE_FAULT;
73 : }
74 :
75 0 : *r = talloc_named(mem_ctx, ndr_table_iremotewinspool.calls[opnum].struct_size, "struct %s", ndr_table_iremotewinspool.calls[opnum].name);
76 0 : NT_STATUS_HAVE_NO_MEMORY(*r);
77 :
78 : /* unravel the NDR for the packet */
79 0 : ndr_err = ndr_table_iremotewinspool.calls[opnum].ndr_pull(pull, NDR_IN, *r);
80 0 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
81 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
82 0 : return NT_STATUS_NET_WRITE_FAULT;
83 : }
84 :
85 0 : return NT_STATUS_OK;
86 : }
87 :
88 0 : static NTSTATUS iremotewinspool__op_dispatch_internal(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, bool rpcint_call)
89 : {
90 0 : uint16_t opnum = dce_call->pkt.u.request.opnum;
91 0 : struct pipes_struct *p = NULL;
92 0 : NTSTATUS status = NT_STATUS_OK;
93 0 : bool impersonated = false;
94 0 : bool ok;
95 0 : struct GUID object_uuid;
96 :
97 0 : ok = dce_call->pkt.pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID;
98 0 : if (!ok) {
99 0 : dce_call->fault_code = DCERPC_NCA_S_UNSUPPORTED_TYPE;
100 0 : return NT_STATUS_NET_WRITE_FAULT;
101 : }
102 :
103 0 : status = GUID_from_string(IREMOTEWINSPOOL_OBJECT_GUID, &object_uuid);
104 0 : if (!NT_STATUS_IS_OK(status)) {
105 0 : dce_call->fault_code = DCERPC_NCA_S_UNSUPPORTED_TYPE;
106 0 : return NT_STATUS_NET_WRITE_FAULT;
107 : }
108 :
109 0 : if (!GUID_equal(&dce_call->pkt.u.request.object.object, &object_uuid)) {
110 0 : dce_call->fault_code = DCERPC_NCA_S_UNSUPPORTED_TYPE;
111 0 : return NT_STATUS_NET_WRITE_FAULT;
112 : }
113 :
114 0 : if (forward_opnum_to_spoolss(opnum)) {
115 0 : return spoolss__op_dispatch(dce_call, mem_ctx, r);
116 : }
117 :
118 : /* Retrieve pipes struct */
119 0 : p = dcesrv_get_pipes_struct(dce_call->conn);
120 0 : p->dce_call = dce_call;
121 0 : p->mem_ctx = mem_ctx;
122 : /* Reset pipes struct fault state */
123 0 : p->fault_state = 0;
124 :
125 : /* Impersonate */
126 0 : if (!rpcint_call) {
127 0 : impersonated = become_authenticated_pipe_user(
128 0 : dce_call->auth_state->session_info);
129 0 : if (!impersonated) {
130 0 : dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
131 0 : status = NT_STATUS_NET_WRITE_FAULT;
132 0 : goto fail;
133 : }
134 : }
135 :
136 0 : switch (opnum) {
137 0 : case 0: { /* winspool_AsyncOpenPrinter */
138 0 : struct winspool_AsyncOpenPrinter *r2 = (struct winspool_AsyncOpenPrinter *)r;
139 0 : if (DEBUGLEVEL >= 10) {
140 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncOpenPrinter, NDR_IN, r2);
141 : }
142 0 : NDR_ZERO_STRUCT(r2->out);
143 0 : r2->out.pHandle = talloc_zero(r2, struct policy_handle);
144 0 : if (r2->out.pHandle == NULL) {
145 0 : status = NT_STATUS_NO_MEMORY;
146 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
147 0 : goto fail;
148 : }
149 :
150 0 : r2->out.result = _winspool_AsyncOpenPrinter(p, r2);
151 0 : break;
152 : }
153 0 : case 1: { /* winspool_AsyncAddPrinter */
154 0 : struct winspool_AsyncAddPrinter *r2 = (struct winspool_AsyncAddPrinter *)r;
155 0 : if (DEBUGLEVEL >= 10) {
156 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPrinter, NDR_IN, r2);
157 : }
158 0 : NDR_ZERO_STRUCT(r2->out);
159 0 : r2->out.pHandle = talloc_zero(r2, struct policy_handle);
160 0 : if (r2->out.pHandle == NULL) {
161 0 : status = NT_STATUS_NO_MEMORY;
162 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
163 0 : goto fail;
164 : }
165 :
166 0 : r2->out.result = _winspool_AsyncAddPrinter(p, r2);
167 0 : break;
168 : }
169 0 : case 2: { /* winspool_AsyncSetJob */
170 0 : struct winspool_AsyncSetJob *r2 = (struct winspool_AsyncSetJob *)r;
171 0 : if (DEBUGLEVEL >= 10) {
172 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetJob, NDR_IN, r2);
173 : }
174 0 : r2->out.result = _winspool_AsyncSetJob(p, r2);
175 0 : break;
176 : }
177 0 : case 3: { /* winspool_AsyncGetJob */
178 0 : struct winspool_AsyncGetJob *r2 = (struct winspool_AsyncGetJob *)r;
179 0 : if (DEBUGLEVEL >= 10) {
180 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetJob, NDR_IN, r2);
181 : }
182 0 : NDR_ZERO_STRUCT(r2->out);
183 0 : r2->out.pJob = r2->in.pJob;
184 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
185 0 : if (r2->out.pcbNeeded == NULL) {
186 0 : status = NT_STATUS_NO_MEMORY;
187 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
188 0 : goto fail;
189 : }
190 :
191 0 : r2->out.result = _winspool_AsyncGetJob(p, r2);
192 0 : break;
193 : }
194 0 : case 4: { /* winspool_AsyncEnumJobs */
195 0 : struct winspool_AsyncEnumJobs *r2 = (struct winspool_AsyncEnumJobs *)r;
196 0 : if (DEBUGLEVEL >= 10) {
197 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumJobs, NDR_IN, r2);
198 : }
199 0 : NDR_ZERO_STRUCT(r2->out);
200 0 : r2->out.pJob = r2->in.pJob;
201 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
202 0 : if (r2->out.pcbNeeded == NULL) {
203 0 : status = NT_STATUS_NO_MEMORY;
204 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
205 0 : goto fail;
206 : }
207 :
208 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
209 0 : if (r2->out.pcReturned == NULL) {
210 0 : status = NT_STATUS_NO_MEMORY;
211 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
212 0 : goto fail;
213 : }
214 :
215 0 : r2->out.result = _winspool_AsyncEnumJobs(p, r2);
216 0 : break;
217 : }
218 0 : case 5: { /* winspool_AsyncAddJob */
219 0 : struct winspool_AsyncAddJob *r2 = (struct winspool_AsyncAddJob *)r;
220 0 : if (DEBUGLEVEL >= 10) {
221 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddJob, NDR_IN, r2);
222 : }
223 0 : NDR_ZERO_STRUCT(r2->out);
224 0 : r2->out.pAddJob = r2->in.pAddJob;
225 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
226 0 : if (r2->out.pcbNeeded == NULL) {
227 0 : status = NT_STATUS_NO_MEMORY;
228 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
229 0 : goto fail;
230 : }
231 :
232 0 : r2->out.result = _winspool_AsyncAddJob(p, r2);
233 0 : break;
234 : }
235 0 : case 6: { /* winspool_AsyncScheduleJob */
236 0 : struct winspool_AsyncScheduleJob *r2 = (struct winspool_AsyncScheduleJob *)r;
237 0 : if (DEBUGLEVEL >= 10) {
238 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncScheduleJob, NDR_IN, r2);
239 : }
240 0 : r2->out.result = _winspool_AsyncScheduleJob(p, r2);
241 0 : break;
242 : }
243 0 : case 7: { /* winspool_AsyncDeletePrinter */
244 0 : struct winspool_AsyncDeletePrinter *r2 = (struct winspool_AsyncDeletePrinter *)r;
245 0 : if (DEBUGLEVEL >= 10) {
246 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinter, NDR_IN, r2);
247 : }
248 0 : r2->out.result = _winspool_AsyncDeletePrinter(p, r2);
249 0 : break;
250 : }
251 0 : case 8: { /* winspool_AsyncSetPrinter */
252 0 : struct winspool_AsyncSetPrinter *r2 = (struct winspool_AsyncSetPrinter *)r;
253 0 : if (DEBUGLEVEL >= 10) {
254 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPrinter, NDR_IN, r2);
255 : }
256 0 : r2->out.result = _winspool_AsyncSetPrinter(p, r2);
257 0 : break;
258 : }
259 0 : case 9: { /* winspool_AsyncGetPrinter */
260 0 : struct winspool_AsyncGetPrinter *r2 = (struct winspool_AsyncGetPrinter *)r;
261 0 : if (DEBUGLEVEL >= 10) {
262 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinter, NDR_IN, r2);
263 : }
264 0 : NDR_ZERO_STRUCT(r2->out);
265 0 : r2->out.pPrinter = r2->in.pPrinter;
266 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
267 0 : if (r2->out.pcbNeeded == NULL) {
268 0 : status = NT_STATUS_NO_MEMORY;
269 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
270 0 : goto fail;
271 : }
272 :
273 0 : r2->out.result = _winspool_AsyncGetPrinter(p, r2);
274 0 : break;
275 : }
276 0 : case 10: { /* winspool_AsyncStartDocPrinter */
277 0 : struct winspool_AsyncStartDocPrinter *r2 = (struct winspool_AsyncStartDocPrinter *)r;
278 0 : if (DEBUGLEVEL >= 10) {
279 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncStartDocPrinter, NDR_IN, r2);
280 : }
281 0 : NDR_ZERO_STRUCT(r2->out);
282 0 : r2->out.pJobId = talloc_zero(r2, uint32_t);
283 0 : if (r2->out.pJobId == NULL) {
284 0 : status = NT_STATUS_NO_MEMORY;
285 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
286 0 : goto fail;
287 : }
288 :
289 0 : r2->out.result = _winspool_AsyncStartDocPrinter(p, r2);
290 0 : break;
291 : }
292 0 : case 11: { /* winspool_AsyncStartPagePrinter */
293 0 : struct winspool_AsyncStartPagePrinter *r2 = (struct winspool_AsyncStartPagePrinter *)r;
294 0 : if (DEBUGLEVEL >= 10) {
295 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncStartPagePrinter, NDR_IN, r2);
296 : }
297 0 : r2->out.result = _winspool_AsyncStartPagePrinter(p, r2);
298 0 : break;
299 : }
300 0 : case 12: { /* winspool_AsyncWritePrinter */
301 0 : struct winspool_AsyncWritePrinter *r2 = (struct winspool_AsyncWritePrinter *)r;
302 0 : if (DEBUGLEVEL >= 10) {
303 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncWritePrinter, NDR_IN, r2);
304 : }
305 0 : NDR_ZERO_STRUCT(r2->out);
306 0 : r2->out.pcWritten = talloc_zero(r2, uint32_t);
307 0 : if (r2->out.pcWritten == NULL) {
308 0 : status = NT_STATUS_NO_MEMORY;
309 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
310 0 : goto fail;
311 : }
312 :
313 0 : r2->out.result = _winspool_AsyncWritePrinter(p, r2);
314 0 : break;
315 : }
316 0 : case 13: { /* winspool_AsyncEndPagePrinter */
317 0 : struct winspool_AsyncEndPagePrinter *r2 = (struct winspool_AsyncEndPagePrinter *)r;
318 0 : if (DEBUGLEVEL >= 10) {
319 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEndPagePrinter, NDR_IN, r2);
320 : }
321 0 : r2->out.result = _winspool_AsyncEndPagePrinter(p, r2);
322 0 : break;
323 : }
324 0 : case 14: { /* winspool_AsyncEndDocPrinter */
325 0 : struct winspool_AsyncEndDocPrinter *r2 = (struct winspool_AsyncEndDocPrinter *)r;
326 0 : if (DEBUGLEVEL >= 10) {
327 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEndDocPrinter, NDR_IN, r2);
328 : }
329 0 : r2->out.result = _winspool_AsyncEndDocPrinter(p, r2);
330 0 : break;
331 : }
332 0 : case 15: { /* winspool_AsyncAbortPrinter */
333 0 : struct winspool_AsyncAbortPrinter *r2 = (struct winspool_AsyncAbortPrinter *)r;
334 0 : if (DEBUGLEVEL >= 10) {
335 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAbortPrinter, NDR_IN, r2);
336 : }
337 0 : r2->out.result = _winspool_AsyncAbortPrinter(p, r2);
338 0 : break;
339 : }
340 0 : case 16: { /* winspool_AsyncGetPrinterData */
341 0 : struct winspool_AsyncGetPrinterData *r2 = (struct winspool_AsyncGetPrinterData *)r;
342 0 : if (DEBUGLEVEL >= 10) {
343 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterData, NDR_IN, r2);
344 : }
345 0 : NDR_ZERO_STRUCT(r2->out);
346 0 : r2->out.pType = talloc_zero(r2, uint32_t);
347 0 : if (r2->out.pType == NULL) {
348 0 : status = NT_STATUS_NO_MEMORY;
349 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
350 0 : goto fail;
351 : }
352 :
353 0 : r2->out.pData = talloc_zero_array(r2, uint8_t, r2->in.nSize);
354 0 : if (r2->out.pData == NULL) {
355 0 : status = NT_STATUS_NO_MEMORY;
356 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
357 0 : goto fail;
358 : }
359 :
360 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
361 0 : if (r2->out.pcbNeeded == NULL) {
362 0 : status = NT_STATUS_NO_MEMORY;
363 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
364 0 : goto fail;
365 : }
366 :
367 0 : r2->out.result = _winspool_AsyncGetPrinterData(p, r2);
368 0 : break;
369 : }
370 0 : case 17: { /* winspool_AsyncGetPrinterDataEx */
371 0 : struct winspool_AsyncGetPrinterDataEx *r2 = (struct winspool_AsyncGetPrinterDataEx *)r;
372 0 : if (DEBUGLEVEL >= 10) {
373 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDataEx, NDR_IN, r2);
374 : }
375 0 : NDR_ZERO_STRUCT(r2->out);
376 0 : r2->out.pType = talloc_zero(r2, uint32_t);
377 0 : if (r2->out.pType == NULL) {
378 0 : status = NT_STATUS_NO_MEMORY;
379 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
380 0 : goto fail;
381 : }
382 :
383 0 : r2->out.pData = talloc_zero_array(r2, uint8_t, r2->in.nSize);
384 0 : if (r2->out.pData == NULL) {
385 0 : status = NT_STATUS_NO_MEMORY;
386 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
387 0 : goto fail;
388 : }
389 :
390 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
391 0 : if (r2->out.pcbNeeded == NULL) {
392 0 : status = NT_STATUS_NO_MEMORY;
393 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
394 0 : goto fail;
395 : }
396 :
397 0 : r2->out.result = _winspool_AsyncGetPrinterDataEx(p, r2);
398 0 : break;
399 : }
400 0 : case 18: { /* winspool_AsyncSetPrinterData */
401 0 : struct winspool_AsyncSetPrinterData *r2 = (struct winspool_AsyncSetPrinterData *)r;
402 0 : if (DEBUGLEVEL >= 10) {
403 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPrinterData, NDR_IN, r2);
404 : }
405 0 : r2->out.result = _winspool_AsyncSetPrinterData(p, r2);
406 0 : break;
407 : }
408 0 : case 19: { /* winspool_AsyncSetPrinterDataEx */
409 0 : struct winspool_AsyncSetPrinterDataEx *r2 = (struct winspool_AsyncSetPrinterDataEx *)r;
410 0 : if (DEBUGLEVEL >= 10) {
411 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPrinterDataEx, NDR_IN, r2);
412 : }
413 0 : r2->out.result = _winspool_AsyncSetPrinterDataEx(p, r2);
414 0 : break;
415 : }
416 0 : case 20: { /* winspool_AsyncClosePrinter */
417 0 : struct winspool_AsyncClosePrinter *r2 = (struct winspool_AsyncClosePrinter *)r;
418 0 : if (DEBUGLEVEL >= 10) {
419 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncClosePrinter, NDR_IN, r2);
420 : }
421 0 : NDR_ZERO_STRUCT(r2->out);
422 0 : r2->out.phPrinter = r2->in.phPrinter;
423 0 : r2->out.result = _winspool_AsyncClosePrinter(p, r2);
424 0 : break;
425 : }
426 0 : case 21: { /* winspool_AsyncAddForm */
427 0 : struct winspool_AsyncAddForm *r2 = (struct winspool_AsyncAddForm *)r;
428 0 : if (DEBUGLEVEL >= 10) {
429 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddForm, NDR_IN, r2);
430 : }
431 0 : r2->out.result = _winspool_AsyncAddForm(p, r2);
432 0 : break;
433 : }
434 0 : case 22: { /* winspool_AsyncDeleteForm */
435 0 : struct winspool_AsyncDeleteForm *r2 = (struct winspool_AsyncDeleteForm *)r;
436 0 : if (DEBUGLEVEL >= 10) {
437 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeleteForm, NDR_IN, r2);
438 : }
439 0 : r2->out.result = _winspool_AsyncDeleteForm(p, r2);
440 0 : break;
441 : }
442 0 : case 23: { /* winspool_AsyncGetForm */
443 0 : struct winspool_AsyncGetForm *r2 = (struct winspool_AsyncGetForm *)r;
444 0 : if (DEBUGLEVEL >= 10) {
445 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetForm, NDR_IN, r2);
446 : }
447 0 : NDR_ZERO_STRUCT(r2->out);
448 0 : r2->out.pForm = r2->in.pForm;
449 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
450 0 : if (r2->out.pcbNeeded == NULL) {
451 0 : status = NT_STATUS_NO_MEMORY;
452 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
453 0 : goto fail;
454 : }
455 :
456 0 : r2->out.result = _winspool_AsyncGetForm(p, r2);
457 0 : break;
458 : }
459 0 : case 24: { /* winspool_AsyncSetForm */
460 0 : struct winspool_AsyncSetForm *r2 = (struct winspool_AsyncSetForm *)r;
461 0 : if (DEBUGLEVEL >= 10) {
462 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetForm, NDR_IN, r2);
463 : }
464 0 : r2->out.result = _winspool_AsyncSetForm(p, r2);
465 0 : break;
466 : }
467 0 : case 25: { /* winspool_AsyncEnumForms */
468 0 : struct winspool_AsyncEnumForms *r2 = (struct winspool_AsyncEnumForms *)r;
469 0 : if (DEBUGLEVEL >= 10) {
470 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumForms, NDR_IN, r2);
471 : }
472 0 : NDR_ZERO_STRUCT(r2->out);
473 0 : r2->out.pForm = r2->in.pForm;
474 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
475 0 : if (r2->out.pcbNeeded == 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.pcReturned = talloc_zero(r2, uint32_t);
482 0 : if (r2->out.pcReturned == 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 = _winspool_AsyncEnumForms(p, r2);
489 0 : break;
490 : }
491 0 : case 26: { /* winspool_AsyncGetPrinterDriver */
492 0 : struct winspool_AsyncGetPrinterDriver *r2 = (struct winspool_AsyncGetPrinterDriver *)r;
493 0 : if (DEBUGLEVEL >= 10) {
494 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDriver, NDR_IN, r2);
495 : }
496 0 : NDR_ZERO_STRUCT(r2->out);
497 0 : r2->out.pDriver = r2->in.pDriver;
498 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
499 0 : if (r2->out.pcbNeeded == NULL) {
500 0 : status = NT_STATUS_NO_MEMORY;
501 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
502 0 : goto fail;
503 : }
504 :
505 0 : r2->out.pdwServerMaxVersion = talloc_zero(r2, uint32_t);
506 0 : if (r2->out.pdwServerMaxVersion == NULL) {
507 0 : status = NT_STATUS_NO_MEMORY;
508 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
509 0 : goto fail;
510 : }
511 :
512 0 : r2->out.pdwServerMinVersion = talloc_zero(r2, uint32_t);
513 0 : if (r2->out.pdwServerMinVersion == NULL) {
514 0 : status = NT_STATUS_NO_MEMORY;
515 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
516 0 : goto fail;
517 : }
518 :
519 0 : r2->out.result = _winspool_AsyncGetPrinterDriver(p, r2);
520 0 : break;
521 : }
522 0 : case 27: { /* winspool_AsyncEnumPrinterData */
523 0 : struct winspool_AsyncEnumPrinterData *r2 = (struct winspool_AsyncEnumPrinterData *)r;
524 0 : if (DEBUGLEVEL >= 10) {
525 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterData, NDR_IN, r2);
526 : }
527 0 : NDR_ZERO_STRUCT(r2->out);
528 0 : r2->out.pValueName = talloc_zero_array(r2, uint16_t, r2->in.cbValueName / 2);
529 0 : if (r2->out.pValueName == NULL) {
530 0 : status = NT_STATUS_NO_MEMORY;
531 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
532 0 : goto fail;
533 : }
534 :
535 0 : r2->out.pcbValueName = talloc_zero(r2, uint32_t);
536 0 : if (r2->out.pcbValueName == NULL) {
537 0 : status = NT_STATUS_NO_MEMORY;
538 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
539 0 : goto fail;
540 : }
541 :
542 0 : r2->out.pType = talloc_zero(r2, uint32_t);
543 0 : if (r2->out.pType == NULL) {
544 0 : status = NT_STATUS_NO_MEMORY;
545 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
546 0 : goto fail;
547 : }
548 :
549 0 : r2->out.pData = talloc_zero_array(r2, uint8_t, r2->in.cbData);
550 0 : if (r2->out.pData == NULL) {
551 0 : status = NT_STATUS_NO_MEMORY;
552 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
553 0 : goto fail;
554 : }
555 :
556 0 : r2->out.pcbData = talloc_zero(r2, uint32_t);
557 0 : if (r2->out.pcbData == NULL) {
558 0 : status = NT_STATUS_NO_MEMORY;
559 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
560 0 : goto fail;
561 : }
562 :
563 0 : r2->out.result = _winspool_AsyncEnumPrinterData(p, r2);
564 0 : break;
565 : }
566 0 : case 28: { /* winspool_AsyncEnumPrinterDataEx */
567 0 : struct winspool_AsyncEnumPrinterDataEx *r2 = (struct winspool_AsyncEnumPrinterDataEx *)r;
568 0 : if (DEBUGLEVEL >= 10) {
569 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterDataEx, NDR_IN, r2);
570 : }
571 0 : NDR_ZERO_STRUCT(r2->out);
572 0 : r2->out.pEnumValues = talloc_zero_array(r2, uint8_t, r2->in.cbEnumValues);
573 0 : if (r2->out.pEnumValues == NULL) {
574 0 : status = NT_STATUS_NO_MEMORY;
575 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
576 0 : goto fail;
577 : }
578 :
579 0 : r2->out.pcbEnumValues = talloc_zero(r2, uint32_t);
580 0 : if (r2->out.pcbEnumValues == NULL) {
581 0 : status = NT_STATUS_NO_MEMORY;
582 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
583 0 : goto fail;
584 : }
585 :
586 0 : r2->out.pnEnumValues = talloc_zero(r2, uint32_t);
587 0 : if (r2->out.pnEnumValues == NULL) {
588 0 : status = NT_STATUS_NO_MEMORY;
589 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
590 0 : goto fail;
591 : }
592 :
593 0 : r2->out.result = _winspool_AsyncEnumPrinterDataEx(p, r2);
594 0 : break;
595 : }
596 0 : case 29: { /* winspool_AsyncEnumPrinterKey */
597 0 : struct winspool_AsyncEnumPrinterKey *r2 = (struct winspool_AsyncEnumPrinterKey *)r;
598 0 : if (DEBUGLEVEL >= 10) {
599 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterKey, NDR_IN, r2);
600 : }
601 0 : NDR_ZERO_STRUCT(r2->out);
602 0 : r2->out.pSubkey = talloc_zero_array(r2, uint16_t, r2->in.cbSubkey / 2);
603 0 : if (r2->out.pSubkey == NULL) {
604 0 : status = NT_STATUS_NO_MEMORY;
605 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
606 0 : goto fail;
607 : }
608 :
609 0 : r2->out.pcbSubkey = talloc_zero(r2, uint32_t);
610 0 : if (r2->out.pcbSubkey == NULL) {
611 0 : status = NT_STATUS_NO_MEMORY;
612 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
613 0 : goto fail;
614 : }
615 :
616 0 : r2->out.result = _winspool_AsyncEnumPrinterKey(p, r2);
617 0 : break;
618 : }
619 0 : case 30: { /* winspool_AsyncDeletePrinterData */
620 0 : struct winspool_AsyncDeletePrinterData *r2 = (struct winspool_AsyncDeletePrinterData *)r;
621 0 : if (DEBUGLEVEL >= 10) {
622 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterData, NDR_IN, r2);
623 : }
624 0 : r2->out.result = _winspool_AsyncDeletePrinterData(p, r2);
625 0 : break;
626 : }
627 0 : case 31: { /* winspool_AsyncDeletePrinterDataEx */
628 0 : struct winspool_AsyncDeletePrinterDataEx *r2 = (struct winspool_AsyncDeletePrinterDataEx *)r;
629 0 : if (DEBUGLEVEL >= 10) {
630 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDataEx, NDR_IN, r2);
631 : }
632 0 : r2->out.result = _winspool_AsyncDeletePrinterDataEx(p, r2);
633 0 : break;
634 : }
635 0 : case 32: { /* winspool_AsyncDeletePrinterKey */
636 0 : struct winspool_AsyncDeletePrinterKey *r2 = (struct winspool_AsyncDeletePrinterKey *)r;
637 0 : if (DEBUGLEVEL >= 10) {
638 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterKey, NDR_IN, r2);
639 : }
640 0 : r2->out.result = _winspool_AsyncDeletePrinterKey(p, r2);
641 0 : break;
642 : }
643 0 : case 33: { /* winspool_AsyncXcvData */
644 0 : struct winspool_AsyncXcvData *r2 = (struct winspool_AsyncXcvData *)r;
645 0 : if (DEBUGLEVEL >= 10) {
646 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncXcvData, NDR_IN, r2);
647 : }
648 0 : NDR_ZERO_STRUCT(r2->out);
649 0 : r2->out.pdwStatus = r2->in.pdwStatus;
650 0 : r2->out.pOutputData = talloc_zero_array(r2, uint8_t, r2->in.cbOutputData);
651 0 : if (r2->out.pOutputData == NULL) {
652 0 : status = NT_STATUS_NO_MEMORY;
653 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
654 0 : goto fail;
655 : }
656 :
657 0 : r2->out.pcbOutputNeeded = talloc_zero(r2, uint32_t);
658 0 : if (r2->out.pcbOutputNeeded == NULL) {
659 0 : status = NT_STATUS_NO_MEMORY;
660 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
661 0 : goto fail;
662 : }
663 :
664 0 : r2->out.result = _winspool_AsyncXcvData(p, r2);
665 0 : break;
666 : }
667 0 : case 34: { /* winspool_AsyncSendRecvBidiData */
668 0 : struct winspool_AsyncSendRecvBidiData *r2 = (struct winspool_AsyncSendRecvBidiData *)r;
669 0 : if (DEBUGLEVEL >= 10) {
670 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSendRecvBidiData, NDR_IN, r2);
671 : }
672 0 : NDR_ZERO_STRUCT(r2->out);
673 0 : r2->out.ppRespData = talloc_zero(r2, struct RPC_BIDI_RESPONSE_CONTAINER *);
674 0 : if (r2->out.ppRespData == NULL) {
675 0 : status = NT_STATUS_NO_MEMORY;
676 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
677 0 : goto fail;
678 : }
679 :
680 0 : r2->out.result = _winspool_AsyncSendRecvBidiData(p, r2);
681 0 : break;
682 : }
683 0 : case 35: { /* winspool_AsyncCreatePrinterIC */
684 0 : struct winspool_AsyncCreatePrinterIC *r2 = (struct winspool_AsyncCreatePrinterIC *)r;
685 0 : if (DEBUGLEVEL >= 10) {
686 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncCreatePrinterIC, NDR_IN, r2);
687 : }
688 0 : NDR_ZERO_STRUCT(r2->out);
689 0 : r2->out.pHandle = talloc_zero(r2, struct policy_handle);
690 0 : if (r2->out.pHandle == NULL) {
691 0 : status = NT_STATUS_NO_MEMORY;
692 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
693 0 : goto fail;
694 : }
695 :
696 0 : r2->out.result = _winspool_AsyncCreatePrinterIC(p, r2);
697 0 : break;
698 : }
699 0 : case 36: { /* winspool_AsyncPlayGdiScriptOnPrinterIC */
700 0 : struct winspool_AsyncPlayGdiScriptOnPrinterIC *r2 = (struct winspool_AsyncPlayGdiScriptOnPrinterIC *)r;
701 0 : if (DEBUGLEVEL >= 10) {
702 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncPlayGdiScriptOnPrinterIC, NDR_IN, r2);
703 : }
704 0 : NDR_ZERO_STRUCT(r2->out);
705 0 : r2->out.pOut = talloc_zero_array(r2, uint8_t, r2->in.cOut);
706 0 : if (r2->out.pOut == NULL) {
707 0 : status = NT_STATUS_NO_MEMORY;
708 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
709 0 : goto fail;
710 : }
711 :
712 0 : r2->out.result = _winspool_AsyncPlayGdiScriptOnPrinterIC(p, r2);
713 0 : break;
714 : }
715 0 : case 37: { /* winspool_AsyncDeletePrinterIC */
716 0 : struct winspool_AsyncDeletePrinterIC *r2 = (struct winspool_AsyncDeletePrinterIC *)r;
717 0 : if (DEBUGLEVEL >= 10) {
718 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterIC, NDR_IN, r2);
719 : }
720 0 : NDR_ZERO_STRUCT(r2->out);
721 0 : r2->out.phPrinterIC = r2->in.phPrinterIC;
722 0 : r2->out.result = _winspool_AsyncDeletePrinterIC(p, r2);
723 0 : break;
724 : }
725 0 : case 38: { /* winspool_AsyncEnumPrinters */
726 0 : struct winspool_AsyncEnumPrinters *r2 = (struct winspool_AsyncEnumPrinters *)r;
727 0 : if (DEBUGLEVEL >= 10) {
728 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinters, NDR_IN, r2);
729 : }
730 0 : NDR_ZERO_STRUCT(r2->out);
731 0 : r2->out.pPrinterEnum = r2->in.pPrinterEnum;
732 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
733 0 : if (r2->out.pcbNeeded == NULL) {
734 0 : status = NT_STATUS_NO_MEMORY;
735 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
736 0 : goto fail;
737 : }
738 :
739 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
740 0 : if (r2->out.pcReturned == NULL) {
741 0 : status = NT_STATUS_NO_MEMORY;
742 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
743 0 : goto fail;
744 : }
745 :
746 0 : r2->out.result = _winspool_AsyncEnumPrinters(p, r2);
747 0 : break;
748 : }
749 0 : case 39: { /* winspool_AsyncAddPrinterDriver */
750 0 : struct winspool_AsyncAddPrinterDriver *r2 = (struct winspool_AsyncAddPrinterDriver *)r;
751 0 : if (DEBUGLEVEL >= 10) {
752 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPrinterDriver, NDR_IN, r2);
753 : }
754 0 : r2->out.result = _winspool_AsyncAddPrinterDriver(p, r2);
755 0 : break;
756 : }
757 0 : case 40: { /* winspool_AsyncEnumPrinterDrivers */
758 0 : struct winspool_AsyncEnumPrinterDrivers *r2 = (struct winspool_AsyncEnumPrinterDrivers *)r;
759 0 : if (DEBUGLEVEL >= 10) {
760 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterDrivers, NDR_IN, r2);
761 : }
762 0 : NDR_ZERO_STRUCT(r2->out);
763 0 : r2->out.pDrivers = r2->in.pDrivers;
764 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
765 0 : if (r2->out.pcbNeeded == NULL) {
766 0 : status = NT_STATUS_NO_MEMORY;
767 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
768 0 : goto fail;
769 : }
770 :
771 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
772 0 : if (r2->out.pcReturned == NULL) {
773 0 : status = NT_STATUS_NO_MEMORY;
774 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
775 0 : goto fail;
776 : }
777 :
778 0 : r2->out.result = _winspool_AsyncEnumPrinterDrivers(p, r2);
779 0 : break;
780 : }
781 0 : case 41: { /* winspool_AsyncGetPrinterDriverDirectory */
782 0 : struct winspool_AsyncGetPrinterDriverDirectory *r2 = (struct winspool_AsyncGetPrinterDriverDirectory *)r;
783 0 : if (DEBUGLEVEL >= 10) {
784 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDriverDirectory, NDR_IN, r2);
785 : }
786 0 : NDR_ZERO_STRUCT(r2->out);
787 0 : r2->out.pDriverDirectory = r2->in.pDriverDirectory;
788 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
789 0 : if (r2->out.pcbNeeded == NULL) {
790 0 : status = NT_STATUS_NO_MEMORY;
791 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
792 0 : goto fail;
793 : }
794 :
795 0 : r2->out.result = _winspool_AsyncGetPrinterDriverDirectory(p, r2);
796 0 : break;
797 : }
798 0 : case 42: { /* winspool_AsyncDeletePrinterDriver */
799 0 : struct winspool_AsyncDeletePrinterDriver *r2 = (struct winspool_AsyncDeletePrinterDriver *)r;
800 0 : if (DEBUGLEVEL >= 10) {
801 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDriver, NDR_IN, r2);
802 : }
803 0 : r2->out.result = _winspool_AsyncDeletePrinterDriver(p, r2);
804 0 : break;
805 : }
806 0 : case 43: { /* winspool_AsyncDeletePrinterDriverEx */
807 0 : struct winspool_AsyncDeletePrinterDriverEx *r2 = (struct winspool_AsyncDeletePrinterDriverEx *)r;
808 0 : if (DEBUGLEVEL >= 10) {
809 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDriverEx, NDR_IN, r2);
810 : }
811 0 : r2->out.result = _winspool_AsyncDeletePrinterDriverEx(p, r2);
812 0 : break;
813 : }
814 0 : case 44: { /* winspool_AsyncAddPrintProcessor */
815 0 : struct winspool_AsyncAddPrintProcessor *r2 = (struct winspool_AsyncAddPrintProcessor *)r;
816 0 : if (DEBUGLEVEL >= 10) {
817 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPrintProcessor, NDR_IN, r2);
818 : }
819 0 : r2->out.result = _winspool_AsyncAddPrintProcessor(p, r2);
820 0 : break;
821 : }
822 0 : case 45: { /* winspool_AsyncEnumPrintProcessors */
823 0 : struct winspool_AsyncEnumPrintProcessors *r2 = (struct winspool_AsyncEnumPrintProcessors *)r;
824 0 : if (DEBUGLEVEL >= 10) {
825 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrintProcessors, NDR_IN, r2);
826 : }
827 0 : NDR_ZERO_STRUCT(r2->out);
828 0 : r2->out.pPrintProcessorInfo = r2->in.pPrintProcessorInfo;
829 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
830 0 : if (r2->out.pcbNeeded == NULL) {
831 0 : status = NT_STATUS_NO_MEMORY;
832 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
833 0 : goto fail;
834 : }
835 :
836 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
837 0 : if (r2->out.pcReturned == NULL) {
838 0 : status = NT_STATUS_NO_MEMORY;
839 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
840 0 : goto fail;
841 : }
842 :
843 0 : r2->out.result = _winspool_AsyncEnumPrintProcessors(p, r2);
844 0 : break;
845 : }
846 0 : case 46: { /* winspool_AsyncGetPrintProcessorDirectory */
847 0 : struct winspool_AsyncGetPrintProcessorDirectory *r2 = (struct winspool_AsyncGetPrintProcessorDirectory *)r;
848 0 : if (DEBUGLEVEL >= 10) {
849 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrintProcessorDirectory, NDR_IN, r2);
850 : }
851 0 : NDR_ZERO_STRUCT(r2->out);
852 0 : r2->out.pPrintProcessorDirectory = r2->in.pPrintProcessorDirectory;
853 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
854 0 : if (r2->out.pcbNeeded == NULL) {
855 0 : status = NT_STATUS_NO_MEMORY;
856 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
857 0 : goto fail;
858 : }
859 :
860 0 : r2->out.result = _winspool_AsyncGetPrintProcessorDirectory(p, r2);
861 0 : break;
862 : }
863 0 : case 47: { /* winspool_AsyncEnumPorts */
864 0 : struct winspool_AsyncEnumPorts *r2 = (struct winspool_AsyncEnumPorts *)r;
865 0 : if (DEBUGLEVEL >= 10) {
866 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPorts, NDR_IN, r2);
867 : }
868 0 : NDR_ZERO_STRUCT(r2->out);
869 0 : r2->out.pPort = r2->in.pPort;
870 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
871 0 : if (r2->out.pcbNeeded == NULL) {
872 0 : status = NT_STATUS_NO_MEMORY;
873 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
874 0 : goto fail;
875 : }
876 :
877 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
878 0 : if (r2->out.pcReturned == NULL) {
879 0 : status = NT_STATUS_NO_MEMORY;
880 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
881 0 : goto fail;
882 : }
883 :
884 0 : r2->out.result = _winspool_AsyncEnumPorts(p, r2);
885 0 : break;
886 : }
887 0 : case 48: { /* winspool_AsyncEnumMonitors */
888 0 : struct winspool_AsyncEnumMonitors *r2 = (struct winspool_AsyncEnumMonitors *)r;
889 0 : if (DEBUGLEVEL >= 10) {
890 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumMonitors, NDR_IN, r2);
891 : }
892 0 : NDR_ZERO_STRUCT(r2->out);
893 0 : r2->out.pMonitor = r2->in.pMonitor;
894 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
895 0 : if (r2->out.pcbNeeded == NULL) {
896 0 : status = NT_STATUS_NO_MEMORY;
897 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
898 0 : goto fail;
899 : }
900 :
901 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
902 0 : if (r2->out.pcReturned == NULL) {
903 0 : status = NT_STATUS_NO_MEMORY;
904 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
905 0 : goto fail;
906 : }
907 :
908 0 : r2->out.result = _winspool_AsyncEnumMonitors(p, r2);
909 0 : break;
910 : }
911 0 : case 49: { /* winspool_AsyncAddPort */
912 0 : struct winspool_AsyncAddPort *r2 = (struct winspool_AsyncAddPort *)r;
913 0 : if (DEBUGLEVEL >= 10) {
914 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPort, NDR_IN, r2);
915 : }
916 0 : r2->out.result = _winspool_AsyncAddPort(p, r2);
917 0 : break;
918 : }
919 0 : case 50: { /* winspool_AsyncSetPort */
920 0 : struct winspool_AsyncSetPort *r2 = (struct winspool_AsyncSetPort *)r;
921 0 : if (DEBUGLEVEL >= 10) {
922 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPort, NDR_IN, r2);
923 : }
924 0 : r2->out.result = _winspool_AsyncSetPort(p, r2);
925 0 : break;
926 : }
927 0 : case 51: { /* winspool_AsyncAddMonitor */
928 0 : struct winspool_AsyncAddMonitor *r2 = (struct winspool_AsyncAddMonitor *)r;
929 0 : if (DEBUGLEVEL >= 10) {
930 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddMonitor, NDR_IN, r2);
931 : }
932 0 : r2->out.result = _winspool_AsyncAddMonitor(p, r2);
933 0 : break;
934 : }
935 0 : case 52: { /* winspool_AsyncDeleteMonitor */
936 0 : struct winspool_AsyncDeleteMonitor *r2 = (struct winspool_AsyncDeleteMonitor *)r;
937 0 : if (DEBUGLEVEL >= 10) {
938 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeleteMonitor, NDR_IN, r2);
939 : }
940 0 : r2->out.result = _winspool_AsyncDeleteMonitor(p, r2);
941 0 : break;
942 : }
943 0 : case 53: { /* winspool_AsyncDeletePrintProcessor */
944 0 : struct winspool_AsyncDeletePrintProcessor *r2 = (struct winspool_AsyncDeletePrintProcessor *)r;
945 0 : if (DEBUGLEVEL >= 10) {
946 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrintProcessor, NDR_IN, r2);
947 : }
948 0 : r2->out.result = _winspool_AsyncDeletePrintProcessor(p, r2);
949 0 : break;
950 : }
951 0 : case 54: { /* winspool_AsyncEnumPrintProcessorDatatypes */
952 0 : struct winspool_AsyncEnumPrintProcessorDatatypes *r2 = (struct winspool_AsyncEnumPrintProcessorDatatypes *)r;
953 0 : if (DEBUGLEVEL >= 10) {
954 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrintProcessorDatatypes, NDR_IN, r2);
955 : }
956 0 : NDR_ZERO_STRUCT(r2->out);
957 0 : r2->out.pDatatypes = r2->in.pDatatypes;
958 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
959 0 : if (r2->out.pcbNeeded == NULL) {
960 0 : status = NT_STATUS_NO_MEMORY;
961 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
962 0 : goto fail;
963 : }
964 :
965 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
966 0 : if (r2->out.pcReturned == NULL) {
967 0 : status = NT_STATUS_NO_MEMORY;
968 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
969 0 : goto fail;
970 : }
971 :
972 0 : r2->out.result = _winspool_AsyncEnumPrintProcessorDatatypes(p, r2);
973 0 : break;
974 : }
975 0 : case 55: { /* winspool_AsyncAddPerMachineConnection */
976 0 : struct winspool_AsyncAddPerMachineConnection *r2 = (struct winspool_AsyncAddPerMachineConnection *)r;
977 0 : if (DEBUGLEVEL >= 10) {
978 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPerMachineConnection, NDR_IN, r2);
979 : }
980 0 : r2->out.result = _winspool_AsyncAddPerMachineConnection(p, r2);
981 0 : break;
982 : }
983 0 : case 56: { /* winspool_AsyncDeletePerMachineConnection */
984 0 : struct winspool_AsyncDeletePerMachineConnection *r2 = (struct winspool_AsyncDeletePerMachineConnection *)r;
985 0 : if (DEBUGLEVEL >= 10) {
986 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePerMachineConnection, NDR_IN, r2);
987 : }
988 0 : r2->out.result = _winspool_AsyncDeletePerMachineConnection(p, r2);
989 0 : break;
990 : }
991 0 : case 57: { /* winspool_AsyncEnumPerMachineConnections */
992 0 : struct winspool_AsyncEnumPerMachineConnections *r2 = (struct winspool_AsyncEnumPerMachineConnections *)r;
993 0 : if (DEBUGLEVEL >= 10) {
994 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPerMachineConnections, NDR_IN, r2);
995 : }
996 0 : NDR_ZERO_STRUCT(r2->out);
997 0 : r2->out.pPrinterEnum = r2->in.pPrinterEnum;
998 0 : r2->out.pcbNeeded = talloc_zero(r2, uint32_t);
999 0 : if (r2->out.pcbNeeded == NULL) {
1000 0 : status = NT_STATUS_NO_MEMORY;
1001 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1002 0 : goto fail;
1003 : }
1004 :
1005 0 : r2->out.pcReturned = talloc_zero(r2, uint32_t);
1006 0 : if (r2->out.pcReturned == NULL) {
1007 0 : status = NT_STATUS_NO_MEMORY;
1008 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1009 0 : goto fail;
1010 : }
1011 :
1012 0 : r2->out.result = _winspool_AsyncEnumPerMachineConnections(p, r2);
1013 0 : break;
1014 : }
1015 0 : case 58: { /* winspool_SyncRegisterForRemoteNotifications */
1016 0 : struct winspool_SyncRegisterForRemoteNotifications *r2 = (struct winspool_SyncRegisterForRemoteNotifications *)r;
1017 0 : if (DEBUGLEVEL >= 10) {
1018 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_SyncRegisterForRemoteNotifications, NDR_IN, r2);
1019 : }
1020 0 : NDR_ZERO_STRUCT(r2->out);
1021 0 : r2->out.phRpcHandle = talloc_zero(r2, struct policy_handle);
1022 0 : if (r2->out.phRpcHandle == NULL) {
1023 0 : status = NT_STATUS_NO_MEMORY;
1024 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1025 0 : goto fail;
1026 : }
1027 :
1028 0 : r2->out.result = _winspool_SyncRegisterForRemoteNotifications(p, r2);
1029 0 : break;
1030 : }
1031 0 : case 59: { /* winspool_SyncUnRegisterForRemoteNotifications */
1032 0 : struct winspool_SyncUnRegisterForRemoteNotifications *r2 = (struct winspool_SyncUnRegisterForRemoteNotifications *)r;
1033 0 : if (DEBUGLEVEL >= 10) {
1034 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_SyncUnRegisterForRemoteNotifications, NDR_IN, r2);
1035 : }
1036 0 : NDR_ZERO_STRUCT(r2->out);
1037 0 : r2->out.phRpcHandle = r2->in.phRpcHandle;
1038 0 : r2->out.result = _winspool_SyncUnRegisterForRemoteNotifications(p, r2);
1039 0 : break;
1040 : }
1041 0 : case 60: { /* winspool_SyncRefreshRemoteNotifications */
1042 0 : struct winspool_SyncRefreshRemoteNotifications *r2 = (struct winspool_SyncRefreshRemoteNotifications *)r;
1043 0 : if (DEBUGLEVEL >= 10) {
1044 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_SyncRefreshRemoteNotifications, NDR_IN, r2);
1045 : }
1046 0 : NDR_ZERO_STRUCT(r2->out);
1047 0 : r2->out.ppNotifyData = talloc_zero(r2, struct winspool_PrintPropertiesCollection *);
1048 0 : if (r2->out.ppNotifyData == NULL) {
1049 0 : status = NT_STATUS_NO_MEMORY;
1050 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1051 0 : goto fail;
1052 : }
1053 :
1054 0 : r2->out.result = _winspool_SyncRefreshRemoteNotifications(p, r2);
1055 0 : break;
1056 : }
1057 0 : case 61: { /* winspool_AsyncGetRemoteNotifications */
1058 0 : struct winspool_AsyncGetRemoteNotifications *r2 = (struct winspool_AsyncGetRemoteNotifications *)r;
1059 0 : if (DEBUGLEVEL >= 10) {
1060 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetRemoteNotifications, NDR_IN, r2);
1061 : }
1062 0 : NDR_ZERO_STRUCT(r2->out);
1063 0 : r2->out.ppNotifyData = talloc_zero(r2, struct winspool_PrintPropertiesCollection *);
1064 0 : if (r2->out.ppNotifyData == NULL) {
1065 0 : status = NT_STATUS_NO_MEMORY;
1066 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1067 0 : goto fail;
1068 : }
1069 :
1070 0 : r2->out.result = _winspool_AsyncGetRemoteNotifications(p, r2);
1071 0 : break;
1072 : }
1073 0 : case 62: { /* winspool_AsyncInstallPrinterDriverFromPackage */
1074 0 : struct winspool_AsyncInstallPrinterDriverFromPackage *r2 = (struct winspool_AsyncInstallPrinterDriverFromPackage *)r;
1075 0 : if (DEBUGLEVEL >= 10) {
1076 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncInstallPrinterDriverFromPackage, NDR_IN, r2);
1077 : }
1078 0 : r2->out.result = _winspool_AsyncInstallPrinterDriverFromPackage(p, r2);
1079 0 : break;
1080 : }
1081 0 : case 63: { /* winspool_AsyncUploadPrinterDriverPackage */
1082 0 : struct winspool_AsyncUploadPrinterDriverPackage *r2 = (struct winspool_AsyncUploadPrinterDriverPackage *)r;
1083 0 : if (DEBUGLEVEL >= 10) {
1084 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncUploadPrinterDriverPackage, NDR_IN, r2);
1085 : }
1086 0 : NDR_ZERO_STRUCT(r2->out);
1087 0 : r2->out.pszDestInfPath = r2->in.pszDestInfPath;
1088 0 : r2->out.pcchDestInfPath = r2->in.pcchDestInfPath;
1089 0 : r2->out.result = _winspool_AsyncUploadPrinterDriverPackage(p, r2);
1090 0 : break;
1091 : }
1092 0 : case 64: { /* winspool_AsyncGetCorePrinterDrivers */
1093 0 : struct winspool_AsyncGetCorePrinterDrivers *r2 = (struct winspool_AsyncGetCorePrinterDrivers *)r;
1094 0 : if (DEBUGLEVEL >= 10) {
1095 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetCorePrinterDrivers, NDR_IN, r2);
1096 : }
1097 0 : NDR_ZERO_STRUCT(r2->out);
1098 0 : r2->out.pCorePrinterDrivers = talloc_zero_array(r2, struct spoolss_CorePrinterDriver, r2->in.cCorePrinterDrivers);
1099 0 : if (r2->out.pCorePrinterDrivers == NULL) {
1100 0 : status = NT_STATUS_NO_MEMORY;
1101 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1102 0 : goto fail;
1103 : }
1104 :
1105 0 : r2->out.result = _winspool_AsyncGetCorePrinterDrivers(p, r2);
1106 0 : break;
1107 : }
1108 0 : case 65: { /* winspool_AsyncCorePrinterDriverInstalled */
1109 0 : struct winspool_AsyncCorePrinterDriverInstalled *r2 = (struct winspool_AsyncCorePrinterDriverInstalled *)r;
1110 0 : if (DEBUGLEVEL >= 10) {
1111 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncCorePrinterDriverInstalled, NDR_IN, r2);
1112 : }
1113 0 : NDR_ZERO_STRUCT(r2->out);
1114 0 : r2->out.pbDriverInstalled = talloc_zero(r2, int32_t);
1115 0 : if (r2->out.pbDriverInstalled == NULL) {
1116 0 : status = NT_STATUS_NO_MEMORY;
1117 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1118 0 : goto fail;
1119 : }
1120 :
1121 0 : r2->out.result = _winspool_AsyncCorePrinterDriverInstalled(p, r2);
1122 0 : break;
1123 : }
1124 0 : case 66: { /* winspool_AsyncGetPrinterDriverPackagePath */
1125 0 : struct winspool_AsyncGetPrinterDriverPackagePath *r2 = (struct winspool_AsyncGetPrinterDriverPackagePath *)r;
1126 0 : if (DEBUGLEVEL >= 10) {
1127 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDriverPackagePath, NDR_IN, r2);
1128 : }
1129 0 : NDR_ZERO_STRUCT(r2->out);
1130 0 : r2->out.pszDriverPackageCab = r2->in.pszDriverPackageCab;
1131 0 : r2->out.pcchRequiredSize = talloc_zero(r2, uint32_t);
1132 0 : if (r2->out.pcchRequiredSize == NULL) {
1133 0 : status = NT_STATUS_NO_MEMORY;
1134 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1135 0 : goto fail;
1136 : }
1137 :
1138 0 : r2->out.result = _winspool_AsyncGetPrinterDriverPackagePath(p, r2);
1139 0 : break;
1140 : }
1141 0 : case 67: { /* winspool_AsyncDeletePrinterDriverPackage */
1142 0 : struct winspool_AsyncDeletePrinterDriverPackage *r2 = (struct winspool_AsyncDeletePrinterDriverPackage *)r;
1143 0 : if (DEBUGLEVEL >= 10) {
1144 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDriverPackage, NDR_IN, r2);
1145 : }
1146 0 : r2->out.result = _winspool_AsyncDeletePrinterDriverPackage(p, r2);
1147 0 : break;
1148 : }
1149 0 : case 68: { /* winspool_AsyncReadPrinter */
1150 0 : struct winspool_AsyncReadPrinter *r2 = (struct winspool_AsyncReadPrinter *)r;
1151 0 : if (DEBUGLEVEL >= 10) {
1152 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncReadPrinter, NDR_IN, r2);
1153 : }
1154 0 : NDR_ZERO_STRUCT(r2->out);
1155 0 : r2->out.pBuf = talloc_zero_array(r2, uint8_t, r2->in.cbBuf);
1156 0 : if (r2->out.pBuf == NULL) {
1157 0 : status = NT_STATUS_NO_MEMORY;
1158 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1159 0 : goto fail;
1160 : }
1161 :
1162 0 : r2->out.pcNoBytesRead = talloc_zero(r2, uint32_t);
1163 0 : if (r2->out.pcNoBytesRead == NULL) {
1164 0 : status = NT_STATUS_NO_MEMORY;
1165 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1166 0 : goto fail;
1167 : }
1168 :
1169 0 : r2->out.result = _winspool_AsyncReadPrinter(p, r2);
1170 0 : break;
1171 : }
1172 0 : case 69: { /* winspool_AsyncResetPrinter */
1173 0 : struct winspool_AsyncResetPrinter *r2 = (struct winspool_AsyncResetPrinter *)r;
1174 0 : if (DEBUGLEVEL >= 10) {
1175 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncResetPrinter, NDR_IN, r2);
1176 : }
1177 0 : r2->out.result = _winspool_AsyncResetPrinter(p, r2);
1178 0 : break;
1179 : }
1180 0 : case 70: { /* winspool_AsyncGetJobNamedPropertyValue */
1181 0 : struct winspool_AsyncGetJobNamedPropertyValue *r2 = (struct winspool_AsyncGetJobNamedPropertyValue *)r;
1182 0 : if (DEBUGLEVEL >= 10) {
1183 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetJobNamedPropertyValue, NDR_IN, r2);
1184 : }
1185 0 : NDR_ZERO_STRUCT(r2->out);
1186 0 : r2->out.pValue = talloc_zero(r2, struct spoolss_PrintPropertyValue);
1187 0 : if (r2->out.pValue == NULL) {
1188 0 : status = NT_STATUS_NO_MEMORY;
1189 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1190 0 : goto fail;
1191 : }
1192 :
1193 0 : r2->out.result = _winspool_AsyncGetJobNamedPropertyValue(p, r2);
1194 0 : break;
1195 : }
1196 0 : case 71: { /* winspool_AsyncSetJobNamedProperty */
1197 0 : struct winspool_AsyncSetJobNamedProperty *r2 = (struct winspool_AsyncSetJobNamedProperty *)r;
1198 0 : if (DEBUGLEVEL >= 10) {
1199 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetJobNamedProperty, NDR_IN, r2);
1200 : }
1201 0 : r2->out.result = _winspool_AsyncSetJobNamedProperty(p, r2);
1202 0 : break;
1203 : }
1204 0 : case 72: { /* winspool_AsyncDeleteJobNamedProperty */
1205 0 : struct winspool_AsyncDeleteJobNamedProperty *r2 = (struct winspool_AsyncDeleteJobNamedProperty *)r;
1206 0 : if (DEBUGLEVEL >= 10) {
1207 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeleteJobNamedProperty, NDR_IN, r2);
1208 : }
1209 0 : r2->out.result = _winspool_AsyncDeleteJobNamedProperty(p, r2);
1210 0 : break;
1211 : }
1212 0 : case 73: { /* winspool_AsyncEnumJobNamedProperties */
1213 0 : struct winspool_AsyncEnumJobNamedProperties *r2 = (struct winspool_AsyncEnumJobNamedProperties *)r;
1214 0 : if (DEBUGLEVEL >= 10) {
1215 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumJobNamedProperties, NDR_IN, r2);
1216 : }
1217 0 : NDR_ZERO_STRUCT(r2->out);
1218 0 : r2->out.pcProperties = talloc_zero(r2, uint32_t);
1219 0 : if (r2->out.pcProperties == NULL) {
1220 0 : status = NT_STATUS_NO_MEMORY;
1221 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1222 0 : goto fail;
1223 : }
1224 :
1225 0 : r2->out.ppProperties = talloc_zero(r2, struct spoolss_PrintNamedProperty *);
1226 0 : if (r2->out.ppProperties == NULL) {
1227 0 : status = NT_STATUS_NO_MEMORY;
1228 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
1229 0 : goto fail;
1230 : }
1231 :
1232 0 : r2->out.result = _winspool_AsyncEnumJobNamedProperties(p, r2);
1233 0 : break;
1234 : }
1235 0 : case 74: { /* winspool_AsyncLogJobInfoForBranchOffice */
1236 0 : struct winspool_AsyncLogJobInfoForBranchOffice *r2 = (struct winspool_AsyncLogJobInfoForBranchOffice *)r;
1237 0 : if (DEBUGLEVEL >= 10) {
1238 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncLogJobInfoForBranchOffice, NDR_IN, r2);
1239 : }
1240 0 : r2->out.result = _winspool_AsyncLogJobInfoForBranchOffice(p, r2);
1241 0 : break;
1242 : }
1243 0 : default:
1244 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
1245 0 : break;
1246 : }
1247 :
1248 0 : fail:
1249 : /* Unimpersonate */
1250 0 : if (impersonated) {
1251 0 : unbecome_authenticated_pipe_user();
1252 : }
1253 :
1254 0 : p->dce_call = NULL;
1255 0 : p->mem_ctx = NULL;
1256 : /* Check pipes struct fault state */
1257 0 : if (p->fault_state != 0) {
1258 0 : dce_call->fault_code = p->fault_state;
1259 : }
1260 0 : if (dce_call->fault_code != 0) {
1261 0 : status = NT_STATUS_NET_WRITE_FAULT;
1262 : }
1263 :
1264 0 : return status;
1265 : }
1266 :
1267 0 : NTSTATUS iremotewinspool__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
1268 : {
1269 0 : return iremotewinspool__op_dispatch_internal(dce_call, mem_ctx, r, false);
1270 : }
1271 :
1272 0 : NTSTATUS iremotewinspool__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
1273 : {
1274 0 : uint16_t opnum = dce_call->pkt.u.request.opnum;
1275 :
1276 0 : if (forward_opnum_to_spoolss(opnum)) {
1277 0 : return spoolss__op_reply(dce_call, mem_ctx, r);
1278 : }
1279 :
1280 0 : switch (opnum) {
1281 0 : case 0: { /* winspool_AsyncOpenPrinter */
1282 0 : struct winspool_AsyncOpenPrinter *r2 = (struct winspool_AsyncOpenPrinter *)r;
1283 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1284 0 : DEBUG(5,("function winspool_AsyncOpenPrinter replied async\n"));
1285 : }
1286 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1287 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncOpenPrinter, NDR_OUT | NDR_SET_VALUES, r2);
1288 : }
1289 0 : if (dce_call->fault_code != 0) {
1290 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncOpenPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1291 : }
1292 0 : break;
1293 : }
1294 0 : case 1: { /* winspool_AsyncAddPrinter */
1295 0 : struct winspool_AsyncAddPrinter *r2 = (struct winspool_AsyncAddPrinter *)r;
1296 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1297 0 : DEBUG(5,("function winspool_AsyncAddPrinter replied async\n"));
1298 : }
1299 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1300 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPrinter, NDR_OUT | NDR_SET_VALUES, r2);
1301 : }
1302 0 : if (dce_call->fault_code != 0) {
1303 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1304 : }
1305 0 : break;
1306 : }
1307 0 : case 2: { /* winspool_AsyncSetJob */
1308 0 : struct winspool_AsyncSetJob *r2 = (struct winspool_AsyncSetJob *)r;
1309 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1310 0 : DEBUG(5,("function winspool_AsyncSetJob replied async\n"));
1311 : }
1312 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1313 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetJob, NDR_OUT | NDR_SET_VALUES, r2);
1314 : }
1315 0 : if (dce_call->fault_code != 0) {
1316 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSetJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1317 : }
1318 0 : break;
1319 : }
1320 0 : case 3: { /* winspool_AsyncGetJob */
1321 0 : struct winspool_AsyncGetJob *r2 = (struct winspool_AsyncGetJob *)r;
1322 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1323 0 : DEBUG(5,("function winspool_AsyncGetJob replied async\n"));
1324 : }
1325 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1326 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetJob, NDR_OUT | NDR_SET_VALUES, r2);
1327 : }
1328 0 : if (dce_call->fault_code != 0) {
1329 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1330 : }
1331 0 : break;
1332 : }
1333 0 : case 4: { /* winspool_AsyncEnumJobs */
1334 0 : struct winspool_AsyncEnumJobs *r2 = (struct winspool_AsyncEnumJobs *)r;
1335 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1336 0 : DEBUG(5,("function winspool_AsyncEnumJobs replied async\n"));
1337 : }
1338 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1339 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumJobs, NDR_OUT | NDR_SET_VALUES, r2);
1340 : }
1341 0 : if (dce_call->fault_code != 0) {
1342 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumJobs\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1343 : }
1344 0 : break;
1345 : }
1346 0 : case 5: { /* winspool_AsyncAddJob */
1347 0 : struct winspool_AsyncAddJob *r2 = (struct winspool_AsyncAddJob *)r;
1348 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1349 0 : DEBUG(5,("function winspool_AsyncAddJob replied async\n"));
1350 : }
1351 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1352 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddJob, NDR_OUT | NDR_SET_VALUES, r2);
1353 : }
1354 0 : if (dce_call->fault_code != 0) {
1355 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1356 : }
1357 0 : break;
1358 : }
1359 0 : case 6: { /* winspool_AsyncScheduleJob */
1360 0 : struct winspool_AsyncScheduleJob *r2 = (struct winspool_AsyncScheduleJob *)r;
1361 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1362 0 : DEBUG(5,("function winspool_AsyncScheduleJob replied async\n"));
1363 : }
1364 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1365 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncScheduleJob, NDR_OUT | NDR_SET_VALUES, r2);
1366 : }
1367 0 : if (dce_call->fault_code != 0) {
1368 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncScheduleJob\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1369 : }
1370 0 : break;
1371 : }
1372 0 : case 7: { /* winspool_AsyncDeletePrinter */
1373 0 : struct winspool_AsyncDeletePrinter *r2 = (struct winspool_AsyncDeletePrinter *)r;
1374 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1375 0 : DEBUG(5,("function winspool_AsyncDeletePrinter replied async\n"));
1376 : }
1377 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1378 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinter, NDR_OUT | NDR_SET_VALUES, r2);
1379 : }
1380 0 : if (dce_call->fault_code != 0) {
1381 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1382 : }
1383 0 : break;
1384 : }
1385 0 : case 8: { /* winspool_AsyncSetPrinter */
1386 0 : struct winspool_AsyncSetPrinter *r2 = (struct winspool_AsyncSetPrinter *)r;
1387 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1388 0 : DEBUG(5,("function winspool_AsyncSetPrinter replied async\n"));
1389 : }
1390 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1391 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPrinter, NDR_OUT | NDR_SET_VALUES, r2);
1392 : }
1393 0 : if (dce_call->fault_code != 0) {
1394 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSetPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1395 : }
1396 0 : break;
1397 : }
1398 0 : case 9: { /* winspool_AsyncGetPrinter */
1399 0 : struct winspool_AsyncGetPrinter *r2 = (struct winspool_AsyncGetPrinter *)r;
1400 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1401 0 : DEBUG(5,("function winspool_AsyncGetPrinter replied async\n"));
1402 : }
1403 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1404 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinter, NDR_OUT | NDR_SET_VALUES, r2);
1405 : }
1406 0 : if (dce_call->fault_code != 0) {
1407 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1408 : }
1409 0 : break;
1410 : }
1411 0 : case 10: { /* winspool_AsyncStartDocPrinter */
1412 0 : struct winspool_AsyncStartDocPrinter *r2 = (struct winspool_AsyncStartDocPrinter *)r;
1413 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1414 0 : DEBUG(5,("function winspool_AsyncStartDocPrinter replied async\n"));
1415 : }
1416 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1417 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncStartDocPrinter, NDR_OUT | NDR_SET_VALUES, r2);
1418 : }
1419 0 : if (dce_call->fault_code != 0) {
1420 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncStartDocPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1421 : }
1422 0 : break;
1423 : }
1424 0 : case 11: { /* winspool_AsyncStartPagePrinter */
1425 0 : struct winspool_AsyncStartPagePrinter *r2 = (struct winspool_AsyncStartPagePrinter *)r;
1426 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1427 0 : DEBUG(5,("function winspool_AsyncStartPagePrinter replied async\n"));
1428 : }
1429 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1430 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncStartPagePrinter, NDR_OUT | NDR_SET_VALUES, r2);
1431 : }
1432 0 : if (dce_call->fault_code != 0) {
1433 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncStartPagePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1434 : }
1435 0 : break;
1436 : }
1437 0 : case 12: { /* winspool_AsyncWritePrinter */
1438 0 : struct winspool_AsyncWritePrinter *r2 = (struct winspool_AsyncWritePrinter *)r;
1439 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1440 0 : DEBUG(5,("function winspool_AsyncWritePrinter replied async\n"));
1441 : }
1442 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1443 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncWritePrinter, NDR_OUT | NDR_SET_VALUES, r2);
1444 : }
1445 0 : if (dce_call->fault_code != 0) {
1446 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncWritePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1447 : }
1448 0 : break;
1449 : }
1450 0 : case 13: { /* winspool_AsyncEndPagePrinter */
1451 0 : struct winspool_AsyncEndPagePrinter *r2 = (struct winspool_AsyncEndPagePrinter *)r;
1452 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1453 0 : DEBUG(5,("function winspool_AsyncEndPagePrinter replied async\n"));
1454 : }
1455 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1456 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEndPagePrinter, NDR_OUT | NDR_SET_VALUES, r2);
1457 : }
1458 0 : if (dce_call->fault_code != 0) {
1459 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEndPagePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1460 : }
1461 0 : break;
1462 : }
1463 0 : case 14: { /* winspool_AsyncEndDocPrinter */
1464 0 : struct winspool_AsyncEndDocPrinter *r2 = (struct winspool_AsyncEndDocPrinter *)r;
1465 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1466 0 : DEBUG(5,("function winspool_AsyncEndDocPrinter replied async\n"));
1467 : }
1468 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1469 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEndDocPrinter, NDR_OUT | NDR_SET_VALUES, r2);
1470 : }
1471 0 : if (dce_call->fault_code != 0) {
1472 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEndDocPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1473 : }
1474 0 : break;
1475 : }
1476 0 : case 15: { /* winspool_AsyncAbortPrinter */
1477 0 : struct winspool_AsyncAbortPrinter *r2 = (struct winspool_AsyncAbortPrinter *)r;
1478 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1479 0 : DEBUG(5,("function winspool_AsyncAbortPrinter replied async\n"));
1480 : }
1481 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1482 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAbortPrinter, NDR_OUT | NDR_SET_VALUES, r2);
1483 : }
1484 0 : if (dce_call->fault_code != 0) {
1485 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAbortPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1486 : }
1487 0 : break;
1488 : }
1489 0 : case 16: { /* winspool_AsyncGetPrinterData */
1490 0 : struct winspool_AsyncGetPrinterData *r2 = (struct winspool_AsyncGetPrinterData *)r;
1491 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1492 0 : DEBUG(5,("function winspool_AsyncGetPrinterData replied async\n"));
1493 : }
1494 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1495 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterData, NDR_OUT | NDR_SET_VALUES, r2);
1496 : }
1497 0 : if (dce_call->fault_code != 0) {
1498 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetPrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1499 : }
1500 0 : break;
1501 : }
1502 0 : case 17: { /* winspool_AsyncGetPrinterDataEx */
1503 0 : struct winspool_AsyncGetPrinterDataEx *r2 = (struct winspool_AsyncGetPrinterDataEx *)r;
1504 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1505 0 : DEBUG(5,("function winspool_AsyncGetPrinterDataEx replied async\n"));
1506 : }
1507 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1508 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
1509 : }
1510 0 : if (dce_call->fault_code != 0) {
1511 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetPrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1512 : }
1513 0 : break;
1514 : }
1515 0 : case 18: { /* winspool_AsyncSetPrinterData */
1516 0 : struct winspool_AsyncSetPrinterData *r2 = (struct winspool_AsyncSetPrinterData *)r;
1517 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1518 0 : DEBUG(5,("function winspool_AsyncSetPrinterData replied async\n"));
1519 : }
1520 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1521 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPrinterData, NDR_OUT | NDR_SET_VALUES, r2);
1522 : }
1523 0 : if (dce_call->fault_code != 0) {
1524 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSetPrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1525 : }
1526 0 : break;
1527 : }
1528 0 : case 19: { /* winspool_AsyncSetPrinterDataEx */
1529 0 : struct winspool_AsyncSetPrinterDataEx *r2 = (struct winspool_AsyncSetPrinterDataEx *)r;
1530 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1531 0 : DEBUG(5,("function winspool_AsyncSetPrinterDataEx replied async\n"));
1532 : }
1533 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1534 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
1535 : }
1536 0 : if (dce_call->fault_code != 0) {
1537 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSetPrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1538 : }
1539 0 : break;
1540 : }
1541 0 : case 20: { /* winspool_AsyncClosePrinter */
1542 0 : struct winspool_AsyncClosePrinter *r2 = (struct winspool_AsyncClosePrinter *)r;
1543 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1544 0 : DEBUG(5,("function winspool_AsyncClosePrinter replied async\n"));
1545 : }
1546 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1547 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncClosePrinter, NDR_OUT | NDR_SET_VALUES, r2);
1548 : }
1549 0 : if (dce_call->fault_code != 0) {
1550 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncClosePrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1551 : }
1552 0 : break;
1553 : }
1554 0 : case 21: { /* winspool_AsyncAddForm */
1555 0 : struct winspool_AsyncAddForm *r2 = (struct winspool_AsyncAddForm *)r;
1556 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1557 0 : DEBUG(5,("function winspool_AsyncAddForm replied async\n"));
1558 : }
1559 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1560 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddForm, NDR_OUT | NDR_SET_VALUES, r2);
1561 : }
1562 0 : if (dce_call->fault_code != 0) {
1563 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1564 : }
1565 0 : break;
1566 : }
1567 0 : case 22: { /* winspool_AsyncDeleteForm */
1568 0 : struct winspool_AsyncDeleteForm *r2 = (struct winspool_AsyncDeleteForm *)r;
1569 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1570 0 : DEBUG(5,("function winspool_AsyncDeleteForm replied async\n"));
1571 : }
1572 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1573 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeleteForm, NDR_OUT | NDR_SET_VALUES, r2);
1574 : }
1575 0 : if (dce_call->fault_code != 0) {
1576 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeleteForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1577 : }
1578 0 : break;
1579 : }
1580 0 : case 23: { /* winspool_AsyncGetForm */
1581 0 : struct winspool_AsyncGetForm *r2 = (struct winspool_AsyncGetForm *)r;
1582 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1583 0 : DEBUG(5,("function winspool_AsyncGetForm replied async\n"));
1584 : }
1585 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1586 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetForm, NDR_OUT | NDR_SET_VALUES, r2);
1587 : }
1588 0 : if (dce_call->fault_code != 0) {
1589 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1590 : }
1591 0 : break;
1592 : }
1593 0 : case 24: { /* winspool_AsyncSetForm */
1594 0 : struct winspool_AsyncSetForm *r2 = (struct winspool_AsyncSetForm *)r;
1595 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1596 0 : DEBUG(5,("function winspool_AsyncSetForm replied async\n"));
1597 : }
1598 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1599 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetForm, NDR_OUT | NDR_SET_VALUES, r2);
1600 : }
1601 0 : if (dce_call->fault_code != 0) {
1602 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSetForm\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1603 : }
1604 0 : break;
1605 : }
1606 0 : case 25: { /* winspool_AsyncEnumForms */
1607 0 : struct winspool_AsyncEnumForms *r2 = (struct winspool_AsyncEnumForms *)r;
1608 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1609 0 : DEBUG(5,("function winspool_AsyncEnumForms replied async\n"));
1610 : }
1611 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1612 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumForms, NDR_OUT | NDR_SET_VALUES, r2);
1613 : }
1614 0 : if (dce_call->fault_code != 0) {
1615 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumForms\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1616 : }
1617 0 : break;
1618 : }
1619 0 : case 26: { /* winspool_AsyncGetPrinterDriver */
1620 0 : struct winspool_AsyncGetPrinterDriver *r2 = (struct winspool_AsyncGetPrinterDriver *)r;
1621 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1622 0 : DEBUG(5,("function winspool_AsyncGetPrinterDriver replied async\n"));
1623 : }
1624 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1625 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDriver, NDR_OUT | NDR_SET_VALUES, r2);
1626 : }
1627 0 : if (dce_call->fault_code != 0) {
1628 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetPrinterDriver\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1629 : }
1630 0 : break;
1631 : }
1632 0 : case 27: { /* winspool_AsyncEnumPrinterData */
1633 0 : struct winspool_AsyncEnumPrinterData *r2 = (struct winspool_AsyncEnumPrinterData *)r;
1634 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1635 0 : DEBUG(5,("function winspool_AsyncEnumPrinterData replied async\n"));
1636 : }
1637 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1638 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterData, NDR_OUT | NDR_SET_VALUES, r2);
1639 : }
1640 0 : if (dce_call->fault_code != 0) {
1641 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1642 : }
1643 0 : break;
1644 : }
1645 0 : case 28: { /* winspool_AsyncEnumPrinterDataEx */
1646 0 : struct winspool_AsyncEnumPrinterDataEx *r2 = (struct winspool_AsyncEnumPrinterDataEx *)r;
1647 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1648 0 : DEBUG(5,("function winspool_AsyncEnumPrinterDataEx replied async\n"));
1649 : }
1650 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1651 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
1652 : }
1653 0 : if (dce_call->fault_code != 0) {
1654 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1655 : }
1656 0 : break;
1657 : }
1658 0 : case 29: { /* winspool_AsyncEnumPrinterKey */
1659 0 : struct winspool_AsyncEnumPrinterKey *r2 = (struct winspool_AsyncEnumPrinterKey *)r;
1660 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1661 0 : DEBUG(5,("function winspool_AsyncEnumPrinterKey replied async\n"));
1662 : }
1663 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1664 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterKey, NDR_OUT | NDR_SET_VALUES, r2);
1665 : }
1666 0 : if (dce_call->fault_code != 0) {
1667 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPrinterKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1668 : }
1669 0 : break;
1670 : }
1671 0 : case 30: { /* winspool_AsyncDeletePrinterData */
1672 0 : struct winspool_AsyncDeletePrinterData *r2 = (struct winspool_AsyncDeletePrinterData *)r;
1673 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1674 0 : DEBUG(5,("function winspool_AsyncDeletePrinterData replied async\n"));
1675 : }
1676 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1677 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterData, NDR_OUT | NDR_SET_VALUES, r2);
1678 : }
1679 0 : if (dce_call->fault_code != 0) {
1680 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinterData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1681 : }
1682 0 : break;
1683 : }
1684 0 : case 31: { /* winspool_AsyncDeletePrinterDataEx */
1685 0 : struct winspool_AsyncDeletePrinterDataEx *r2 = (struct winspool_AsyncDeletePrinterDataEx *)r;
1686 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1687 0 : DEBUG(5,("function winspool_AsyncDeletePrinterDataEx replied async\n"));
1688 : }
1689 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1690 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDataEx, NDR_OUT | NDR_SET_VALUES, r2);
1691 : }
1692 0 : if (dce_call->fault_code != 0) {
1693 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinterDataEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1694 : }
1695 0 : break;
1696 : }
1697 0 : case 32: { /* winspool_AsyncDeletePrinterKey */
1698 0 : struct winspool_AsyncDeletePrinterKey *r2 = (struct winspool_AsyncDeletePrinterKey *)r;
1699 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1700 0 : DEBUG(5,("function winspool_AsyncDeletePrinterKey replied async\n"));
1701 : }
1702 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1703 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterKey, NDR_OUT | NDR_SET_VALUES, r2);
1704 : }
1705 0 : if (dce_call->fault_code != 0) {
1706 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinterKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1707 : }
1708 0 : break;
1709 : }
1710 0 : case 33: { /* winspool_AsyncXcvData */
1711 0 : struct winspool_AsyncXcvData *r2 = (struct winspool_AsyncXcvData *)r;
1712 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1713 0 : DEBUG(5,("function winspool_AsyncXcvData replied async\n"));
1714 : }
1715 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1716 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncXcvData, NDR_OUT | NDR_SET_VALUES, r2);
1717 : }
1718 0 : if (dce_call->fault_code != 0) {
1719 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncXcvData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1720 : }
1721 0 : break;
1722 : }
1723 0 : case 34: { /* winspool_AsyncSendRecvBidiData */
1724 0 : struct winspool_AsyncSendRecvBidiData *r2 = (struct winspool_AsyncSendRecvBidiData *)r;
1725 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1726 0 : DEBUG(5,("function winspool_AsyncSendRecvBidiData replied async\n"));
1727 : }
1728 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1729 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSendRecvBidiData, NDR_OUT | NDR_SET_VALUES, r2);
1730 : }
1731 0 : if (dce_call->fault_code != 0) {
1732 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSendRecvBidiData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1733 : }
1734 0 : break;
1735 : }
1736 0 : case 35: { /* winspool_AsyncCreatePrinterIC */
1737 0 : struct winspool_AsyncCreatePrinterIC *r2 = (struct winspool_AsyncCreatePrinterIC *)r;
1738 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1739 0 : DEBUG(5,("function winspool_AsyncCreatePrinterIC replied async\n"));
1740 : }
1741 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1742 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncCreatePrinterIC, NDR_OUT | NDR_SET_VALUES, r2);
1743 : }
1744 0 : if (dce_call->fault_code != 0) {
1745 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncCreatePrinterIC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1746 : }
1747 0 : break;
1748 : }
1749 0 : case 36: { /* winspool_AsyncPlayGdiScriptOnPrinterIC */
1750 0 : struct winspool_AsyncPlayGdiScriptOnPrinterIC *r2 = (struct winspool_AsyncPlayGdiScriptOnPrinterIC *)r;
1751 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1752 0 : DEBUG(5,("function winspool_AsyncPlayGdiScriptOnPrinterIC replied async\n"));
1753 : }
1754 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1755 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncPlayGdiScriptOnPrinterIC, NDR_OUT | NDR_SET_VALUES, r2);
1756 : }
1757 0 : if (dce_call->fault_code != 0) {
1758 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncPlayGdiScriptOnPrinterIC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1759 : }
1760 0 : break;
1761 : }
1762 0 : case 37: { /* winspool_AsyncDeletePrinterIC */
1763 0 : struct winspool_AsyncDeletePrinterIC *r2 = (struct winspool_AsyncDeletePrinterIC *)r;
1764 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1765 0 : DEBUG(5,("function winspool_AsyncDeletePrinterIC replied async\n"));
1766 : }
1767 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1768 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterIC, NDR_OUT | NDR_SET_VALUES, r2);
1769 : }
1770 0 : if (dce_call->fault_code != 0) {
1771 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinterIC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1772 : }
1773 0 : break;
1774 : }
1775 0 : case 38: { /* winspool_AsyncEnumPrinters */
1776 0 : struct winspool_AsyncEnumPrinters *r2 = (struct winspool_AsyncEnumPrinters *)r;
1777 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1778 0 : DEBUG(5,("function winspool_AsyncEnumPrinters replied async\n"));
1779 : }
1780 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1781 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinters, NDR_OUT | NDR_SET_VALUES, r2);
1782 : }
1783 0 : if (dce_call->fault_code != 0) {
1784 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPrinters\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1785 : }
1786 0 : break;
1787 : }
1788 0 : case 39: { /* winspool_AsyncAddPrinterDriver */
1789 0 : struct winspool_AsyncAddPrinterDriver *r2 = (struct winspool_AsyncAddPrinterDriver *)r;
1790 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1791 0 : DEBUG(5,("function winspool_AsyncAddPrinterDriver replied async\n"));
1792 : }
1793 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1794 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPrinterDriver, NDR_OUT | NDR_SET_VALUES, r2);
1795 : }
1796 0 : if (dce_call->fault_code != 0) {
1797 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddPrinterDriver\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1798 : }
1799 0 : break;
1800 : }
1801 0 : case 40: { /* winspool_AsyncEnumPrinterDrivers */
1802 0 : struct winspool_AsyncEnumPrinterDrivers *r2 = (struct winspool_AsyncEnumPrinterDrivers *)r;
1803 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1804 0 : DEBUG(5,("function winspool_AsyncEnumPrinterDrivers replied async\n"));
1805 : }
1806 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1807 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrinterDrivers, NDR_OUT | NDR_SET_VALUES, r2);
1808 : }
1809 0 : if (dce_call->fault_code != 0) {
1810 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPrinterDrivers\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1811 : }
1812 0 : break;
1813 : }
1814 0 : case 41: { /* winspool_AsyncGetPrinterDriverDirectory */
1815 0 : struct winspool_AsyncGetPrinterDriverDirectory *r2 = (struct winspool_AsyncGetPrinterDriverDirectory *)r;
1816 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1817 0 : DEBUG(5,("function winspool_AsyncGetPrinterDriverDirectory replied async\n"));
1818 : }
1819 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1820 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDriverDirectory, NDR_OUT | NDR_SET_VALUES, r2);
1821 : }
1822 0 : if (dce_call->fault_code != 0) {
1823 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetPrinterDriverDirectory\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1824 : }
1825 0 : break;
1826 : }
1827 0 : case 42: { /* winspool_AsyncDeletePrinterDriver */
1828 0 : struct winspool_AsyncDeletePrinterDriver *r2 = (struct winspool_AsyncDeletePrinterDriver *)r;
1829 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1830 0 : DEBUG(5,("function winspool_AsyncDeletePrinterDriver replied async\n"));
1831 : }
1832 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1833 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDriver, NDR_OUT | NDR_SET_VALUES, r2);
1834 : }
1835 0 : if (dce_call->fault_code != 0) {
1836 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinterDriver\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1837 : }
1838 0 : break;
1839 : }
1840 0 : case 43: { /* winspool_AsyncDeletePrinterDriverEx */
1841 0 : struct winspool_AsyncDeletePrinterDriverEx *r2 = (struct winspool_AsyncDeletePrinterDriverEx *)r;
1842 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1843 0 : DEBUG(5,("function winspool_AsyncDeletePrinterDriverEx replied async\n"));
1844 : }
1845 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1846 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDriverEx, NDR_OUT | NDR_SET_VALUES, r2);
1847 : }
1848 0 : if (dce_call->fault_code != 0) {
1849 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinterDriverEx\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1850 : }
1851 0 : break;
1852 : }
1853 0 : case 44: { /* winspool_AsyncAddPrintProcessor */
1854 0 : struct winspool_AsyncAddPrintProcessor *r2 = (struct winspool_AsyncAddPrintProcessor *)r;
1855 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1856 0 : DEBUG(5,("function winspool_AsyncAddPrintProcessor replied async\n"));
1857 : }
1858 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1859 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPrintProcessor, NDR_OUT | NDR_SET_VALUES, r2);
1860 : }
1861 0 : if (dce_call->fault_code != 0) {
1862 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddPrintProcessor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1863 : }
1864 0 : break;
1865 : }
1866 0 : case 45: { /* winspool_AsyncEnumPrintProcessors */
1867 0 : struct winspool_AsyncEnumPrintProcessors *r2 = (struct winspool_AsyncEnumPrintProcessors *)r;
1868 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1869 0 : DEBUG(5,("function winspool_AsyncEnumPrintProcessors replied async\n"));
1870 : }
1871 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1872 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrintProcessors, NDR_OUT | NDR_SET_VALUES, r2);
1873 : }
1874 0 : if (dce_call->fault_code != 0) {
1875 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPrintProcessors\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1876 : }
1877 0 : break;
1878 : }
1879 0 : case 46: { /* winspool_AsyncGetPrintProcessorDirectory */
1880 0 : struct winspool_AsyncGetPrintProcessorDirectory *r2 = (struct winspool_AsyncGetPrintProcessorDirectory *)r;
1881 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1882 0 : DEBUG(5,("function winspool_AsyncGetPrintProcessorDirectory replied async\n"));
1883 : }
1884 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1885 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrintProcessorDirectory, NDR_OUT | NDR_SET_VALUES, r2);
1886 : }
1887 0 : if (dce_call->fault_code != 0) {
1888 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetPrintProcessorDirectory\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1889 : }
1890 0 : break;
1891 : }
1892 0 : case 47: { /* winspool_AsyncEnumPorts */
1893 0 : struct winspool_AsyncEnumPorts *r2 = (struct winspool_AsyncEnumPorts *)r;
1894 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1895 0 : DEBUG(5,("function winspool_AsyncEnumPorts replied async\n"));
1896 : }
1897 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1898 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPorts, NDR_OUT | NDR_SET_VALUES, r2);
1899 : }
1900 0 : if (dce_call->fault_code != 0) {
1901 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPorts\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1902 : }
1903 0 : break;
1904 : }
1905 0 : case 48: { /* winspool_AsyncEnumMonitors */
1906 0 : struct winspool_AsyncEnumMonitors *r2 = (struct winspool_AsyncEnumMonitors *)r;
1907 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1908 0 : DEBUG(5,("function winspool_AsyncEnumMonitors replied async\n"));
1909 : }
1910 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1911 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumMonitors, NDR_OUT | NDR_SET_VALUES, r2);
1912 : }
1913 0 : if (dce_call->fault_code != 0) {
1914 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumMonitors\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1915 : }
1916 0 : break;
1917 : }
1918 0 : case 49: { /* winspool_AsyncAddPort */
1919 0 : struct winspool_AsyncAddPort *r2 = (struct winspool_AsyncAddPort *)r;
1920 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1921 0 : DEBUG(5,("function winspool_AsyncAddPort replied async\n"));
1922 : }
1923 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1924 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPort, NDR_OUT | NDR_SET_VALUES, r2);
1925 : }
1926 0 : if (dce_call->fault_code != 0) {
1927 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddPort\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1928 : }
1929 0 : break;
1930 : }
1931 0 : case 50: { /* winspool_AsyncSetPort */
1932 0 : struct winspool_AsyncSetPort *r2 = (struct winspool_AsyncSetPort *)r;
1933 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1934 0 : DEBUG(5,("function winspool_AsyncSetPort replied async\n"));
1935 : }
1936 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1937 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetPort, NDR_OUT | NDR_SET_VALUES, r2);
1938 : }
1939 0 : if (dce_call->fault_code != 0) {
1940 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSetPort\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1941 : }
1942 0 : break;
1943 : }
1944 0 : case 51: { /* winspool_AsyncAddMonitor */
1945 0 : struct winspool_AsyncAddMonitor *r2 = (struct winspool_AsyncAddMonitor *)r;
1946 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1947 0 : DEBUG(5,("function winspool_AsyncAddMonitor replied async\n"));
1948 : }
1949 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1950 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddMonitor, NDR_OUT | NDR_SET_VALUES, r2);
1951 : }
1952 0 : if (dce_call->fault_code != 0) {
1953 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddMonitor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1954 : }
1955 0 : break;
1956 : }
1957 0 : case 52: { /* winspool_AsyncDeleteMonitor */
1958 0 : struct winspool_AsyncDeleteMonitor *r2 = (struct winspool_AsyncDeleteMonitor *)r;
1959 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1960 0 : DEBUG(5,("function winspool_AsyncDeleteMonitor replied async\n"));
1961 : }
1962 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1963 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeleteMonitor, NDR_OUT | NDR_SET_VALUES, r2);
1964 : }
1965 0 : if (dce_call->fault_code != 0) {
1966 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeleteMonitor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1967 : }
1968 0 : break;
1969 : }
1970 0 : case 53: { /* winspool_AsyncDeletePrintProcessor */
1971 0 : struct winspool_AsyncDeletePrintProcessor *r2 = (struct winspool_AsyncDeletePrintProcessor *)r;
1972 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1973 0 : DEBUG(5,("function winspool_AsyncDeletePrintProcessor replied async\n"));
1974 : }
1975 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1976 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrintProcessor, NDR_OUT | NDR_SET_VALUES, r2);
1977 : }
1978 0 : if (dce_call->fault_code != 0) {
1979 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrintProcessor\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1980 : }
1981 0 : break;
1982 : }
1983 0 : case 54: { /* winspool_AsyncEnumPrintProcessorDatatypes */
1984 0 : struct winspool_AsyncEnumPrintProcessorDatatypes *r2 = (struct winspool_AsyncEnumPrintProcessorDatatypes *)r;
1985 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1986 0 : DEBUG(5,("function winspool_AsyncEnumPrintProcessorDatatypes replied async\n"));
1987 : }
1988 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1989 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPrintProcessorDatatypes, NDR_OUT | NDR_SET_VALUES, r2);
1990 : }
1991 0 : if (dce_call->fault_code != 0) {
1992 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPrintProcessorDatatypes\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1993 : }
1994 0 : break;
1995 : }
1996 0 : case 55: { /* winspool_AsyncAddPerMachineConnection */
1997 0 : struct winspool_AsyncAddPerMachineConnection *r2 = (struct winspool_AsyncAddPerMachineConnection *)r;
1998 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1999 0 : DEBUG(5,("function winspool_AsyncAddPerMachineConnection replied async\n"));
2000 : }
2001 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2002 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncAddPerMachineConnection, NDR_OUT | NDR_SET_VALUES, r2);
2003 : }
2004 0 : if (dce_call->fault_code != 0) {
2005 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncAddPerMachineConnection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2006 : }
2007 0 : break;
2008 : }
2009 0 : case 56: { /* winspool_AsyncDeletePerMachineConnection */
2010 0 : struct winspool_AsyncDeletePerMachineConnection *r2 = (struct winspool_AsyncDeletePerMachineConnection *)r;
2011 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2012 0 : DEBUG(5,("function winspool_AsyncDeletePerMachineConnection replied async\n"));
2013 : }
2014 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2015 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePerMachineConnection, NDR_OUT | NDR_SET_VALUES, r2);
2016 : }
2017 0 : if (dce_call->fault_code != 0) {
2018 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePerMachineConnection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2019 : }
2020 0 : break;
2021 : }
2022 0 : case 57: { /* winspool_AsyncEnumPerMachineConnections */
2023 0 : struct winspool_AsyncEnumPerMachineConnections *r2 = (struct winspool_AsyncEnumPerMachineConnections *)r;
2024 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2025 0 : DEBUG(5,("function winspool_AsyncEnumPerMachineConnections replied async\n"));
2026 : }
2027 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2028 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumPerMachineConnections, NDR_OUT | NDR_SET_VALUES, r2);
2029 : }
2030 0 : if (dce_call->fault_code != 0) {
2031 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumPerMachineConnections\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2032 : }
2033 0 : break;
2034 : }
2035 0 : case 58: { /* winspool_SyncRegisterForRemoteNotifications */
2036 0 : struct winspool_SyncRegisterForRemoteNotifications *r2 = (struct winspool_SyncRegisterForRemoteNotifications *)r;
2037 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2038 0 : DEBUG(5,("function winspool_SyncRegisterForRemoteNotifications replied async\n"));
2039 : }
2040 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2041 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_SyncRegisterForRemoteNotifications, NDR_OUT | NDR_SET_VALUES, r2);
2042 : }
2043 0 : if (dce_call->fault_code != 0) {
2044 0 : DBG_WARNING("dcerpc_fault %s in winspool_SyncRegisterForRemoteNotifications\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2045 : }
2046 0 : break;
2047 : }
2048 0 : case 59: { /* winspool_SyncUnRegisterForRemoteNotifications */
2049 0 : struct winspool_SyncUnRegisterForRemoteNotifications *r2 = (struct winspool_SyncUnRegisterForRemoteNotifications *)r;
2050 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2051 0 : DEBUG(5,("function winspool_SyncUnRegisterForRemoteNotifications replied async\n"));
2052 : }
2053 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2054 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_SyncUnRegisterForRemoteNotifications, NDR_OUT | NDR_SET_VALUES, r2);
2055 : }
2056 0 : if (dce_call->fault_code != 0) {
2057 0 : DBG_WARNING("dcerpc_fault %s in winspool_SyncUnRegisterForRemoteNotifications\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2058 : }
2059 0 : break;
2060 : }
2061 0 : case 60: { /* winspool_SyncRefreshRemoteNotifications */
2062 0 : struct winspool_SyncRefreshRemoteNotifications *r2 = (struct winspool_SyncRefreshRemoteNotifications *)r;
2063 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2064 0 : DEBUG(5,("function winspool_SyncRefreshRemoteNotifications replied async\n"));
2065 : }
2066 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2067 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_SyncRefreshRemoteNotifications, NDR_OUT | NDR_SET_VALUES, r2);
2068 : }
2069 0 : if (dce_call->fault_code != 0) {
2070 0 : DBG_WARNING("dcerpc_fault %s in winspool_SyncRefreshRemoteNotifications\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2071 : }
2072 0 : break;
2073 : }
2074 0 : case 61: { /* winspool_AsyncGetRemoteNotifications */
2075 0 : struct winspool_AsyncGetRemoteNotifications *r2 = (struct winspool_AsyncGetRemoteNotifications *)r;
2076 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2077 0 : DEBUG(5,("function winspool_AsyncGetRemoteNotifications replied async\n"));
2078 : }
2079 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2080 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetRemoteNotifications, NDR_OUT | NDR_SET_VALUES, r2);
2081 : }
2082 0 : if (dce_call->fault_code != 0) {
2083 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetRemoteNotifications\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2084 : }
2085 0 : break;
2086 : }
2087 0 : case 62: { /* winspool_AsyncInstallPrinterDriverFromPackage */
2088 0 : struct winspool_AsyncInstallPrinterDriverFromPackage *r2 = (struct winspool_AsyncInstallPrinterDriverFromPackage *)r;
2089 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2090 0 : DEBUG(5,("function winspool_AsyncInstallPrinterDriverFromPackage replied async\n"));
2091 : }
2092 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2093 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncInstallPrinterDriverFromPackage, NDR_OUT | NDR_SET_VALUES, r2);
2094 : }
2095 0 : if (dce_call->fault_code != 0) {
2096 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncInstallPrinterDriverFromPackage\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2097 : }
2098 0 : break;
2099 : }
2100 0 : case 63: { /* winspool_AsyncUploadPrinterDriverPackage */
2101 0 : struct winspool_AsyncUploadPrinterDriverPackage *r2 = (struct winspool_AsyncUploadPrinterDriverPackage *)r;
2102 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2103 0 : DEBUG(5,("function winspool_AsyncUploadPrinterDriverPackage replied async\n"));
2104 : }
2105 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2106 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncUploadPrinterDriverPackage, NDR_OUT | NDR_SET_VALUES, r2);
2107 : }
2108 0 : if (dce_call->fault_code != 0) {
2109 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncUploadPrinterDriverPackage\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2110 : }
2111 0 : break;
2112 : }
2113 0 : case 64: { /* winspool_AsyncGetCorePrinterDrivers */
2114 0 : struct winspool_AsyncGetCorePrinterDrivers *r2 = (struct winspool_AsyncGetCorePrinterDrivers *)r;
2115 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2116 0 : DEBUG(5,("function winspool_AsyncGetCorePrinterDrivers replied async\n"));
2117 : }
2118 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2119 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetCorePrinterDrivers, NDR_OUT | NDR_SET_VALUES, r2);
2120 : }
2121 0 : if (dce_call->fault_code != 0) {
2122 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetCorePrinterDrivers\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2123 : }
2124 0 : break;
2125 : }
2126 0 : case 65: { /* winspool_AsyncCorePrinterDriverInstalled */
2127 0 : struct winspool_AsyncCorePrinterDriverInstalled *r2 = (struct winspool_AsyncCorePrinterDriverInstalled *)r;
2128 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2129 0 : DEBUG(5,("function winspool_AsyncCorePrinterDriverInstalled replied async\n"));
2130 : }
2131 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2132 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncCorePrinterDriverInstalled, NDR_OUT | NDR_SET_VALUES, r2);
2133 : }
2134 0 : if (dce_call->fault_code != 0) {
2135 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncCorePrinterDriverInstalled\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2136 : }
2137 0 : break;
2138 : }
2139 0 : case 66: { /* winspool_AsyncGetPrinterDriverPackagePath */
2140 0 : struct winspool_AsyncGetPrinterDriverPackagePath *r2 = (struct winspool_AsyncGetPrinterDriverPackagePath *)r;
2141 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2142 0 : DEBUG(5,("function winspool_AsyncGetPrinterDriverPackagePath replied async\n"));
2143 : }
2144 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2145 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetPrinterDriverPackagePath, NDR_OUT | NDR_SET_VALUES, r2);
2146 : }
2147 0 : if (dce_call->fault_code != 0) {
2148 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetPrinterDriverPackagePath\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2149 : }
2150 0 : break;
2151 : }
2152 0 : case 67: { /* winspool_AsyncDeletePrinterDriverPackage */
2153 0 : struct winspool_AsyncDeletePrinterDriverPackage *r2 = (struct winspool_AsyncDeletePrinterDriverPackage *)r;
2154 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2155 0 : DEBUG(5,("function winspool_AsyncDeletePrinterDriverPackage replied async\n"));
2156 : }
2157 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2158 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeletePrinterDriverPackage, NDR_OUT | NDR_SET_VALUES, r2);
2159 : }
2160 0 : if (dce_call->fault_code != 0) {
2161 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeletePrinterDriverPackage\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2162 : }
2163 0 : break;
2164 : }
2165 0 : case 68: { /* winspool_AsyncReadPrinter */
2166 0 : struct winspool_AsyncReadPrinter *r2 = (struct winspool_AsyncReadPrinter *)r;
2167 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2168 0 : DEBUG(5,("function winspool_AsyncReadPrinter replied async\n"));
2169 : }
2170 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2171 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncReadPrinter, NDR_OUT | NDR_SET_VALUES, r2);
2172 : }
2173 0 : if (dce_call->fault_code != 0) {
2174 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncReadPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2175 : }
2176 0 : break;
2177 : }
2178 0 : case 69: { /* winspool_AsyncResetPrinter */
2179 0 : struct winspool_AsyncResetPrinter *r2 = (struct winspool_AsyncResetPrinter *)r;
2180 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2181 0 : DEBUG(5,("function winspool_AsyncResetPrinter replied async\n"));
2182 : }
2183 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2184 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncResetPrinter, NDR_OUT | NDR_SET_VALUES, r2);
2185 : }
2186 0 : if (dce_call->fault_code != 0) {
2187 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncResetPrinter\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2188 : }
2189 0 : break;
2190 : }
2191 0 : case 70: { /* winspool_AsyncGetJobNamedPropertyValue */
2192 0 : struct winspool_AsyncGetJobNamedPropertyValue *r2 = (struct winspool_AsyncGetJobNamedPropertyValue *)r;
2193 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2194 0 : DEBUG(5,("function winspool_AsyncGetJobNamedPropertyValue replied async\n"));
2195 : }
2196 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2197 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncGetJobNamedPropertyValue, NDR_OUT | NDR_SET_VALUES, r2);
2198 : }
2199 0 : if (dce_call->fault_code != 0) {
2200 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncGetJobNamedPropertyValue\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2201 : }
2202 0 : break;
2203 : }
2204 0 : case 71: { /* winspool_AsyncSetJobNamedProperty */
2205 0 : struct winspool_AsyncSetJobNamedProperty *r2 = (struct winspool_AsyncSetJobNamedProperty *)r;
2206 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2207 0 : DEBUG(5,("function winspool_AsyncSetJobNamedProperty replied async\n"));
2208 : }
2209 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2210 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncSetJobNamedProperty, NDR_OUT | NDR_SET_VALUES, r2);
2211 : }
2212 0 : if (dce_call->fault_code != 0) {
2213 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncSetJobNamedProperty\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2214 : }
2215 0 : break;
2216 : }
2217 0 : case 72: { /* winspool_AsyncDeleteJobNamedProperty */
2218 0 : struct winspool_AsyncDeleteJobNamedProperty *r2 = (struct winspool_AsyncDeleteJobNamedProperty *)r;
2219 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2220 0 : DEBUG(5,("function winspool_AsyncDeleteJobNamedProperty replied async\n"));
2221 : }
2222 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2223 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncDeleteJobNamedProperty, NDR_OUT | NDR_SET_VALUES, r2);
2224 : }
2225 0 : if (dce_call->fault_code != 0) {
2226 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncDeleteJobNamedProperty\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2227 : }
2228 0 : break;
2229 : }
2230 0 : case 73: { /* winspool_AsyncEnumJobNamedProperties */
2231 0 : struct winspool_AsyncEnumJobNamedProperties *r2 = (struct winspool_AsyncEnumJobNamedProperties *)r;
2232 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2233 0 : DEBUG(5,("function winspool_AsyncEnumJobNamedProperties replied async\n"));
2234 : }
2235 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2236 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncEnumJobNamedProperties, NDR_OUT | NDR_SET_VALUES, r2);
2237 : }
2238 0 : if (dce_call->fault_code != 0) {
2239 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncEnumJobNamedProperties\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2240 : }
2241 0 : break;
2242 : }
2243 0 : case 74: { /* winspool_AsyncLogJobInfoForBranchOffice */
2244 0 : struct winspool_AsyncLogJobInfoForBranchOffice *r2 = (struct winspool_AsyncLogJobInfoForBranchOffice *)r;
2245 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
2246 0 : DEBUG(5,("function winspool_AsyncLogJobInfoForBranchOffice replied async\n"));
2247 : }
2248 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
2249 0 : NDR_PRINT_FUNCTION_DEBUG(winspool_AsyncLogJobInfoForBranchOffice, NDR_OUT | NDR_SET_VALUES, r2);
2250 : }
2251 0 : if (dce_call->fault_code != 0) {
2252 0 : DBG_WARNING("dcerpc_fault %s in winspool_AsyncLogJobInfoForBranchOffice\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
2253 : }
2254 0 : break;
2255 : }
2256 0 : default:
2257 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
2258 0 : break;
2259 : }
2260 :
2261 0 : if (dce_call->fault_code != 0) {
2262 0 : return NT_STATUS_NET_WRITE_FAULT;
2263 : }
2264 :
2265 0 : return NT_STATUS_OK;
2266 : }
2267 :
2268 0 : NTSTATUS iremotewinspool__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
2269 : {
2270 0 : enum ndr_err_code ndr_err;
2271 0 : uint16_t opnum = dce_call->pkt.u.request.opnum;
2272 :
2273 0 : if (forward_opnum_to_spoolss(opnum)) {
2274 0 : return spoolss__op_ndr_push(dce_call, mem_ctx, push, r);
2275 : }
2276 :
2277 0 : ndr_err = ndr_table_iremotewinspool.calls[opnum].ndr_push(push, NDR_OUT, r);
2278 0 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2279 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
2280 0 : return NT_STATUS_NET_WRITE_FAULT;
2281 : }
2282 :
2283 0 : return NT_STATUS_OK;
2284 : }
2285 :
2286 0 : NTSTATUS iremotewinspool__op_local(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
2287 : {
2288 0 : return iremotewinspool__op_dispatch_internal(dce_call, mem_ctx, r, true);
2289 : }
2290 :
2291 : static const struct dcesrv_interface dcesrv_iremotewinspool_interface = {
2292 : .name = "iremotewinspool",
2293 : .syntax_id = {{0x76f03f96,0xcdfd,0x44fc,{0xa2,0x2c},{0x64,0x95,0x0a,0x00,0x12,0x09}},1.0},
2294 : .bind = iremotewinspool__op_bind,
2295 : .unbind = iremotewinspool__op_unbind,
2296 : .ndr_pull = iremotewinspool__op_ndr_pull,
2297 : .dispatch = iremotewinspool__op_dispatch,
2298 : .reply = iremotewinspool__op_reply,
2299 : .ndr_push = iremotewinspool__op_ndr_push,
2300 : .local = iremotewinspool__op_local,
2301 : #ifdef DCESRV_INTERFACE_IREMOTEWINSPOOL_FLAGS
2302 : .flags = DCESRV_INTERFACE_IREMOTEWINSPOOL_FLAGS
2303 : #else
2304 : .flags = 0
2305 : #endif
2306 : };
2307 :
2308 0 : static NTSTATUS iremotewinspool__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
2309 : {
2310 0 : int i;
2311 0 : NTSTATUS ret;
2312 :
2313 : #ifdef DCESRV_INTERFACE_IREMOTEWINSPOOL_NCACN_NP_SECONDARY_ENDPOINT
2314 : const char *ncacn_np_secondary_endpoint = DCESRV_INTERFACE_IREMOTEWINSPOOL_NCACN_NP_SECONDARY_ENDPOINT;
2315 : #else
2316 0 : const char *ncacn_np_secondary_endpoint = NULL;
2317 : #endif
2318 :
2319 0 : for (i=0;i<ndr_table_iremotewinspool.endpoints->count;i++) {
2320 0 : const char *name = ndr_table_iremotewinspool.endpoints->names[i];
2321 :
2322 0 : ret = dcesrv_interface_register(dce_ctx, name, ncacn_np_secondary_endpoint, &dcesrv_iremotewinspool_interface, NULL);
2323 0 : if (!NT_STATUS_IS_OK(ret)) {
2324 0 : DBG_ERR("Failed to register endpoint '%s'\n",name);
2325 0 : return ret;
2326 : }
2327 : }
2328 :
2329 0 : return NT_STATUS_OK;
2330 : }
2331 :
2332 0 : static NTSTATUS iremotewinspool__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
2333 : {
2334 0 : return NT_STATUS_OK;
2335 : }
2336 :
2337 0 : static bool iremotewinspool__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
2338 : {
2339 0 : if (dcesrv_iremotewinspool_interface.syntax_id.if_version == if_version && GUID_equal(&dcesrv_iremotewinspool_interface.syntax_id.uuid, uuid)) {
2340 0 : memcpy(iface,&dcesrv_iremotewinspool_interface, sizeof(*iface));
2341 0 : return true;
2342 : }
2343 :
2344 0 : return false;
2345 : }
2346 :
2347 0 : static bool iremotewinspool__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
2348 : {
2349 0 : if (strcmp(dcesrv_iremotewinspool_interface.name, name)==0) {
2350 0 : memcpy(iface, &dcesrv_iremotewinspool_interface, sizeof(*iface));
2351 0 : return true;
2352 : }
2353 :
2354 0 : return false;
2355 : }
2356 :
2357 : static const struct dcesrv_endpoint_server iremotewinspool_ep_server = {
2358 : /* fill in our name */
2359 : .name = "iremotewinspool",
2360 :
2361 : /* Initialization flag */
2362 : .initialized = false,
2363 :
2364 : /* fill in all the operations */
2365 : #ifdef DCESRV_INTERFACE_IREMOTEWINSPOOL_INIT_SERVER
2366 : .init_server = DCESRV_INTERFACE_IREMOTEWINSPOOL_INIT_SERVER,
2367 : #else
2368 : .init_server = iremotewinspool__op_init_server,
2369 : #endif
2370 : #ifdef DCESRV_INTERFACE_IREMOTEWINSPOOL_SHUTDOWN_SERVER
2371 : .shutdown_server = DCESRV_INTERFACE_IREMOTEWINSPOOL_SHUTDOWN_SERVER,
2372 : #else
2373 : .shutdown_server = iremotewinspool__op_shutdown_server,
2374 : #endif
2375 : .interface_by_uuid = iremotewinspool__op_interface_by_uuid,
2376 : .interface_by_name = iremotewinspool__op_interface_by_name
2377 : };
2378 :
2379 0 : const struct dcesrv_endpoint_server *iremotewinspool_get_ep_server(void)
2380 : {
2381 0 : return &iremotewinspool_ep_server;
2382 : }
|