Line data Source code
1 : /* s3 compat server functions auto-generated by pidl */
2 : #include "bin/default/librpc/gen_ndr/ndr_ntsvcs.h"
3 : #include "bin/default/librpc/gen_ndr/ndr_ntsvcs_scompat.h"
4 : #include <librpc/rpc/dcesrv_core.h>
5 : #include <rpc_server/rpc_config.h>
6 : #include <rpc_server/rpc_server.h>
7 : #include <util/debug.h>
8 :
9 : enum s3compat_rpc_dispatch {
10 : S3COMPAT_RPC_DISPATCH_EXTERNAL = 0x00000001,
11 : S3COMPAT_RPC_DISPATCH_INTERNAL = 0x00000002,
12 : };
13 :
14 : /* ntsvcs - dcerpc server boilerplate generated by pidl */
15 4 : static NTSTATUS ntsvcs__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
16 : {
17 : #ifdef DCESRV_INTERFACE_NTSVCS_BIND
18 : return DCESRV_INTERFACE_NTSVCS_BIND(context,iface);
19 : #else
20 4 : return NT_STATUS_OK;
21 : #endif
22 : }
23 :
24 4 : static void ntsvcs__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
25 : {
26 : #ifdef DCESRV_INTERFACE_NTSVCS_UNBIND
27 : DCESRV_INTERFACE_NTSVCS_UNBIND(context, iface);
28 : #else
29 4 : return;
30 : #endif
31 : }
32 :
33 32 : NTSTATUS ntsvcs__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
34 : {
35 0 : enum ndr_err_code ndr_err;
36 32 : uint16_t opnum = dce_call->pkt.u.request.opnum;
37 :
38 32 : dce_call->fault_code = 0;
39 :
40 32 : if (opnum >= ndr_table_ntsvcs.num_calls) {
41 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
42 0 : return NT_STATUS_NET_WRITE_FAULT;
43 : }
44 :
45 32 : *r = talloc_named(mem_ctx, ndr_table_ntsvcs.calls[opnum].struct_size, "struct %s", ndr_table_ntsvcs.calls[opnum].name);
46 32 : NT_STATUS_HAVE_NO_MEMORY(*r);
47 :
48 : /* unravel the NDR for the packet */
49 32 : ndr_err = ndr_table_ntsvcs.calls[opnum].ndr_pull(pull, NDR_IN, *r);
50 32 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
51 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
52 0 : return NT_STATUS_NET_WRITE_FAULT;
53 : }
54 :
55 32 : return NT_STATUS_OK;
56 : }
57 :
58 32 : static NTSTATUS ntsvcs__op_dispatch_internal(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, enum s3compat_rpc_dispatch dispatch)
59 : {
60 32 : uint16_t opnum = dce_call->pkt.u.request.opnum;
61 32 : struct pipes_struct *p = NULL;
62 32 : NTSTATUS status = NT_STATUS_OK;
63 32 : bool impersonated = false;
64 :
65 : /* Retrieve pipes struct */
66 32 : p = dcesrv_get_pipes_struct(dce_call->conn);
67 32 : p->dce_call = dce_call;
68 32 : p->mem_ctx = mem_ctx;
69 : /* Reset pipes struct fault state */
70 32 : p->fault_state = 0;
71 :
72 : /* Impersonate */
73 32 : if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {
74 32 : impersonated = become_authenticated_pipe_user(dce_call->auth_state->session_info);
75 32 : if (!impersonated) {
76 0 : dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;
77 0 : status = NT_STATUS_NET_WRITE_FAULT;
78 0 : goto fail;
79 : }
80 : }
81 :
82 32 : switch (opnum) {
83 0 : case 0: { /* PNP_Disconnect */
84 0 : struct PNP_Disconnect *r2 = (struct PNP_Disconnect *)r;
85 0 : if (DEBUGLEVEL >= 10) {
86 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_Disconnect, NDR_IN, r2);
87 : }
88 0 : r2->out.result = _PNP_Disconnect(p, r2);
89 0 : break;
90 : }
91 0 : case 1: { /* PNP_Connect */
92 0 : struct PNP_Connect *r2 = (struct PNP_Connect *)r;
93 0 : if (DEBUGLEVEL >= 10) {
94 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_Connect, NDR_IN, r2);
95 : }
96 0 : r2->out.result = _PNP_Connect(p, r2);
97 0 : break;
98 : }
99 4 : case 2: { /* PNP_GetVersion */
100 4 : struct PNP_GetVersion *r2 = (struct PNP_GetVersion *)r;
101 4 : if (DEBUGLEVEL >= 10) {
102 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetVersion, NDR_IN, r2);
103 : }
104 4 : NDR_ZERO_STRUCT(r2->out);
105 4 : r2->out.version = talloc_zero(r2, uint16_t);
106 4 : if (r2->out.version == NULL) {
107 0 : status = NT_STATUS_NO_MEMORY;
108 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
109 0 : goto fail;
110 : }
111 :
112 4 : r2->out.result = _PNP_GetVersion(p, r2);
113 4 : break;
114 : }
115 0 : case 3: { /* PNP_GetGlobalState */
116 0 : struct PNP_GetGlobalState *r2 = (struct PNP_GetGlobalState *)r;
117 0 : if (DEBUGLEVEL >= 10) {
118 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetGlobalState, NDR_IN, r2);
119 : }
120 0 : r2->out.result = _PNP_GetGlobalState(p, r2);
121 0 : break;
122 : }
123 0 : case 4: { /* PNP_InitDetection */
124 0 : struct PNP_InitDetection *r2 = (struct PNP_InitDetection *)r;
125 0 : if (DEBUGLEVEL >= 10) {
126 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_InitDetection, NDR_IN, r2);
127 : }
128 0 : r2->out.result = _PNP_InitDetection(p, r2);
129 0 : break;
130 : }
131 0 : case 5: { /* PNP_ReportLogOn */
132 0 : struct PNP_ReportLogOn *r2 = (struct PNP_ReportLogOn *)r;
133 0 : if (DEBUGLEVEL >= 10) {
134 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_ReportLogOn, NDR_IN, r2);
135 : }
136 0 : r2->out.result = _PNP_ReportLogOn(p, r2);
137 0 : break;
138 : }
139 0 : case 6: { /* PNP_ValidateDeviceInstance */
140 0 : struct PNP_ValidateDeviceInstance *r2 = (struct PNP_ValidateDeviceInstance *)r;
141 0 : if (DEBUGLEVEL >= 10) {
142 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_ValidateDeviceInstance, NDR_IN, r2);
143 : }
144 0 : r2->out.result = _PNP_ValidateDeviceInstance(p, r2);
145 0 : break;
146 : }
147 0 : case 7: { /* PNP_GetRootDeviceInstance */
148 0 : struct PNP_GetRootDeviceInstance *r2 = (struct PNP_GetRootDeviceInstance *)r;
149 0 : if (DEBUGLEVEL >= 10) {
150 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetRootDeviceInstance, NDR_IN, r2);
151 : }
152 0 : r2->out.result = _PNP_GetRootDeviceInstance(p, r2);
153 0 : break;
154 : }
155 0 : case 8: { /* PNP_GetRelatedDeviceInstance */
156 0 : struct PNP_GetRelatedDeviceInstance *r2 = (struct PNP_GetRelatedDeviceInstance *)r;
157 0 : if (DEBUGLEVEL >= 10) {
158 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetRelatedDeviceInstance, NDR_IN, r2);
159 : }
160 0 : r2->out.result = _PNP_GetRelatedDeviceInstance(p, r2);
161 0 : break;
162 : }
163 0 : case 9: { /* PNP_EnumerateSubKeys */
164 0 : struct PNP_EnumerateSubKeys *r2 = (struct PNP_EnumerateSubKeys *)r;
165 0 : if (DEBUGLEVEL >= 10) {
166 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_EnumerateSubKeys, NDR_IN, r2);
167 : }
168 0 : r2->out.result = _PNP_EnumerateSubKeys(p, r2);
169 0 : break;
170 : }
171 12 : case 10: { /* PNP_GetDeviceList */
172 12 : struct PNP_GetDeviceList *r2 = (struct PNP_GetDeviceList *)r;
173 12 : if (DEBUGLEVEL >= 10) {
174 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceList, NDR_IN, r2);
175 : }
176 12 : NDR_ZERO_STRUCT(r2->out);
177 12 : r2->out.length = r2->in.length;
178 12 : r2->out.buffer = talloc_zero_array(r2, uint16_t, *r2->out.length);
179 12 : if (r2->out.buffer == NULL) {
180 0 : status = NT_STATUS_NO_MEMORY;
181 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
182 0 : goto fail;
183 : }
184 :
185 12 : r2->out.result = _PNP_GetDeviceList(p, r2);
186 12 : break;
187 : }
188 12 : case 11: { /* PNP_GetDeviceListSize */
189 12 : struct PNP_GetDeviceListSize *r2 = (struct PNP_GetDeviceListSize *)r;
190 12 : if (DEBUGLEVEL >= 10) {
191 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceListSize, NDR_IN, r2);
192 : }
193 12 : NDR_ZERO_STRUCT(r2->out);
194 12 : r2->out.size = talloc_zero(r2, uint32_t);
195 12 : if (r2->out.size == NULL) {
196 0 : status = NT_STATUS_NO_MEMORY;
197 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
198 0 : goto fail;
199 : }
200 :
201 12 : r2->out.result = _PNP_GetDeviceListSize(p, r2);
202 12 : break;
203 : }
204 0 : case 12: { /* PNP_GetDepth */
205 0 : struct PNP_GetDepth *r2 = (struct PNP_GetDepth *)r;
206 0 : if (DEBUGLEVEL >= 10) {
207 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDepth, NDR_IN, r2);
208 : }
209 0 : r2->out.result = _PNP_GetDepth(p, r2);
210 0 : break;
211 : }
212 4 : case 13: { /* PNP_GetDeviceRegProp */
213 4 : struct PNP_GetDeviceRegProp *r2 = (struct PNP_GetDeviceRegProp *)r;
214 4 : if (DEBUGLEVEL >= 10) {
215 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceRegProp, NDR_IN, r2);
216 : }
217 4 : NDR_ZERO_STRUCT(r2->out);
218 4 : r2->out.reg_data_type = r2->in.reg_data_type;
219 4 : r2->out.buffer_size = r2->in.buffer_size;
220 4 : r2->out.needed = r2->in.needed;
221 4 : r2->out.buffer = talloc_zero_array(r2, uint8_t, *r2->out.buffer_size);
222 4 : if (r2->out.buffer == NULL) {
223 0 : status = NT_STATUS_NO_MEMORY;
224 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
225 0 : goto fail;
226 : }
227 :
228 4 : r2->out.result = _PNP_GetDeviceRegProp(p, r2);
229 4 : break;
230 : }
231 0 : case 14: { /* PNP_SetDeviceRegProp */
232 0 : struct PNP_SetDeviceRegProp *r2 = (struct PNP_SetDeviceRegProp *)r;
233 0 : if (DEBUGLEVEL >= 10) {
234 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetDeviceRegProp, NDR_IN, r2);
235 : }
236 0 : r2->out.result = _PNP_SetDeviceRegProp(p, r2);
237 0 : break;
238 : }
239 0 : case 15: { /* PNP_GetClassInstance */
240 0 : struct PNP_GetClassInstance *r2 = (struct PNP_GetClassInstance *)r;
241 0 : if (DEBUGLEVEL >= 10) {
242 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassInstance, NDR_IN, r2);
243 : }
244 0 : r2->out.result = _PNP_GetClassInstance(p, r2);
245 0 : break;
246 : }
247 0 : case 16: { /* PNP_CreateKey */
248 0 : struct PNP_CreateKey *r2 = (struct PNP_CreateKey *)r;
249 0 : if (DEBUGLEVEL >= 10) {
250 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_CreateKey, NDR_IN, r2);
251 : }
252 0 : r2->out.result = _PNP_CreateKey(p, r2);
253 0 : break;
254 : }
255 0 : case 17: { /* PNP_DeleteRegistryKey */
256 0 : struct PNP_DeleteRegistryKey *r2 = (struct PNP_DeleteRegistryKey *)r;
257 0 : if (DEBUGLEVEL >= 10) {
258 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DeleteRegistryKey, NDR_IN, r2);
259 : }
260 0 : r2->out.result = _PNP_DeleteRegistryKey(p, r2);
261 0 : break;
262 : }
263 0 : case 18: { /* PNP_GetClassCount */
264 0 : struct PNP_GetClassCount *r2 = (struct PNP_GetClassCount *)r;
265 0 : if (DEBUGLEVEL >= 10) {
266 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassCount, NDR_IN, r2);
267 : }
268 0 : r2->out.result = _PNP_GetClassCount(p, r2);
269 0 : break;
270 : }
271 0 : case 19: { /* PNP_GetClassName */
272 0 : struct PNP_GetClassName *r2 = (struct PNP_GetClassName *)r;
273 0 : if (DEBUGLEVEL >= 10) {
274 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassName, NDR_IN, r2);
275 : }
276 0 : r2->out.result = _PNP_GetClassName(p, r2);
277 0 : break;
278 : }
279 0 : case 20: { /* PNP_DeleteClassKey */
280 0 : struct PNP_DeleteClassKey *r2 = (struct PNP_DeleteClassKey *)r;
281 0 : if (DEBUGLEVEL >= 10) {
282 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DeleteClassKey, NDR_IN, r2);
283 : }
284 0 : r2->out.result = _PNP_DeleteClassKey(p, r2);
285 0 : break;
286 : }
287 0 : case 21: { /* PNP_GetInterfaceDeviceAlias */
288 0 : struct PNP_GetInterfaceDeviceAlias *r2 = (struct PNP_GetInterfaceDeviceAlias *)r;
289 0 : if (DEBUGLEVEL >= 10) {
290 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetInterfaceDeviceAlias, NDR_IN, r2);
291 : }
292 0 : r2->out.result = _PNP_GetInterfaceDeviceAlias(p, r2);
293 0 : break;
294 : }
295 0 : case 22: { /* PNP_GetInterfaceDeviceList */
296 0 : struct PNP_GetInterfaceDeviceList *r2 = (struct PNP_GetInterfaceDeviceList *)r;
297 0 : if (DEBUGLEVEL >= 10) {
298 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetInterfaceDeviceList, NDR_IN, r2);
299 : }
300 0 : r2->out.result = _PNP_GetInterfaceDeviceList(p, r2);
301 0 : break;
302 : }
303 0 : case 23: { /* PNP_GetInterfaceDeviceListSize */
304 0 : struct PNP_GetInterfaceDeviceListSize *r2 = (struct PNP_GetInterfaceDeviceListSize *)r;
305 0 : if (DEBUGLEVEL >= 10) {
306 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetInterfaceDeviceListSize, NDR_IN, r2);
307 : }
308 0 : r2->out.result = _PNP_GetInterfaceDeviceListSize(p, r2);
309 0 : break;
310 : }
311 0 : case 24: { /* PNP_RegisterDeviceClassAssociation */
312 0 : struct PNP_RegisterDeviceClassAssociation *r2 = (struct PNP_RegisterDeviceClassAssociation *)r;
313 0 : if (DEBUGLEVEL >= 10) {
314 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RegisterDeviceClassAssociation, NDR_IN, r2);
315 : }
316 0 : r2->out.result = _PNP_RegisterDeviceClassAssociation(p, r2);
317 0 : break;
318 : }
319 0 : case 25: { /* PNP_UnregisterDeviceClassAssociation */
320 0 : struct PNP_UnregisterDeviceClassAssociation *r2 = (struct PNP_UnregisterDeviceClassAssociation *)r;
321 0 : if (DEBUGLEVEL >= 10) {
322 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_UnregisterDeviceClassAssociation, NDR_IN, r2);
323 : }
324 0 : r2->out.result = _PNP_UnregisterDeviceClassAssociation(p, r2);
325 0 : break;
326 : }
327 0 : case 26: { /* PNP_GetClassRegProp */
328 0 : struct PNP_GetClassRegProp *r2 = (struct PNP_GetClassRegProp *)r;
329 0 : if (DEBUGLEVEL >= 10) {
330 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassRegProp, NDR_IN, r2);
331 : }
332 0 : r2->out.result = _PNP_GetClassRegProp(p, r2);
333 0 : break;
334 : }
335 0 : case 27: { /* PNP_SetClassRegProp */
336 0 : struct PNP_SetClassRegProp *r2 = (struct PNP_SetClassRegProp *)r;
337 0 : if (DEBUGLEVEL >= 10) {
338 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetClassRegProp, NDR_IN, r2);
339 : }
340 0 : r2->out.result = _PNP_SetClassRegProp(p, r2);
341 0 : break;
342 : }
343 0 : case 28: { /* PNP_CreateDevInst */
344 0 : struct PNP_CreateDevInst *r2 = (struct PNP_CreateDevInst *)r;
345 0 : if (DEBUGLEVEL >= 10) {
346 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_CreateDevInst, NDR_IN, r2);
347 : }
348 0 : r2->out.result = _PNP_CreateDevInst(p, r2);
349 0 : break;
350 : }
351 0 : case 29: { /* PNP_DeviceInstanceAction */
352 0 : struct PNP_DeviceInstanceAction *r2 = (struct PNP_DeviceInstanceAction *)r;
353 0 : if (DEBUGLEVEL >= 10) {
354 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DeviceInstanceAction, NDR_IN, r2);
355 : }
356 0 : r2->out.result = _PNP_DeviceInstanceAction(p, r2);
357 0 : break;
358 : }
359 0 : case 30: { /* PNP_GetDeviceStatus */
360 0 : struct PNP_GetDeviceStatus *r2 = (struct PNP_GetDeviceStatus *)r;
361 0 : if (DEBUGLEVEL >= 10) {
362 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceStatus, NDR_IN, r2);
363 : }
364 0 : r2->out.result = _PNP_GetDeviceStatus(p, r2);
365 0 : break;
366 : }
367 0 : case 31: { /* PNP_SetDeviceProblem */
368 0 : struct PNP_SetDeviceProblem *r2 = (struct PNP_SetDeviceProblem *)r;
369 0 : if (DEBUGLEVEL >= 10) {
370 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetDeviceProblem, NDR_IN, r2);
371 : }
372 0 : r2->out.result = _PNP_SetDeviceProblem(p, r2);
373 0 : break;
374 : }
375 0 : case 32: { /* PNP_DisableDevInst */
376 0 : struct PNP_DisableDevInst *r2 = (struct PNP_DisableDevInst *)r;
377 0 : if (DEBUGLEVEL >= 10) {
378 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DisableDevInst, NDR_IN, r2);
379 : }
380 0 : r2->out.result = _PNP_DisableDevInst(p, r2);
381 0 : break;
382 : }
383 0 : case 33: { /* PNP_UninstallDevInst */
384 0 : struct PNP_UninstallDevInst *r2 = (struct PNP_UninstallDevInst *)r;
385 0 : if (DEBUGLEVEL >= 10) {
386 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_UninstallDevInst, NDR_IN, r2);
387 : }
388 0 : r2->out.result = _PNP_UninstallDevInst(p, r2);
389 0 : break;
390 : }
391 0 : case 34: { /* PNP_AddID */
392 0 : struct PNP_AddID *r2 = (struct PNP_AddID *)r;
393 0 : if (DEBUGLEVEL >= 10) {
394 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_AddID, NDR_IN, r2);
395 : }
396 0 : r2->out.result = _PNP_AddID(p, r2);
397 0 : break;
398 : }
399 0 : case 35: { /* PNP_RegisterDriver */
400 0 : struct PNP_RegisterDriver *r2 = (struct PNP_RegisterDriver *)r;
401 0 : if (DEBUGLEVEL >= 10) {
402 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RegisterDriver, NDR_IN, r2);
403 : }
404 0 : r2->out.result = _PNP_RegisterDriver(p, r2);
405 0 : break;
406 : }
407 0 : case 36: { /* PNP_QueryRemove */
408 0 : struct PNP_QueryRemove *r2 = (struct PNP_QueryRemove *)r;
409 0 : if (DEBUGLEVEL >= 10) {
410 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryRemove, NDR_IN, r2);
411 : }
412 0 : r2->out.result = _PNP_QueryRemove(p, r2);
413 0 : break;
414 : }
415 0 : case 37: { /* PNP_RequestDeviceEject */
416 0 : struct PNP_RequestDeviceEject *r2 = (struct PNP_RequestDeviceEject *)r;
417 0 : if (DEBUGLEVEL >= 10) {
418 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RequestDeviceEject, NDR_IN, r2);
419 : }
420 0 : r2->out.result = _PNP_RequestDeviceEject(p, r2);
421 0 : break;
422 : }
423 0 : case 38: { /* PNP_IsDockStationPresent */
424 0 : struct PNP_IsDockStationPresent *r2 = (struct PNP_IsDockStationPresent *)r;
425 0 : if (DEBUGLEVEL >= 10) {
426 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_IsDockStationPresent, NDR_IN, r2);
427 : }
428 0 : r2->out.result = _PNP_IsDockStationPresent(p, r2);
429 0 : break;
430 : }
431 0 : case 39: { /* PNP_RequestEjectPC */
432 0 : struct PNP_RequestEjectPC *r2 = (struct PNP_RequestEjectPC *)r;
433 0 : if (DEBUGLEVEL >= 10) {
434 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RequestEjectPC, NDR_IN, r2);
435 : }
436 0 : r2->out.result = _PNP_RequestEjectPC(p, r2);
437 0 : break;
438 : }
439 0 : case 40: { /* PNP_HwProfFlags */
440 0 : struct PNP_HwProfFlags *r2 = (struct PNP_HwProfFlags *)r;
441 0 : if (DEBUGLEVEL >= 10) {
442 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_HwProfFlags, NDR_IN, r2);
443 : }
444 0 : NDR_ZERO_STRUCT(r2->out);
445 0 : r2->out.profile_flags = r2->in.profile_flags;
446 0 : r2->out.veto_type = r2->in.veto_type;
447 0 : r2->out.unknown5a = talloc_zero(r2, const char *);
448 0 : if (r2->out.unknown5a == NULL) {
449 0 : status = NT_STATUS_NO_MEMORY;
450 0 : p->fault_state = DCERPC_FAULT_CANT_PERFORM;
451 0 : goto fail;
452 : }
453 :
454 0 : r2->out.result = _PNP_HwProfFlags(p, r2);
455 0 : break;
456 : }
457 0 : case 41: { /* PNP_GetHwProfInfo */
458 0 : struct PNP_GetHwProfInfo *r2 = (struct PNP_GetHwProfInfo *)r;
459 0 : if (DEBUGLEVEL >= 10) {
460 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetHwProfInfo, NDR_IN, r2);
461 : }
462 0 : NDR_ZERO_STRUCT(r2->out);
463 0 : r2->out.info = r2->in.info;
464 0 : r2->out.result = _PNP_GetHwProfInfo(p, r2);
465 0 : break;
466 : }
467 0 : case 42: { /* PNP_AddEmptyLogConf */
468 0 : struct PNP_AddEmptyLogConf *r2 = (struct PNP_AddEmptyLogConf *)r;
469 0 : if (DEBUGLEVEL >= 10) {
470 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_AddEmptyLogConf, NDR_IN, r2);
471 : }
472 0 : r2->out.result = _PNP_AddEmptyLogConf(p, r2);
473 0 : break;
474 : }
475 0 : case 43: { /* PNP_FreeLogConf */
476 0 : struct PNP_FreeLogConf *r2 = (struct PNP_FreeLogConf *)r;
477 0 : if (DEBUGLEVEL >= 10) {
478 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_FreeLogConf, NDR_IN, r2);
479 : }
480 0 : r2->out.result = _PNP_FreeLogConf(p, r2);
481 0 : break;
482 : }
483 0 : case 44: { /* PNP_GetFirstLogConf */
484 0 : struct PNP_GetFirstLogConf *r2 = (struct PNP_GetFirstLogConf *)r;
485 0 : if (DEBUGLEVEL >= 10) {
486 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetFirstLogConf, NDR_IN, r2);
487 : }
488 0 : r2->out.result = _PNP_GetFirstLogConf(p, r2);
489 0 : break;
490 : }
491 0 : case 45: { /* PNP_GetNextLogConf */
492 0 : struct PNP_GetNextLogConf *r2 = (struct PNP_GetNextLogConf *)r;
493 0 : if (DEBUGLEVEL >= 10) {
494 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetNextLogConf, NDR_IN, r2);
495 : }
496 0 : r2->out.result = _PNP_GetNextLogConf(p, r2);
497 0 : break;
498 : }
499 0 : case 46: { /* PNP_GetLogConfPriority */
500 0 : struct PNP_GetLogConfPriority *r2 = (struct PNP_GetLogConfPriority *)r;
501 0 : if (DEBUGLEVEL >= 10) {
502 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetLogConfPriority, NDR_IN, r2);
503 : }
504 0 : r2->out.result = _PNP_GetLogConfPriority(p, r2);
505 0 : break;
506 : }
507 0 : case 47: { /* PNP_AddResDes */
508 0 : struct PNP_AddResDes *r2 = (struct PNP_AddResDes *)r;
509 0 : if (DEBUGLEVEL >= 10) {
510 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_AddResDes, NDR_IN, r2);
511 : }
512 0 : r2->out.result = _PNP_AddResDes(p, r2);
513 0 : break;
514 : }
515 0 : case 48: { /* PNP_FreeResDes */
516 0 : struct PNP_FreeResDes *r2 = (struct PNP_FreeResDes *)r;
517 0 : if (DEBUGLEVEL >= 10) {
518 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_FreeResDes, NDR_IN, r2);
519 : }
520 0 : r2->out.result = _PNP_FreeResDes(p, r2);
521 0 : break;
522 : }
523 0 : case 49: { /* PNP_GetNextResDes */
524 0 : struct PNP_GetNextResDes *r2 = (struct PNP_GetNextResDes *)r;
525 0 : if (DEBUGLEVEL >= 10) {
526 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetNextResDes, NDR_IN, r2);
527 : }
528 0 : r2->out.result = _PNP_GetNextResDes(p, r2);
529 0 : break;
530 : }
531 0 : case 50: { /* PNP_GetResDesData */
532 0 : struct PNP_GetResDesData *r2 = (struct PNP_GetResDesData *)r;
533 0 : if (DEBUGLEVEL >= 10) {
534 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetResDesData, NDR_IN, r2);
535 : }
536 0 : r2->out.result = _PNP_GetResDesData(p, r2);
537 0 : break;
538 : }
539 0 : case 51: { /* PNP_GetResDesDataSize */
540 0 : struct PNP_GetResDesDataSize *r2 = (struct PNP_GetResDesDataSize *)r;
541 0 : if (DEBUGLEVEL >= 10) {
542 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetResDesDataSize, NDR_IN, r2);
543 : }
544 0 : r2->out.result = _PNP_GetResDesDataSize(p, r2);
545 0 : break;
546 : }
547 0 : case 52: { /* PNP_ModifyResDes */
548 0 : struct PNP_ModifyResDes *r2 = (struct PNP_ModifyResDes *)r;
549 0 : if (DEBUGLEVEL >= 10) {
550 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_ModifyResDes, NDR_IN, r2);
551 : }
552 0 : r2->out.result = _PNP_ModifyResDes(p, r2);
553 0 : break;
554 : }
555 0 : case 53: { /* PNP_DetectResourceLimit */
556 0 : struct PNP_DetectResourceLimit *r2 = (struct PNP_DetectResourceLimit *)r;
557 0 : if (DEBUGLEVEL >= 10) {
558 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DetectResourceLimit, NDR_IN, r2);
559 : }
560 0 : r2->out.result = _PNP_DetectResourceLimit(p, r2);
561 0 : break;
562 : }
563 0 : case 54: { /* PNP_QueryResConfList */
564 0 : struct PNP_QueryResConfList *r2 = (struct PNP_QueryResConfList *)r;
565 0 : if (DEBUGLEVEL >= 10) {
566 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryResConfList, NDR_IN, r2);
567 : }
568 0 : r2->out.result = _PNP_QueryResConfList(p, r2);
569 0 : break;
570 : }
571 0 : case 55: { /* PNP_SetHwProf */
572 0 : struct PNP_SetHwProf *r2 = (struct PNP_SetHwProf *)r;
573 0 : if (DEBUGLEVEL >= 10) {
574 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetHwProf, NDR_IN, r2);
575 : }
576 0 : r2->out.result = _PNP_SetHwProf(p, r2);
577 0 : break;
578 : }
579 0 : case 56: { /* PNP_QueryArbitratorFreeData */
580 0 : struct PNP_QueryArbitratorFreeData *r2 = (struct PNP_QueryArbitratorFreeData *)r;
581 0 : if (DEBUGLEVEL >= 10) {
582 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryArbitratorFreeData, NDR_IN, r2);
583 : }
584 0 : r2->out.result = _PNP_QueryArbitratorFreeData(p, r2);
585 0 : break;
586 : }
587 0 : case 57: { /* PNP_QueryArbitratorFreeSize */
588 0 : struct PNP_QueryArbitratorFreeSize *r2 = (struct PNP_QueryArbitratorFreeSize *)r;
589 0 : if (DEBUGLEVEL >= 10) {
590 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryArbitratorFreeSize, NDR_IN, r2);
591 : }
592 0 : r2->out.result = _PNP_QueryArbitratorFreeSize(p, r2);
593 0 : break;
594 : }
595 0 : case 58: { /* PNP_RunDetection */
596 0 : struct PNP_RunDetection *r2 = (struct PNP_RunDetection *)r;
597 0 : if (DEBUGLEVEL >= 10) {
598 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RunDetection, NDR_IN, r2);
599 : }
600 0 : r2->out.result = _PNP_RunDetection(p, r2);
601 0 : break;
602 : }
603 0 : case 59: { /* PNP_RegisterNotification */
604 0 : struct PNP_RegisterNotification *r2 = (struct PNP_RegisterNotification *)r;
605 0 : if (DEBUGLEVEL >= 10) {
606 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RegisterNotification, NDR_IN, r2);
607 : }
608 0 : r2->out.result = _PNP_RegisterNotification(p, r2);
609 0 : break;
610 : }
611 0 : case 60: { /* PNP_UnregisterNotification */
612 0 : struct PNP_UnregisterNotification *r2 = (struct PNP_UnregisterNotification *)r;
613 0 : if (DEBUGLEVEL >= 10) {
614 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_UnregisterNotification, NDR_IN, r2);
615 : }
616 0 : r2->out.result = _PNP_UnregisterNotification(p, r2);
617 0 : break;
618 : }
619 0 : case 61: { /* PNP_GetCustomDevProp */
620 0 : struct PNP_GetCustomDevProp *r2 = (struct PNP_GetCustomDevProp *)r;
621 0 : if (DEBUGLEVEL >= 10) {
622 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetCustomDevProp, NDR_IN, r2);
623 : }
624 0 : r2->out.result = _PNP_GetCustomDevProp(p, r2);
625 0 : break;
626 : }
627 0 : case 62: { /* PNP_GetVersionInternal */
628 0 : struct PNP_GetVersionInternal *r2 = (struct PNP_GetVersionInternal *)r;
629 0 : if (DEBUGLEVEL >= 10) {
630 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetVersionInternal, NDR_IN, r2);
631 : }
632 0 : r2->out.result = _PNP_GetVersionInternal(p, r2);
633 0 : break;
634 : }
635 0 : case 63: { /* PNP_GetBlockedDriverInfo */
636 0 : struct PNP_GetBlockedDriverInfo *r2 = (struct PNP_GetBlockedDriverInfo *)r;
637 0 : if (DEBUGLEVEL >= 10) {
638 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetBlockedDriverInfo, NDR_IN, r2);
639 : }
640 0 : r2->out.result = _PNP_GetBlockedDriverInfo(p, r2);
641 0 : break;
642 : }
643 0 : case 64: { /* PNP_GetServerSideDeviceInstallFlags */
644 0 : struct PNP_GetServerSideDeviceInstallFlags *r2 = (struct PNP_GetServerSideDeviceInstallFlags *)r;
645 0 : if (DEBUGLEVEL >= 10) {
646 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetServerSideDeviceInstallFlags, NDR_IN, r2);
647 : }
648 0 : r2->out.result = _PNP_GetServerSideDeviceInstallFlags(p, r2);
649 0 : break;
650 : }
651 0 : default:
652 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
653 0 : break;
654 : }
655 :
656 32 : fail:
657 : /* Unimpersonate */
658 32 : if (impersonated) {
659 32 : unbecome_authenticated_pipe_user();
660 : }
661 :
662 32 : p->dce_call = NULL;
663 32 : p->mem_ctx = NULL;
664 : /* Check pipes struct fault state */
665 32 : if (p->fault_state != 0) {
666 0 : dce_call->fault_code = p->fault_state;
667 : }
668 32 : if (dce_call->fault_code != 0) {
669 0 : status = NT_STATUS_NET_WRITE_FAULT;
670 : }
671 :
672 32 : return status;
673 : }
674 :
675 32 : NTSTATUS ntsvcs__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
676 : {
677 32 : return ntsvcs__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_EXTERNAL);
678 : }
679 :
680 32 : NTSTATUS ntsvcs__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
681 : {
682 32 : uint16_t opnum = dce_call->pkt.u.request.opnum;
683 :
684 32 : switch (opnum) {
685 0 : case 0: { /* PNP_Disconnect */
686 0 : struct PNP_Disconnect *r2 = (struct PNP_Disconnect *)r;
687 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
688 0 : DEBUG(5,("function PNP_Disconnect replied async\n"));
689 : }
690 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
691 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_Disconnect, NDR_OUT | NDR_SET_VALUES, r2);
692 : }
693 0 : if (dce_call->fault_code != 0) {
694 0 : DBG_WARNING("dcerpc_fault %s in PNP_Disconnect\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
695 : }
696 0 : break;
697 : }
698 0 : case 1: { /* PNP_Connect */
699 0 : struct PNP_Connect *r2 = (struct PNP_Connect *)r;
700 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
701 0 : DEBUG(5,("function PNP_Connect replied async\n"));
702 : }
703 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
704 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_Connect, NDR_OUT | NDR_SET_VALUES, r2);
705 : }
706 0 : if (dce_call->fault_code != 0) {
707 0 : DBG_WARNING("dcerpc_fault %s in PNP_Connect\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
708 : }
709 0 : break;
710 : }
711 4 : case 2: { /* PNP_GetVersion */
712 4 : struct PNP_GetVersion *r2 = (struct PNP_GetVersion *)r;
713 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
714 0 : DEBUG(5,("function PNP_GetVersion replied async\n"));
715 : }
716 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
717 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetVersion, NDR_OUT | NDR_SET_VALUES, r2);
718 : }
719 4 : if (dce_call->fault_code != 0) {
720 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetVersion\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
721 : }
722 4 : break;
723 : }
724 0 : case 3: { /* PNP_GetGlobalState */
725 0 : struct PNP_GetGlobalState *r2 = (struct PNP_GetGlobalState *)r;
726 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
727 0 : DEBUG(5,("function PNP_GetGlobalState replied async\n"));
728 : }
729 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
730 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetGlobalState, NDR_OUT | NDR_SET_VALUES, r2);
731 : }
732 0 : if (dce_call->fault_code != 0) {
733 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetGlobalState\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
734 : }
735 0 : break;
736 : }
737 0 : case 4: { /* PNP_InitDetection */
738 0 : struct PNP_InitDetection *r2 = (struct PNP_InitDetection *)r;
739 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
740 0 : DEBUG(5,("function PNP_InitDetection replied async\n"));
741 : }
742 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
743 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_InitDetection, NDR_OUT | NDR_SET_VALUES, r2);
744 : }
745 0 : if (dce_call->fault_code != 0) {
746 0 : DBG_WARNING("dcerpc_fault %s in PNP_InitDetection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
747 : }
748 0 : break;
749 : }
750 0 : case 5: { /* PNP_ReportLogOn */
751 0 : struct PNP_ReportLogOn *r2 = (struct PNP_ReportLogOn *)r;
752 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
753 0 : DEBUG(5,("function PNP_ReportLogOn replied async\n"));
754 : }
755 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
756 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_ReportLogOn, NDR_OUT | NDR_SET_VALUES, r2);
757 : }
758 0 : if (dce_call->fault_code != 0) {
759 0 : DBG_WARNING("dcerpc_fault %s in PNP_ReportLogOn\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
760 : }
761 0 : break;
762 : }
763 0 : case 6: { /* PNP_ValidateDeviceInstance */
764 0 : struct PNP_ValidateDeviceInstance *r2 = (struct PNP_ValidateDeviceInstance *)r;
765 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
766 0 : DEBUG(5,("function PNP_ValidateDeviceInstance replied async\n"));
767 : }
768 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
769 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_ValidateDeviceInstance, NDR_OUT | NDR_SET_VALUES, r2);
770 : }
771 0 : if (dce_call->fault_code != 0) {
772 0 : DBG_WARNING("dcerpc_fault %s in PNP_ValidateDeviceInstance\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
773 : }
774 0 : break;
775 : }
776 0 : case 7: { /* PNP_GetRootDeviceInstance */
777 0 : struct PNP_GetRootDeviceInstance *r2 = (struct PNP_GetRootDeviceInstance *)r;
778 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
779 0 : DEBUG(5,("function PNP_GetRootDeviceInstance replied async\n"));
780 : }
781 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
782 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetRootDeviceInstance, NDR_OUT | NDR_SET_VALUES, r2);
783 : }
784 0 : if (dce_call->fault_code != 0) {
785 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetRootDeviceInstance\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
786 : }
787 0 : break;
788 : }
789 0 : case 8: { /* PNP_GetRelatedDeviceInstance */
790 0 : struct PNP_GetRelatedDeviceInstance *r2 = (struct PNP_GetRelatedDeviceInstance *)r;
791 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
792 0 : DEBUG(5,("function PNP_GetRelatedDeviceInstance replied async\n"));
793 : }
794 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
795 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetRelatedDeviceInstance, NDR_OUT | NDR_SET_VALUES, r2);
796 : }
797 0 : if (dce_call->fault_code != 0) {
798 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetRelatedDeviceInstance\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
799 : }
800 0 : break;
801 : }
802 0 : case 9: { /* PNP_EnumerateSubKeys */
803 0 : struct PNP_EnumerateSubKeys *r2 = (struct PNP_EnumerateSubKeys *)r;
804 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
805 0 : DEBUG(5,("function PNP_EnumerateSubKeys replied async\n"));
806 : }
807 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
808 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_EnumerateSubKeys, NDR_OUT | NDR_SET_VALUES, r2);
809 : }
810 0 : if (dce_call->fault_code != 0) {
811 0 : DBG_WARNING("dcerpc_fault %s in PNP_EnumerateSubKeys\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
812 : }
813 0 : break;
814 : }
815 12 : case 10: { /* PNP_GetDeviceList */
816 12 : struct PNP_GetDeviceList *r2 = (struct PNP_GetDeviceList *)r;
817 12 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
818 0 : DEBUG(5,("function PNP_GetDeviceList replied async\n"));
819 : }
820 12 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
821 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceList, NDR_OUT | NDR_SET_VALUES, r2);
822 : }
823 12 : if (dce_call->fault_code != 0) {
824 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetDeviceList\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
825 : }
826 12 : break;
827 : }
828 12 : case 11: { /* PNP_GetDeviceListSize */
829 12 : struct PNP_GetDeviceListSize *r2 = (struct PNP_GetDeviceListSize *)r;
830 12 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
831 0 : DEBUG(5,("function PNP_GetDeviceListSize replied async\n"));
832 : }
833 12 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
834 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceListSize, NDR_OUT | NDR_SET_VALUES, r2);
835 : }
836 12 : if (dce_call->fault_code != 0) {
837 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetDeviceListSize\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
838 : }
839 12 : break;
840 : }
841 0 : case 12: { /* PNP_GetDepth */
842 0 : struct PNP_GetDepth *r2 = (struct PNP_GetDepth *)r;
843 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
844 0 : DEBUG(5,("function PNP_GetDepth replied async\n"));
845 : }
846 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
847 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDepth, NDR_OUT | NDR_SET_VALUES, r2);
848 : }
849 0 : if (dce_call->fault_code != 0) {
850 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetDepth\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
851 : }
852 0 : break;
853 : }
854 4 : case 13: { /* PNP_GetDeviceRegProp */
855 4 : struct PNP_GetDeviceRegProp *r2 = (struct PNP_GetDeviceRegProp *)r;
856 4 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
857 0 : DEBUG(5,("function PNP_GetDeviceRegProp replied async\n"));
858 : }
859 4 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
860 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceRegProp, NDR_OUT | NDR_SET_VALUES, r2);
861 : }
862 4 : if (dce_call->fault_code != 0) {
863 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetDeviceRegProp\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
864 : }
865 4 : break;
866 : }
867 0 : case 14: { /* PNP_SetDeviceRegProp */
868 0 : struct PNP_SetDeviceRegProp *r2 = (struct PNP_SetDeviceRegProp *)r;
869 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
870 0 : DEBUG(5,("function PNP_SetDeviceRegProp replied async\n"));
871 : }
872 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
873 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetDeviceRegProp, NDR_OUT | NDR_SET_VALUES, r2);
874 : }
875 0 : if (dce_call->fault_code != 0) {
876 0 : DBG_WARNING("dcerpc_fault %s in PNP_SetDeviceRegProp\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
877 : }
878 0 : break;
879 : }
880 0 : case 15: { /* PNP_GetClassInstance */
881 0 : struct PNP_GetClassInstance *r2 = (struct PNP_GetClassInstance *)r;
882 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
883 0 : DEBUG(5,("function PNP_GetClassInstance replied async\n"));
884 : }
885 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
886 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassInstance, NDR_OUT | NDR_SET_VALUES, r2);
887 : }
888 0 : if (dce_call->fault_code != 0) {
889 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetClassInstance\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
890 : }
891 0 : break;
892 : }
893 0 : case 16: { /* PNP_CreateKey */
894 0 : struct PNP_CreateKey *r2 = (struct PNP_CreateKey *)r;
895 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
896 0 : DEBUG(5,("function PNP_CreateKey replied async\n"));
897 : }
898 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
899 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_CreateKey, NDR_OUT | NDR_SET_VALUES, r2);
900 : }
901 0 : if (dce_call->fault_code != 0) {
902 0 : DBG_WARNING("dcerpc_fault %s in PNP_CreateKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
903 : }
904 0 : break;
905 : }
906 0 : case 17: { /* PNP_DeleteRegistryKey */
907 0 : struct PNP_DeleteRegistryKey *r2 = (struct PNP_DeleteRegistryKey *)r;
908 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
909 0 : DEBUG(5,("function PNP_DeleteRegistryKey replied async\n"));
910 : }
911 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
912 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DeleteRegistryKey, NDR_OUT | NDR_SET_VALUES, r2);
913 : }
914 0 : if (dce_call->fault_code != 0) {
915 0 : DBG_WARNING("dcerpc_fault %s in PNP_DeleteRegistryKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
916 : }
917 0 : break;
918 : }
919 0 : case 18: { /* PNP_GetClassCount */
920 0 : struct PNP_GetClassCount *r2 = (struct PNP_GetClassCount *)r;
921 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
922 0 : DEBUG(5,("function PNP_GetClassCount replied async\n"));
923 : }
924 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
925 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassCount, NDR_OUT | NDR_SET_VALUES, r2);
926 : }
927 0 : if (dce_call->fault_code != 0) {
928 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetClassCount\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
929 : }
930 0 : break;
931 : }
932 0 : case 19: { /* PNP_GetClassName */
933 0 : struct PNP_GetClassName *r2 = (struct PNP_GetClassName *)r;
934 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
935 0 : DEBUG(5,("function PNP_GetClassName replied async\n"));
936 : }
937 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
938 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassName, NDR_OUT | NDR_SET_VALUES, r2);
939 : }
940 0 : if (dce_call->fault_code != 0) {
941 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetClassName\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
942 : }
943 0 : break;
944 : }
945 0 : case 20: { /* PNP_DeleteClassKey */
946 0 : struct PNP_DeleteClassKey *r2 = (struct PNP_DeleteClassKey *)r;
947 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
948 0 : DEBUG(5,("function PNP_DeleteClassKey replied async\n"));
949 : }
950 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
951 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DeleteClassKey, NDR_OUT | NDR_SET_VALUES, r2);
952 : }
953 0 : if (dce_call->fault_code != 0) {
954 0 : DBG_WARNING("dcerpc_fault %s in PNP_DeleteClassKey\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
955 : }
956 0 : break;
957 : }
958 0 : case 21: { /* PNP_GetInterfaceDeviceAlias */
959 0 : struct PNP_GetInterfaceDeviceAlias *r2 = (struct PNP_GetInterfaceDeviceAlias *)r;
960 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
961 0 : DEBUG(5,("function PNP_GetInterfaceDeviceAlias replied async\n"));
962 : }
963 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
964 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetInterfaceDeviceAlias, NDR_OUT | NDR_SET_VALUES, r2);
965 : }
966 0 : if (dce_call->fault_code != 0) {
967 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetInterfaceDeviceAlias\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
968 : }
969 0 : break;
970 : }
971 0 : case 22: { /* PNP_GetInterfaceDeviceList */
972 0 : struct PNP_GetInterfaceDeviceList *r2 = (struct PNP_GetInterfaceDeviceList *)r;
973 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
974 0 : DEBUG(5,("function PNP_GetInterfaceDeviceList replied async\n"));
975 : }
976 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
977 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetInterfaceDeviceList, NDR_OUT | NDR_SET_VALUES, r2);
978 : }
979 0 : if (dce_call->fault_code != 0) {
980 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetInterfaceDeviceList\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
981 : }
982 0 : break;
983 : }
984 0 : case 23: { /* PNP_GetInterfaceDeviceListSize */
985 0 : struct PNP_GetInterfaceDeviceListSize *r2 = (struct PNP_GetInterfaceDeviceListSize *)r;
986 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
987 0 : DEBUG(5,("function PNP_GetInterfaceDeviceListSize replied async\n"));
988 : }
989 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
990 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetInterfaceDeviceListSize, NDR_OUT | NDR_SET_VALUES, r2);
991 : }
992 0 : if (dce_call->fault_code != 0) {
993 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetInterfaceDeviceListSize\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
994 : }
995 0 : break;
996 : }
997 0 : case 24: { /* PNP_RegisterDeviceClassAssociation */
998 0 : struct PNP_RegisterDeviceClassAssociation *r2 = (struct PNP_RegisterDeviceClassAssociation *)r;
999 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1000 0 : DEBUG(5,("function PNP_RegisterDeviceClassAssociation replied async\n"));
1001 : }
1002 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1003 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RegisterDeviceClassAssociation, NDR_OUT | NDR_SET_VALUES, r2);
1004 : }
1005 0 : if (dce_call->fault_code != 0) {
1006 0 : DBG_WARNING("dcerpc_fault %s in PNP_RegisterDeviceClassAssociation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1007 : }
1008 0 : break;
1009 : }
1010 0 : case 25: { /* PNP_UnregisterDeviceClassAssociation */
1011 0 : struct PNP_UnregisterDeviceClassAssociation *r2 = (struct PNP_UnregisterDeviceClassAssociation *)r;
1012 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1013 0 : DEBUG(5,("function PNP_UnregisterDeviceClassAssociation replied async\n"));
1014 : }
1015 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1016 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_UnregisterDeviceClassAssociation, NDR_OUT | NDR_SET_VALUES, r2);
1017 : }
1018 0 : if (dce_call->fault_code != 0) {
1019 0 : DBG_WARNING("dcerpc_fault %s in PNP_UnregisterDeviceClassAssociation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1020 : }
1021 0 : break;
1022 : }
1023 0 : case 26: { /* PNP_GetClassRegProp */
1024 0 : struct PNP_GetClassRegProp *r2 = (struct PNP_GetClassRegProp *)r;
1025 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1026 0 : DEBUG(5,("function PNP_GetClassRegProp replied async\n"));
1027 : }
1028 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1029 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetClassRegProp, NDR_OUT | NDR_SET_VALUES, r2);
1030 : }
1031 0 : if (dce_call->fault_code != 0) {
1032 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetClassRegProp\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1033 : }
1034 0 : break;
1035 : }
1036 0 : case 27: { /* PNP_SetClassRegProp */
1037 0 : struct PNP_SetClassRegProp *r2 = (struct PNP_SetClassRegProp *)r;
1038 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1039 0 : DEBUG(5,("function PNP_SetClassRegProp replied async\n"));
1040 : }
1041 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1042 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetClassRegProp, NDR_OUT | NDR_SET_VALUES, r2);
1043 : }
1044 0 : if (dce_call->fault_code != 0) {
1045 0 : DBG_WARNING("dcerpc_fault %s in PNP_SetClassRegProp\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1046 : }
1047 0 : break;
1048 : }
1049 0 : case 28: { /* PNP_CreateDevInst */
1050 0 : struct PNP_CreateDevInst *r2 = (struct PNP_CreateDevInst *)r;
1051 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1052 0 : DEBUG(5,("function PNP_CreateDevInst replied async\n"));
1053 : }
1054 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1055 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_CreateDevInst, NDR_OUT | NDR_SET_VALUES, r2);
1056 : }
1057 0 : if (dce_call->fault_code != 0) {
1058 0 : DBG_WARNING("dcerpc_fault %s in PNP_CreateDevInst\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1059 : }
1060 0 : break;
1061 : }
1062 0 : case 29: { /* PNP_DeviceInstanceAction */
1063 0 : struct PNP_DeviceInstanceAction *r2 = (struct PNP_DeviceInstanceAction *)r;
1064 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1065 0 : DEBUG(5,("function PNP_DeviceInstanceAction replied async\n"));
1066 : }
1067 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1068 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DeviceInstanceAction, NDR_OUT | NDR_SET_VALUES, r2);
1069 : }
1070 0 : if (dce_call->fault_code != 0) {
1071 0 : DBG_WARNING("dcerpc_fault %s in PNP_DeviceInstanceAction\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1072 : }
1073 0 : break;
1074 : }
1075 0 : case 30: { /* PNP_GetDeviceStatus */
1076 0 : struct PNP_GetDeviceStatus *r2 = (struct PNP_GetDeviceStatus *)r;
1077 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1078 0 : DEBUG(5,("function PNP_GetDeviceStatus replied async\n"));
1079 : }
1080 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1081 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetDeviceStatus, NDR_OUT | NDR_SET_VALUES, r2);
1082 : }
1083 0 : if (dce_call->fault_code != 0) {
1084 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetDeviceStatus\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1085 : }
1086 0 : break;
1087 : }
1088 0 : case 31: { /* PNP_SetDeviceProblem */
1089 0 : struct PNP_SetDeviceProblem *r2 = (struct PNP_SetDeviceProblem *)r;
1090 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1091 0 : DEBUG(5,("function PNP_SetDeviceProblem replied async\n"));
1092 : }
1093 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1094 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetDeviceProblem, NDR_OUT | NDR_SET_VALUES, r2);
1095 : }
1096 0 : if (dce_call->fault_code != 0) {
1097 0 : DBG_WARNING("dcerpc_fault %s in PNP_SetDeviceProblem\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1098 : }
1099 0 : break;
1100 : }
1101 0 : case 32: { /* PNP_DisableDevInst */
1102 0 : struct PNP_DisableDevInst *r2 = (struct PNP_DisableDevInst *)r;
1103 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1104 0 : DEBUG(5,("function PNP_DisableDevInst replied async\n"));
1105 : }
1106 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1107 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DisableDevInst, NDR_OUT | NDR_SET_VALUES, r2);
1108 : }
1109 0 : if (dce_call->fault_code != 0) {
1110 0 : DBG_WARNING("dcerpc_fault %s in PNP_DisableDevInst\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1111 : }
1112 0 : break;
1113 : }
1114 0 : case 33: { /* PNP_UninstallDevInst */
1115 0 : struct PNP_UninstallDevInst *r2 = (struct PNP_UninstallDevInst *)r;
1116 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1117 0 : DEBUG(5,("function PNP_UninstallDevInst replied async\n"));
1118 : }
1119 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1120 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_UninstallDevInst, NDR_OUT | NDR_SET_VALUES, r2);
1121 : }
1122 0 : if (dce_call->fault_code != 0) {
1123 0 : DBG_WARNING("dcerpc_fault %s in PNP_UninstallDevInst\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1124 : }
1125 0 : break;
1126 : }
1127 0 : case 34: { /* PNP_AddID */
1128 0 : struct PNP_AddID *r2 = (struct PNP_AddID *)r;
1129 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1130 0 : DEBUG(5,("function PNP_AddID replied async\n"));
1131 : }
1132 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1133 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_AddID, NDR_OUT | NDR_SET_VALUES, r2);
1134 : }
1135 0 : if (dce_call->fault_code != 0) {
1136 0 : DBG_WARNING("dcerpc_fault %s in PNP_AddID\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1137 : }
1138 0 : break;
1139 : }
1140 0 : case 35: { /* PNP_RegisterDriver */
1141 0 : struct PNP_RegisterDriver *r2 = (struct PNP_RegisterDriver *)r;
1142 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1143 0 : DEBUG(5,("function PNP_RegisterDriver replied async\n"));
1144 : }
1145 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1146 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RegisterDriver, NDR_OUT | NDR_SET_VALUES, r2);
1147 : }
1148 0 : if (dce_call->fault_code != 0) {
1149 0 : DBG_WARNING("dcerpc_fault %s in PNP_RegisterDriver\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1150 : }
1151 0 : break;
1152 : }
1153 0 : case 36: { /* PNP_QueryRemove */
1154 0 : struct PNP_QueryRemove *r2 = (struct PNP_QueryRemove *)r;
1155 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1156 0 : DEBUG(5,("function PNP_QueryRemove replied async\n"));
1157 : }
1158 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1159 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryRemove, NDR_OUT | NDR_SET_VALUES, r2);
1160 : }
1161 0 : if (dce_call->fault_code != 0) {
1162 0 : DBG_WARNING("dcerpc_fault %s in PNP_QueryRemove\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1163 : }
1164 0 : break;
1165 : }
1166 0 : case 37: { /* PNP_RequestDeviceEject */
1167 0 : struct PNP_RequestDeviceEject *r2 = (struct PNP_RequestDeviceEject *)r;
1168 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1169 0 : DEBUG(5,("function PNP_RequestDeviceEject replied async\n"));
1170 : }
1171 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1172 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RequestDeviceEject, NDR_OUT | NDR_SET_VALUES, r2);
1173 : }
1174 0 : if (dce_call->fault_code != 0) {
1175 0 : DBG_WARNING("dcerpc_fault %s in PNP_RequestDeviceEject\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1176 : }
1177 0 : break;
1178 : }
1179 0 : case 38: { /* PNP_IsDockStationPresent */
1180 0 : struct PNP_IsDockStationPresent *r2 = (struct PNP_IsDockStationPresent *)r;
1181 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1182 0 : DEBUG(5,("function PNP_IsDockStationPresent replied async\n"));
1183 : }
1184 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1185 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_IsDockStationPresent, NDR_OUT | NDR_SET_VALUES, r2);
1186 : }
1187 0 : if (dce_call->fault_code != 0) {
1188 0 : DBG_WARNING("dcerpc_fault %s in PNP_IsDockStationPresent\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1189 : }
1190 0 : break;
1191 : }
1192 0 : case 39: { /* PNP_RequestEjectPC */
1193 0 : struct PNP_RequestEjectPC *r2 = (struct PNP_RequestEjectPC *)r;
1194 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1195 0 : DEBUG(5,("function PNP_RequestEjectPC replied async\n"));
1196 : }
1197 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1198 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RequestEjectPC, NDR_OUT | NDR_SET_VALUES, r2);
1199 : }
1200 0 : if (dce_call->fault_code != 0) {
1201 0 : DBG_WARNING("dcerpc_fault %s in PNP_RequestEjectPC\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1202 : }
1203 0 : break;
1204 : }
1205 0 : case 40: { /* PNP_HwProfFlags */
1206 0 : struct PNP_HwProfFlags *r2 = (struct PNP_HwProfFlags *)r;
1207 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1208 0 : DEBUG(5,("function PNP_HwProfFlags replied async\n"));
1209 : }
1210 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1211 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_HwProfFlags, NDR_OUT | NDR_SET_VALUES, r2);
1212 : }
1213 0 : if (dce_call->fault_code != 0) {
1214 0 : DBG_WARNING("dcerpc_fault %s in PNP_HwProfFlags\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1215 : }
1216 0 : break;
1217 : }
1218 0 : case 41: { /* PNP_GetHwProfInfo */
1219 0 : struct PNP_GetHwProfInfo *r2 = (struct PNP_GetHwProfInfo *)r;
1220 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1221 0 : DEBUG(5,("function PNP_GetHwProfInfo replied async\n"));
1222 : }
1223 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1224 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetHwProfInfo, NDR_OUT | NDR_SET_VALUES, r2);
1225 : }
1226 0 : if (dce_call->fault_code != 0) {
1227 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetHwProfInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1228 : }
1229 0 : break;
1230 : }
1231 0 : case 42: { /* PNP_AddEmptyLogConf */
1232 0 : struct PNP_AddEmptyLogConf *r2 = (struct PNP_AddEmptyLogConf *)r;
1233 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1234 0 : DEBUG(5,("function PNP_AddEmptyLogConf replied async\n"));
1235 : }
1236 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1237 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_AddEmptyLogConf, NDR_OUT | NDR_SET_VALUES, r2);
1238 : }
1239 0 : if (dce_call->fault_code != 0) {
1240 0 : DBG_WARNING("dcerpc_fault %s in PNP_AddEmptyLogConf\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1241 : }
1242 0 : break;
1243 : }
1244 0 : case 43: { /* PNP_FreeLogConf */
1245 0 : struct PNP_FreeLogConf *r2 = (struct PNP_FreeLogConf *)r;
1246 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1247 0 : DEBUG(5,("function PNP_FreeLogConf replied async\n"));
1248 : }
1249 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1250 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_FreeLogConf, NDR_OUT | NDR_SET_VALUES, r2);
1251 : }
1252 0 : if (dce_call->fault_code != 0) {
1253 0 : DBG_WARNING("dcerpc_fault %s in PNP_FreeLogConf\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1254 : }
1255 0 : break;
1256 : }
1257 0 : case 44: { /* PNP_GetFirstLogConf */
1258 0 : struct PNP_GetFirstLogConf *r2 = (struct PNP_GetFirstLogConf *)r;
1259 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1260 0 : DEBUG(5,("function PNP_GetFirstLogConf replied async\n"));
1261 : }
1262 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1263 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetFirstLogConf, NDR_OUT | NDR_SET_VALUES, r2);
1264 : }
1265 0 : if (dce_call->fault_code != 0) {
1266 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetFirstLogConf\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1267 : }
1268 0 : break;
1269 : }
1270 0 : case 45: { /* PNP_GetNextLogConf */
1271 0 : struct PNP_GetNextLogConf *r2 = (struct PNP_GetNextLogConf *)r;
1272 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1273 0 : DEBUG(5,("function PNP_GetNextLogConf replied async\n"));
1274 : }
1275 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1276 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetNextLogConf, NDR_OUT | NDR_SET_VALUES, r2);
1277 : }
1278 0 : if (dce_call->fault_code != 0) {
1279 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetNextLogConf\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1280 : }
1281 0 : break;
1282 : }
1283 0 : case 46: { /* PNP_GetLogConfPriority */
1284 0 : struct PNP_GetLogConfPriority *r2 = (struct PNP_GetLogConfPriority *)r;
1285 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1286 0 : DEBUG(5,("function PNP_GetLogConfPriority replied async\n"));
1287 : }
1288 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1289 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetLogConfPriority, NDR_OUT | NDR_SET_VALUES, r2);
1290 : }
1291 0 : if (dce_call->fault_code != 0) {
1292 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetLogConfPriority\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1293 : }
1294 0 : break;
1295 : }
1296 0 : case 47: { /* PNP_AddResDes */
1297 0 : struct PNP_AddResDes *r2 = (struct PNP_AddResDes *)r;
1298 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1299 0 : DEBUG(5,("function PNP_AddResDes replied async\n"));
1300 : }
1301 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1302 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_AddResDes, NDR_OUT | NDR_SET_VALUES, r2);
1303 : }
1304 0 : if (dce_call->fault_code != 0) {
1305 0 : DBG_WARNING("dcerpc_fault %s in PNP_AddResDes\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1306 : }
1307 0 : break;
1308 : }
1309 0 : case 48: { /* PNP_FreeResDes */
1310 0 : struct PNP_FreeResDes *r2 = (struct PNP_FreeResDes *)r;
1311 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1312 0 : DEBUG(5,("function PNP_FreeResDes replied async\n"));
1313 : }
1314 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1315 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_FreeResDes, NDR_OUT | NDR_SET_VALUES, r2);
1316 : }
1317 0 : if (dce_call->fault_code != 0) {
1318 0 : DBG_WARNING("dcerpc_fault %s in PNP_FreeResDes\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1319 : }
1320 0 : break;
1321 : }
1322 0 : case 49: { /* PNP_GetNextResDes */
1323 0 : struct PNP_GetNextResDes *r2 = (struct PNP_GetNextResDes *)r;
1324 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1325 0 : DEBUG(5,("function PNP_GetNextResDes replied async\n"));
1326 : }
1327 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1328 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetNextResDes, NDR_OUT | NDR_SET_VALUES, r2);
1329 : }
1330 0 : if (dce_call->fault_code != 0) {
1331 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetNextResDes\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1332 : }
1333 0 : break;
1334 : }
1335 0 : case 50: { /* PNP_GetResDesData */
1336 0 : struct PNP_GetResDesData *r2 = (struct PNP_GetResDesData *)r;
1337 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1338 0 : DEBUG(5,("function PNP_GetResDesData replied async\n"));
1339 : }
1340 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1341 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetResDesData, NDR_OUT | NDR_SET_VALUES, r2);
1342 : }
1343 0 : if (dce_call->fault_code != 0) {
1344 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetResDesData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1345 : }
1346 0 : break;
1347 : }
1348 0 : case 51: { /* PNP_GetResDesDataSize */
1349 0 : struct PNP_GetResDesDataSize *r2 = (struct PNP_GetResDesDataSize *)r;
1350 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1351 0 : DEBUG(5,("function PNP_GetResDesDataSize replied async\n"));
1352 : }
1353 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1354 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetResDesDataSize, NDR_OUT | NDR_SET_VALUES, r2);
1355 : }
1356 0 : if (dce_call->fault_code != 0) {
1357 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetResDesDataSize\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1358 : }
1359 0 : break;
1360 : }
1361 0 : case 52: { /* PNP_ModifyResDes */
1362 0 : struct PNP_ModifyResDes *r2 = (struct PNP_ModifyResDes *)r;
1363 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1364 0 : DEBUG(5,("function PNP_ModifyResDes replied async\n"));
1365 : }
1366 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1367 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_ModifyResDes, NDR_OUT | NDR_SET_VALUES, r2);
1368 : }
1369 0 : if (dce_call->fault_code != 0) {
1370 0 : DBG_WARNING("dcerpc_fault %s in PNP_ModifyResDes\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1371 : }
1372 0 : break;
1373 : }
1374 0 : case 53: { /* PNP_DetectResourceLimit */
1375 0 : struct PNP_DetectResourceLimit *r2 = (struct PNP_DetectResourceLimit *)r;
1376 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1377 0 : DEBUG(5,("function PNP_DetectResourceLimit replied async\n"));
1378 : }
1379 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1380 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_DetectResourceLimit, NDR_OUT | NDR_SET_VALUES, r2);
1381 : }
1382 0 : if (dce_call->fault_code != 0) {
1383 0 : DBG_WARNING("dcerpc_fault %s in PNP_DetectResourceLimit\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1384 : }
1385 0 : break;
1386 : }
1387 0 : case 54: { /* PNP_QueryResConfList */
1388 0 : struct PNP_QueryResConfList *r2 = (struct PNP_QueryResConfList *)r;
1389 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1390 0 : DEBUG(5,("function PNP_QueryResConfList replied async\n"));
1391 : }
1392 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1393 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryResConfList, NDR_OUT | NDR_SET_VALUES, r2);
1394 : }
1395 0 : if (dce_call->fault_code != 0) {
1396 0 : DBG_WARNING("dcerpc_fault %s in PNP_QueryResConfList\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1397 : }
1398 0 : break;
1399 : }
1400 0 : case 55: { /* PNP_SetHwProf */
1401 0 : struct PNP_SetHwProf *r2 = (struct PNP_SetHwProf *)r;
1402 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1403 0 : DEBUG(5,("function PNP_SetHwProf replied async\n"));
1404 : }
1405 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1406 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_SetHwProf, NDR_OUT | NDR_SET_VALUES, r2);
1407 : }
1408 0 : if (dce_call->fault_code != 0) {
1409 0 : DBG_WARNING("dcerpc_fault %s in PNP_SetHwProf\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1410 : }
1411 0 : break;
1412 : }
1413 0 : case 56: { /* PNP_QueryArbitratorFreeData */
1414 0 : struct PNP_QueryArbitratorFreeData *r2 = (struct PNP_QueryArbitratorFreeData *)r;
1415 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1416 0 : DEBUG(5,("function PNP_QueryArbitratorFreeData replied async\n"));
1417 : }
1418 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1419 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryArbitratorFreeData, NDR_OUT | NDR_SET_VALUES, r2);
1420 : }
1421 0 : if (dce_call->fault_code != 0) {
1422 0 : DBG_WARNING("dcerpc_fault %s in PNP_QueryArbitratorFreeData\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1423 : }
1424 0 : break;
1425 : }
1426 0 : case 57: { /* PNP_QueryArbitratorFreeSize */
1427 0 : struct PNP_QueryArbitratorFreeSize *r2 = (struct PNP_QueryArbitratorFreeSize *)r;
1428 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1429 0 : DEBUG(5,("function PNP_QueryArbitratorFreeSize replied async\n"));
1430 : }
1431 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1432 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_QueryArbitratorFreeSize, NDR_OUT | NDR_SET_VALUES, r2);
1433 : }
1434 0 : if (dce_call->fault_code != 0) {
1435 0 : DBG_WARNING("dcerpc_fault %s in PNP_QueryArbitratorFreeSize\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1436 : }
1437 0 : break;
1438 : }
1439 0 : case 58: { /* PNP_RunDetection */
1440 0 : struct PNP_RunDetection *r2 = (struct PNP_RunDetection *)r;
1441 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1442 0 : DEBUG(5,("function PNP_RunDetection replied async\n"));
1443 : }
1444 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1445 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RunDetection, NDR_OUT | NDR_SET_VALUES, r2);
1446 : }
1447 0 : if (dce_call->fault_code != 0) {
1448 0 : DBG_WARNING("dcerpc_fault %s in PNP_RunDetection\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1449 : }
1450 0 : break;
1451 : }
1452 0 : case 59: { /* PNP_RegisterNotification */
1453 0 : struct PNP_RegisterNotification *r2 = (struct PNP_RegisterNotification *)r;
1454 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1455 0 : DEBUG(5,("function PNP_RegisterNotification replied async\n"));
1456 : }
1457 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1458 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_RegisterNotification, NDR_OUT | NDR_SET_VALUES, r2);
1459 : }
1460 0 : if (dce_call->fault_code != 0) {
1461 0 : DBG_WARNING("dcerpc_fault %s in PNP_RegisterNotification\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1462 : }
1463 0 : break;
1464 : }
1465 0 : case 60: { /* PNP_UnregisterNotification */
1466 0 : struct PNP_UnregisterNotification *r2 = (struct PNP_UnregisterNotification *)r;
1467 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1468 0 : DEBUG(5,("function PNP_UnregisterNotification replied async\n"));
1469 : }
1470 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1471 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_UnregisterNotification, NDR_OUT | NDR_SET_VALUES, r2);
1472 : }
1473 0 : if (dce_call->fault_code != 0) {
1474 0 : DBG_WARNING("dcerpc_fault %s in PNP_UnregisterNotification\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1475 : }
1476 0 : break;
1477 : }
1478 0 : case 61: { /* PNP_GetCustomDevProp */
1479 0 : struct PNP_GetCustomDevProp *r2 = (struct PNP_GetCustomDevProp *)r;
1480 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1481 0 : DEBUG(5,("function PNP_GetCustomDevProp replied async\n"));
1482 : }
1483 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1484 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetCustomDevProp, NDR_OUT | NDR_SET_VALUES, r2);
1485 : }
1486 0 : if (dce_call->fault_code != 0) {
1487 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetCustomDevProp\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1488 : }
1489 0 : break;
1490 : }
1491 0 : case 62: { /* PNP_GetVersionInternal */
1492 0 : struct PNP_GetVersionInternal *r2 = (struct PNP_GetVersionInternal *)r;
1493 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1494 0 : DEBUG(5,("function PNP_GetVersionInternal replied async\n"));
1495 : }
1496 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1497 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetVersionInternal, NDR_OUT | NDR_SET_VALUES, r2);
1498 : }
1499 0 : if (dce_call->fault_code != 0) {
1500 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetVersionInternal\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1501 : }
1502 0 : break;
1503 : }
1504 0 : case 63: { /* PNP_GetBlockedDriverInfo */
1505 0 : struct PNP_GetBlockedDriverInfo *r2 = (struct PNP_GetBlockedDriverInfo *)r;
1506 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1507 0 : DEBUG(5,("function PNP_GetBlockedDriverInfo replied async\n"));
1508 : }
1509 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1510 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetBlockedDriverInfo, NDR_OUT | NDR_SET_VALUES, r2);
1511 : }
1512 0 : if (dce_call->fault_code != 0) {
1513 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetBlockedDriverInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1514 : }
1515 0 : break;
1516 : }
1517 0 : case 64: { /* PNP_GetServerSideDeviceInstallFlags */
1518 0 : struct PNP_GetServerSideDeviceInstallFlags *r2 = (struct PNP_GetServerSideDeviceInstallFlags *)r;
1519 0 : if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
1520 0 : DEBUG(5,("function PNP_GetServerSideDeviceInstallFlags replied async\n"));
1521 : }
1522 0 : if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
1523 0 : NDR_PRINT_FUNCTION_DEBUG(PNP_GetServerSideDeviceInstallFlags, NDR_OUT | NDR_SET_VALUES, r2);
1524 : }
1525 0 : if (dce_call->fault_code != 0) {
1526 0 : DBG_WARNING("dcerpc_fault %s in PNP_GetServerSideDeviceInstallFlags\n", dcerpc_errstr(mem_ctx, dce_call->fault_code));
1527 : }
1528 0 : break;
1529 : }
1530 0 : default:
1531 0 : dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
1532 0 : break;
1533 : }
1534 :
1535 32 : if (dce_call->fault_code != 0) {
1536 0 : return NT_STATUS_NET_WRITE_FAULT;
1537 : }
1538 :
1539 32 : return NT_STATUS_OK;
1540 : }
1541 :
1542 32 : NTSTATUS ntsvcs__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
1543 : {
1544 0 : enum ndr_err_code ndr_err;
1545 32 : uint16_t opnum = dce_call->pkt.u.request.opnum;
1546 :
1547 32 : ndr_err = ndr_table_ntsvcs.calls[opnum].ndr_push(push, NDR_OUT, r);
1548 32 : if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1549 0 : dce_call->fault_code = DCERPC_FAULT_NDR;
1550 0 : return NT_STATUS_NET_WRITE_FAULT;
1551 : }
1552 :
1553 32 : return NT_STATUS_OK;
1554 : }
1555 :
1556 0 : NTSTATUS ntsvcs__op_local(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
1557 : {
1558 0 : return ntsvcs__op_dispatch_internal(dce_call, mem_ctx, r, S3COMPAT_RPC_DISPATCH_INTERNAL);
1559 : }
1560 :
1561 : static const struct dcesrv_interface dcesrv_ntsvcs_interface = {
1562 : .name = "ntsvcs",
1563 : .syntax_id = {{0x8d9f4e40,0xa03d,0x11ce,{0x8f,0x69},{0x08,0x00,0x3e,0x30,0x05,0x1b}},1.0},
1564 : .bind = ntsvcs__op_bind,
1565 : .unbind = ntsvcs__op_unbind,
1566 : .ndr_pull = ntsvcs__op_ndr_pull,
1567 : .dispatch = ntsvcs__op_dispatch,
1568 : .reply = ntsvcs__op_reply,
1569 : .ndr_push = ntsvcs__op_ndr_push,
1570 : .local = ntsvcs__op_local,
1571 : #ifdef DCESRV_INTERFACE_NTSVCS_FLAGS
1572 : .flags = DCESRV_INTERFACE_NTSVCS_FLAGS
1573 : #else
1574 : .flags = 0
1575 : #endif
1576 : };
1577 :
1578 126 : static NTSTATUS ntsvcs__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
1579 : {
1580 0 : uint32_t i;
1581 0 : NTSTATUS ret;
1582 :
1583 : #ifdef DCESRV_INTERFACE_NTSVCS_NCACN_NP_SECONDARY_ENDPOINT
1584 : const char *ncacn_np_secondary_endpoint = DCESRV_INTERFACE_NTSVCS_NCACN_NP_SECONDARY_ENDPOINT;
1585 : #else
1586 126 : const char *ncacn_np_secondary_endpoint = NULL;
1587 : #endif
1588 :
1589 378 : for (i=0;i<ndr_table_ntsvcs.endpoints->count;i++) {
1590 252 : const char *name = ndr_table_ntsvcs.endpoints->names[i];
1591 :
1592 252 : ret = dcesrv_interface_register(dce_ctx, name, ncacn_np_secondary_endpoint, &dcesrv_ntsvcs_interface, NULL);
1593 252 : if (!NT_STATUS_IS_OK(ret)) {
1594 0 : DBG_ERR("Failed to register endpoint '%s'\n",name);
1595 0 : return ret;
1596 : }
1597 : }
1598 :
1599 126 : return NT_STATUS_OK;
1600 : }
1601 :
1602 126 : static NTSTATUS ntsvcs__op_shutdown_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
1603 : {
1604 126 : return NT_STATUS_OK;
1605 : }
1606 :
1607 0 : static bool ntsvcs__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
1608 : {
1609 0 : if (dcesrv_ntsvcs_interface.syntax_id.if_version == if_version && GUID_equal(&dcesrv_ntsvcs_interface.syntax_id.uuid, uuid)) {
1610 0 : memcpy(iface,&dcesrv_ntsvcs_interface, sizeof(*iface));
1611 0 : return true;
1612 : }
1613 :
1614 0 : return false;
1615 : }
1616 :
1617 0 : static bool ntsvcs__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
1618 : {
1619 0 : if (strcmp(dcesrv_ntsvcs_interface.name, name)==0) {
1620 0 : memcpy(iface, &dcesrv_ntsvcs_interface, sizeof(*iface));
1621 0 : return true;
1622 : }
1623 :
1624 0 : return false;
1625 : }
1626 :
1627 : static const struct dcesrv_endpoint_server ntsvcs_ep_server = {
1628 : /* fill in our name */
1629 : .name = "ntsvcs",
1630 :
1631 : /* Initialization flag */
1632 : .initialized = false,
1633 :
1634 : /* fill in all the operations */
1635 : #ifdef DCESRV_INTERFACE_NTSVCS_INIT_SERVER
1636 : .init_server = DCESRV_INTERFACE_NTSVCS_INIT_SERVER,
1637 : #else
1638 : .init_server = ntsvcs__op_init_server,
1639 : #endif
1640 : #ifdef DCESRV_INTERFACE_NTSVCS_SHUTDOWN_SERVER
1641 : .shutdown_server = DCESRV_INTERFACE_NTSVCS_SHUTDOWN_SERVER,
1642 : #else
1643 : .shutdown_server = ntsvcs__op_shutdown_server,
1644 : #endif
1645 : .interface_by_uuid = ntsvcs__op_interface_by_uuid,
1646 : .interface_by_name = ntsvcs__op_interface_by_name
1647 : };
1648 :
1649 126 : const struct dcesrv_endpoint_server *ntsvcs_get_ep_server(void)
1650 : {
1651 126 : return &ntsvcs_ep_server;
1652 : }
|