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