1 | /*
|
---|
2 | * Unix SMB/CIFS implementation.
|
---|
3 | * server auto-generated by pidl. DO NOT MODIFY!
|
---|
4 | */
|
---|
5 |
|
---|
6 | #include "includes.h"
|
---|
7 | #include "../librpc/gen_ndr/srv_ntsvcs.h"
|
---|
8 |
|
---|
9 | static bool api_PNP_Disconnect(pipes_struct *p)
|
---|
10 | {
|
---|
11 | const struct ndr_interface_call *call;
|
---|
12 | struct ndr_pull *pull;
|
---|
13 | struct ndr_push *push;
|
---|
14 | enum ndr_err_code ndr_err;
|
---|
15 | DATA_BLOB blob;
|
---|
16 | struct PNP_Disconnect *r;
|
---|
17 |
|
---|
18 | call = &ndr_table_ntsvcs.calls[NDR_PNP_DISCONNECT];
|
---|
19 |
|
---|
20 | r = talloc(talloc_tos(), struct PNP_Disconnect);
|
---|
21 | if (r == NULL) {
|
---|
22 | return false;
|
---|
23 | }
|
---|
24 |
|
---|
25 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
26 | talloc_free(r);
|
---|
27 | return false;
|
---|
28 | }
|
---|
29 |
|
---|
30 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
31 | if (pull == NULL) {
|
---|
32 | talloc_free(r);
|
---|
33 | return false;
|
---|
34 | }
|
---|
35 |
|
---|
36 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
37 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
38 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
39 | talloc_free(r);
|
---|
40 | return false;
|
---|
41 | }
|
---|
42 |
|
---|
43 | if (DEBUGLEVEL >= 10) {
|
---|
44 | NDR_PRINT_IN_DEBUG(PNP_Disconnect, r);
|
---|
45 | }
|
---|
46 |
|
---|
47 | r->out.result = _PNP_Disconnect(p, r);
|
---|
48 |
|
---|
49 | if (p->rng_fault_state) {
|
---|
50 | talloc_free(r);
|
---|
51 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
52 | return true;
|
---|
53 | }
|
---|
54 |
|
---|
55 | if (DEBUGLEVEL >= 10) {
|
---|
56 | NDR_PRINT_OUT_DEBUG(PNP_Disconnect, r);
|
---|
57 | }
|
---|
58 |
|
---|
59 | push = ndr_push_init_ctx(r, NULL);
|
---|
60 | if (push == NULL) {
|
---|
61 | talloc_free(r);
|
---|
62 | return false;
|
---|
63 | }
|
---|
64 |
|
---|
65 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
66 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
67 | talloc_free(r);
|
---|
68 | return false;
|
---|
69 | }
|
---|
70 |
|
---|
71 | blob = ndr_push_blob(push);
|
---|
72 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
73 | talloc_free(r);
|
---|
74 | return false;
|
---|
75 | }
|
---|
76 |
|
---|
77 | talloc_free(r);
|
---|
78 |
|
---|
79 | return true;
|
---|
80 | }
|
---|
81 |
|
---|
82 | static bool api_PNP_Connect(pipes_struct *p)
|
---|
83 | {
|
---|
84 | const struct ndr_interface_call *call;
|
---|
85 | struct ndr_pull *pull;
|
---|
86 | struct ndr_push *push;
|
---|
87 | enum ndr_err_code ndr_err;
|
---|
88 | DATA_BLOB blob;
|
---|
89 | struct PNP_Connect *r;
|
---|
90 |
|
---|
91 | call = &ndr_table_ntsvcs.calls[NDR_PNP_CONNECT];
|
---|
92 |
|
---|
93 | r = talloc(talloc_tos(), struct PNP_Connect);
|
---|
94 | if (r == NULL) {
|
---|
95 | return false;
|
---|
96 | }
|
---|
97 |
|
---|
98 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
99 | talloc_free(r);
|
---|
100 | return false;
|
---|
101 | }
|
---|
102 |
|
---|
103 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
104 | if (pull == NULL) {
|
---|
105 | talloc_free(r);
|
---|
106 | return false;
|
---|
107 | }
|
---|
108 |
|
---|
109 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
110 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
111 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
112 | talloc_free(r);
|
---|
113 | return false;
|
---|
114 | }
|
---|
115 |
|
---|
116 | if (DEBUGLEVEL >= 10) {
|
---|
117 | NDR_PRINT_IN_DEBUG(PNP_Connect, r);
|
---|
118 | }
|
---|
119 |
|
---|
120 | r->out.result = _PNP_Connect(p, r);
|
---|
121 |
|
---|
122 | if (p->rng_fault_state) {
|
---|
123 | talloc_free(r);
|
---|
124 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
125 | return true;
|
---|
126 | }
|
---|
127 |
|
---|
128 | if (DEBUGLEVEL >= 10) {
|
---|
129 | NDR_PRINT_OUT_DEBUG(PNP_Connect, r);
|
---|
130 | }
|
---|
131 |
|
---|
132 | push = ndr_push_init_ctx(r, NULL);
|
---|
133 | if (push == NULL) {
|
---|
134 | talloc_free(r);
|
---|
135 | return false;
|
---|
136 | }
|
---|
137 |
|
---|
138 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
139 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
140 | talloc_free(r);
|
---|
141 | return false;
|
---|
142 | }
|
---|
143 |
|
---|
144 | blob = ndr_push_blob(push);
|
---|
145 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
146 | talloc_free(r);
|
---|
147 | return false;
|
---|
148 | }
|
---|
149 |
|
---|
150 | talloc_free(r);
|
---|
151 |
|
---|
152 | return true;
|
---|
153 | }
|
---|
154 |
|
---|
155 | static bool api_PNP_GetVersion(pipes_struct *p)
|
---|
156 | {
|
---|
157 | const struct ndr_interface_call *call;
|
---|
158 | struct ndr_pull *pull;
|
---|
159 | struct ndr_push *push;
|
---|
160 | enum ndr_err_code ndr_err;
|
---|
161 | DATA_BLOB blob;
|
---|
162 | struct PNP_GetVersion *r;
|
---|
163 |
|
---|
164 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSION];
|
---|
165 |
|
---|
166 | r = talloc(talloc_tos(), struct PNP_GetVersion);
|
---|
167 | if (r == NULL) {
|
---|
168 | return false;
|
---|
169 | }
|
---|
170 |
|
---|
171 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
172 | talloc_free(r);
|
---|
173 | return false;
|
---|
174 | }
|
---|
175 |
|
---|
176 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
177 | if (pull == NULL) {
|
---|
178 | talloc_free(r);
|
---|
179 | return false;
|
---|
180 | }
|
---|
181 |
|
---|
182 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
183 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
184 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
185 | talloc_free(r);
|
---|
186 | return false;
|
---|
187 | }
|
---|
188 |
|
---|
189 | if (DEBUGLEVEL >= 10) {
|
---|
190 | NDR_PRINT_IN_DEBUG(PNP_GetVersion, r);
|
---|
191 | }
|
---|
192 |
|
---|
193 | ZERO_STRUCT(r->out);
|
---|
194 | r->out.version = talloc_zero(r, uint16_t);
|
---|
195 | if (r->out.version == NULL) {
|
---|
196 | talloc_free(r);
|
---|
197 | return false;
|
---|
198 | }
|
---|
199 |
|
---|
200 | r->out.result = _PNP_GetVersion(p, r);
|
---|
201 |
|
---|
202 | if (p->rng_fault_state) {
|
---|
203 | talloc_free(r);
|
---|
204 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
205 | return true;
|
---|
206 | }
|
---|
207 |
|
---|
208 | if (DEBUGLEVEL >= 10) {
|
---|
209 | NDR_PRINT_OUT_DEBUG(PNP_GetVersion, r);
|
---|
210 | }
|
---|
211 |
|
---|
212 | push = ndr_push_init_ctx(r, NULL);
|
---|
213 | if (push == NULL) {
|
---|
214 | talloc_free(r);
|
---|
215 | return false;
|
---|
216 | }
|
---|
217 |
|
---|
218 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
219 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
220 | talloc_free(r);
|
---|
221 | return false;
|
---|
222 | }
|
---|
223 |
|
---|
224 | blob = ndr_push_blob(push);
|
---|
225 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
226 | talloc_free(r);
|
---|
227 | return false;
|
---|
228 | }
|
---|
229 |
|
---|
230 | talloc_free(r);
|
---|
231 |
|
---|
232 | return true;
|
---|
233 | }
|
---|
234 |
|
---|
235 | static bool api_PNP_GetGlobalState(pipes_struct *p)
|
---|
236 | {
|
---|
237 | const struct ndr_interface_call *call;
|
---|
238 | struct ndr_pull *pull;
|
---|
239 | struct ndr_push *push;
|
---|
240 | enum ndr_err_code ndr_err;
|
---|
241 | DATA_BLOB blob;
|
---|
242 | struct PNP_GetGlobalState *r;
|
---|
243 |
|
---|
244 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETGLOBALSTATE];
|
---|
245 |
|
---|
246 | r = talloc(talloc_tos(), struct PNP_GetGlobalState);
|
---|
247 | if (r == NULL) {
|
---|
248 | return false;
|
---|
249 | }
|
---|
250 |
|
---|
251 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
252 | talloc_free(r);
|
---|
253 | return false;
|
---|
254 | }
|
---|
255 |
|
---|
256 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
257 | if (pull == NULL) {
|
---|
258 | talloc_free(r);
|
---|
259 | return false;
|
---|
260 | }
|
---|
261 |
|
---|
262 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
263 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
264 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
265 | talloc_free(r);
|
---|
266 | return false;
|
---|
267 | }
|
---|
268 |
|
---|
269 | if (DEBUGLEVEL >= 10) {
|
---|
270 | NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, r);
|
---|
271 | }
|
---|
272 |
|
---|
273 | r->out.result = _PNP_GetGlobalState(p, r);
|
---|
274 |
|
---|
275 | if (p->rng_fault_state) {
|
---|
276 | talloc_free(r);
|
---|
277 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
278 | return true;
|
---|
279 | }
|
---|
280 |
|
---|
281 | if (DEBUGLEVEL >= 10) {
|
---|
282 | NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, r);
|
---|
283 | }
|
---|
284 |
|
---|
285 | push = ndr_push_init_ctx(r, NULL);
|
---|
286 | if (push == NULL) {
|
---|
287 | talloc_free(r);
|
---|
288 | return false;
|
---|
289 | }
|
---|
290 |
|
---|
291 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
292 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
293 | talloc_free(r);
|
---|
294 | return false;
|
---|
295 | }
|
---|
296 |
|
---|
297 | blob = ndr_push_blob(push);
|
---|
298 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
299 | talloc_free(r);
|
---|
300 | return false;
|
---|
301 | }
|
---|
302 |
|
---|
303 | talloc_free(r);
|
---|
304 |
|
---|
305 | return true;
|
---|
306 | }
|
---|
307 |
|
---|
308 | static bool api_PNP_InitDetection(pipes_struct *p)
|
---|
309 | {
|
---|
310 | const struct ndr_interface_call *call;
|
---|
311 | struct ndr_pull *pull;
|
---|
312 | struct ndr_push *push;
|
---|
313 | enum ndr_err_code ndr_err;
|
---|
314 | DATA_BLOB blob;
|
---|
315 | struct PNP_InitDetection *r;
|
---|
316 |
|
---|
317 | call = &ndr_table_ntsvcs.calls[NDR_PNP_INITDETECTION];
|
---|
318 |
|
---|
319 | r = talloc(talloc_tos(), struct PNP_InitDetection);
|
---|
320 | if (r == NULL) {
|
---|
321 | return false;
|
---|
322 | }
|
---|
323 |
|
---|
324 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
325 | talloc_free(r);
|
---|
326 | return false;
|
---|
327 | }
|
---|
328 |
|
---|
329 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
330 | if (pull == NULL) {
|
---|
331 | talloc_free(r);
|
---|
332 | return false;
|
---|
333 | }
|
---|
334 |
|
---|
335 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
336 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
337 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
338 | talloc_free(r);
|
---|
339 | return false;
|
---|
340 | }
|
---|
341 |
|
---|
342 | if (DEBUGLEVEL >= 10) {
|
---|
343 | NDR_PRINT_IN_DEBUG(PNP_InitDetection, r);
|
---|
344 | }
|
---|
345 |
|
---|
346 | r->out.result = _PNP_InitDetection(p, r);
|
---|
347 |
|
---|
348 | if (p->rng_fault_state) {
|
---|
349 | talloc_free(r);
|
---|
350 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
351 | return true;
|
---|
352 | }
|
---|
353 |
|
---|
354 | if (DEBUGLEVEL >= 10) {
|
---|
355 | NDR_PRINT_OUT_DEBUG(PNP_InitDetection, r);
|
---|
356 | }
|
---|
357 |
|
---|
358 | push = ndr_push_init_ctx(r, NULL);
|
---|
359 | if (push == NULL) {
|
---|
360 | talloc_free(r);
|
---|
361 | return false;
|
---|
362 | }
|
---|
363 |
|
---|
364 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
365 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
366 | talloc_free(r);
|
---|
367 | return false;
|
---|
368 | }
|
---|
369 |
|
---|
370 | blob = ndr_push_blob(push);
|
---|
371 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
372 | talloc_free(r);
|
---|
373 | return false;
|
---|
374 | }
|
---|
375 |
|
---|
376 | talloc_free(r);
|
---|
377 |
|
---|
378 | return true;
|
---|
379 | }
|
---|
380 |
|
---|
381 | static bool api_PNP_ReportLogOn(pipes_struct *p)
|
---|
382 | {
|
---|
383 | const struct ndr_interface_call *call;
|
---|
384 | struct ndr_pull *pull;
|
---|
385 | struct ndr_push *push;
|
---|
386 | enum ndr_err_code ndr_err;
|
---|
387 | DATA_BLOB blob;
|
---|
388 | struct PNP_ReportLogOn *r;
|
---|
389 |
|
---|
390 | call = &ndr_table_ntsvcs.calls[NDR_PNP_REPORTLOGON];
|
---|
391 |
|
---|
392 | r = talloc(talloc_tos(), struct PNP_ReportLogOn);
|
---|
393 | if (r == NULL) {
|
---|
394 | return false;
|
---|
395 | }
|
---|
396 |
|
---|
397 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
398 | talloc_free(r);
|
---|
399 | return false;
|
---|
400 | }
|
---|
401 |
|
---|
402 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
403 | if (pull == NULL) {
|
---|
404 | talloc_free(r);
|
---|
405 | return false;
|
---|
406 | }
|
---|
407 |
|
---|
408 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
409 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
410 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
411 | talloc_free(r);
|
---|
412 | return false;
|
---|
413 | }
|
---|
414 |
|
---|
415 | if (DEBUGLEVEL >= 10) {
|
---|
416 | NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, r);
|
---|
417 | }
|
---|
418 |
|
---|
419 | r->out.result = _PNP_ReportLogOn(p, r);
|
---|
420 |
|
---|
421 | if (p->rng_fault_state) {
|
---|
422 | talloc_free(r);
|
---|
423 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
424 | return true;
|
---|
425 | }
|
---|
426 |
|
---|
427 | if (DEBUGLEVEL >= 10) {
|
---|
428 | NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, r);
|
---|
429 | }
|
---|
430 |
|
---|
431 | push = ndr_push_init_ctx(r, NULL);
|
---|
432 | if (push == NULL) {
|
---|
433 | talloc_free(r);
|
---|
434 | return false;
|
---|
435 | }
|
---|
436 |
|
---|
437 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
438 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
439 | talloc_free(r);
|
---|
440 | return false;
|
---|
441 | }
|
---|
442 |
|
---|
443 | blob = ndr_push_blob(push);
|
---|
444 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
445 | talloc_free(r);
|
---|
446 | return false;
|
---|
447 | }
|
---|
448 |
|
---|
449 | talloc_free(r);
|
---|
450 |
|
---|
451 | return true;
|
---|
452 | }
|
---|
453 |
|
---|
454 | static bool api_PNP_ValidateDeviceInstance(pipes_struct *p)
|
---|
455 | {
|
---|
456 | const struct ndr_interface_call *call;
|
---|
457 | struct ndr_pull *pull;
|
---|
458 | struct ndr_push *push;
|
---|
459 | enum ndr_err_code ndr_err;
|
---|
460 | DATA_BLOB blob;
|
---|
461 | struct PNP_ValidateDeviceInstance *r;
|
---|
462 |
|
---|
463 | call = &ndr_table_ntsvcs.calls[NDR_PNP_VALIDATEDEVICEINSTANCE];
|
---|
464 |
|
---|
465 | r = talloc(talloc_tos(), struct PNP_ValidateDeviceInstance);
|
---|
466 | if (r == NULL) {
|
---|
467 | return false;
|
---|
468 | }
|
---|
469 |
|
---|
470 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
471 | talloc_free(r);
|
---|
472 | return false;
|
---|
473 | }
|
---|
474 |
|
---|
475 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
476 | if (pull == NULL) {
|
---|
477 | talloc_free(r);
|
---|
478 | return false;
|
---|
479 | }
|
---|
480 |
|
---|
481 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
482 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
483 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
484 | talloc_free(r);
|
---|
485 | return false;
|
---|
486 | }
|
---|
487 |
|
---|
488 | if (DEBUGLEVEL >= 10) {
|
---|
489 | NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, r);
|
---|
490 | }
|
---|
491 |
|
---|
492 | r->out.result = _PNP_ValidateDeviceInstance(p, r);
|
---|
493 |
|
---|
494 | if (p->rng_fault_state) {
|
---|
495 | talloc_free(r);
|
---|
496 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
497 | return true;
|
---|
498 | }
|
---|
499 |
|
---|
500 | if (DEBUGLEVEL >= 10) {
|
---|
501 | NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, r);
|
---|
502 | }
|
---|
503 |
|
---|
504 | push = ndr_push_init_ctx(r, NULL);
|
---|
505 | if (push == NULL) {
|
---|
506 | talloc_free(r);
|
---|
507 | return false;
|
---|
508 | }
|
---|
509 |
|
---|
510 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
511 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
512 | talloc_free(r);
|
---|
513 | return false;
|
---|
514 | }
|
---|
515 |
|
---|
516 | blob = ndr_push_blob(push);
|
---|
517 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
518 | talloc_free(r);
|
---|
519 | return false;
|
---|
520 | }
|
---|
521 |
|
---|
522 | talloc_free(r);
|
---|
523 |
|
---|
524 | return true;
|
---|
525 | }
|
---|
526 |
|
---|
527 | static bool api_PNP_GetRootDeviceInstance(pipes_struct *p)
|
---|
528 | {
|
---|
529 | const struct ndr_interface_call *call;
|
---|
530 | struct ndr_pull *pull;
|
---|
531 | struct ndr_push *push;
|
---|
532 | enum ndr_err_code ndr_err;
|
---|
533 | DATA_BLOB blob;
|
---|
534 | struct PNP_GetRootDeviceInstance *r;
|
---|
535 |
|
---|
536 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETROOTDEVICEINSTANCE];
|
---|
537 |
|
---|
538 | r = talloc(talloc_tos(), struct PNP_GetRootDeviceInstance);
|
---|
539 | if (r == NULL) {
|
---|
540 | return false;
|
---|
541 | }
|
---|
542 |
|
---|
543 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
544 | talloc_free(r);
|
---|
545 | return false;
|
---|
546 | }
|
---|
547 |
|
---|
548 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
549 | if (pull == NULL) {
|
---|
550 | talloc_free(r);
|
---|
551 | return false;
|
---|
552 | }
|
---|
553 |
|
---|
554 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
555 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
556 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
557 | talloc_free(r);
|
---|
558 | return false;
|
---|
559 | }
|
---|
560 |
|
---|
561 | if (DEBUGLEVEL >= 10) {
|
---|
562 | NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, r);
|
---|
563 | }
|
---|
564 |
|
---|
565 | r->out.result = _PNP_GetRootDeviceInstance(p, r);
|
---|
566 |
|
---|
567 | if (p->rng_fault_state) {
|
---|
568 | talloc_free(r);
|
---|
569 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
570 | return true;
|
---|
571 | }
|
---|
572 |
|
---|
573 | if (DEBUGLEVEL >= 10) {
|
---|
574 | NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, r);
|
---|
575 | }
|
---|
576 |
|
---|
577 | push = ndr_push_init_ctx(r, NULL);
|
---|
578 | if (push == NULL) {
|
---|
579 | talloc_free(r);
|
---|
580 | return false;
|
---|
581 | }
|
---|
582 |
|
---|
583 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
584 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
585 | talloc_free(r);
|
---|
586 | return false;
|
---|
587 | }
|
---|
588 |
|
---|
589 | blob = ndr_push_blob(push);
|
---|
590 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
591 | talloc_free(r);
|
---|
592 | return false;
|
---|
593 | }
|
---|
594 |
|
---|
595 | talloc_free(r);
|
---|
596 |
|
---|
597 | return true;
|
---|
598 | }
|
---|
599 |
|
---|
600 | static bool api_PNP_GetRelatedDeviceInstance(pipes_struct *p)
|
---|
601 | {
|
---|
602 | const struct ndr_interface_call *call;
|
---|
603 | struct ndr_pull *pull;
|
---|
604 | struct ndr_push *push;
|
---|
605 | enum ndr_err_code ndr_err;
|
---|
606 | DATA_BLOB blob;
|
---|
607 | struct PNP_GetRelatedDeviceInstance *r;
|
---|
608 |
|
---|
609 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRELATEDDEVICEINSTANCE];
|
---|
610 |
|
---|
611 | r = talloc(talloc_tos(), struct PNP_GetRelatedDeviceInstance);
|
---|
612 | if (r == NULL) {
|
---|
613 | return false;
|
---|
614 | }
|
---|
615 |
|
---|
616 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
617 | talloc_free(r);
|
---|
618 | return false;
|
---|
619 | }
|
---|
620 |
|
---|
621 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
622 | if (pull == NULL) {
|
---|
623 | talloc_free(r);
|
---|
624 | return false;
|
---|
625 | }
|
---|
626 |
|
---|
627 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
628 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
629 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
630 | talloc_free(r);
|
---|
631 | return false;
|
---|
632 | }
|
---|
633 |
|
---|
634 | if (DEBUGLEVEL >= 10) {
|
---|
635 | NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, r);
|
---|
636 | }
|
---|
637 |
|
---|
638 | r->out.result = _PNP_GetRelatedDeviceInstance(p, r);
|
---|
639 |
|
---|
640 | if (p->rng_fault_state) {
|
---|
641 | talloc_free(r);
|
---|
642 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
643 | return true;
|
---|
644 | }
|
---|
645 |
|
---|
646 | if (DEBUGLEVEL >= 10) {
|
---|
647 | NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, r);
|
---|
648 | }
|
---|
649 |
|
---|
650 | push = ndr_push_init_ctx(r, NULL);
|
---|
651 | if (push == NULL) {
|
---|
652 | talloc_free(r);
|
---|
653 | return false;
|
---|
654 | }
|
---|
655 |
|
---|
656 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
657 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
658 | talloc_free(r);
|
---|
659 | return false;
|
---|
660 | }
|
---|
661 |
|
---|
662 | blob = ndr_push_blob(push);
|
---|
663 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
664 | talloc_free(r);
|
---|
665 | return false;
|
---|
666 | }
|
---|
667 |
|
---|
668 | talloc_free(r);
|
---|
669 |
|
---|
670 | return true;
|
---|
671 | }
|
---|
672 |
|
---|
673 | static bool api_PNP_EnumerateSubKeys(pipes_struct *p)
|
---|
674 | {
|
---|
675 | const struct ndr_interface_call *call;
|
---|
676 | struct ndr_pull *pull;
|
---|
677 | struct ndr_push *push;
|
---|
678 | enum ndr_err_code ndr_err;
|
---|
679 | DATA_BLOB blob;
|
---|
680 | struct PNP_EnumerateSubKeys *r;
|
---|
681 |
|
---|
682 | call = &ndr_table_ntsvcs.calls[NDR_PNP_ENUMERATESUBKEYS];
|
---|
683 |
|
---|
684 | r = talloc(talloc_tos(), struct PNP_EnumerateSubKeys);
|
---|
685 | if (r == NULL) {
|
---|
686 | return false;
|
---|
687 | }
|
---|
688 |
|
---|
689 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
690 | talloc_free(r);
|
---|
691 | return false;
|
---|
692 | }
|
---|
693 |
|
---|
694 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
695 | if (pull == NULL) {
|
---|
696 | talloc_free(r);
|
---|
697 | return false;
|
---|
698 | }
|
---|
699 |
|
---|
700 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
701 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
702 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
703 | talloc_free(r);
|
---|
704 | return false;
|
---|
705 | }
|
---|
706 |
|
---|
707 | if (DEBUGLEVEL >= 10) {
|
---|
708 | NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, r);
|
---|
709 | }
|
---|
710 |
|
---|
711 | r->out.result = _PNP_EnumerateSubKeys(p, r);
|
---|
712 |
|
---|
713 | if (p->rng_fault_state) {
|
---|
714 | talloc_free(r);
|
---|
715 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
716 | return true;
|
---|
717 | }
|
---|
718 |
|
---|
719 | if (DEBUGLEVEL >= 10) {
|
---|
720 | NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, r);
|
---|
721 | }
|
---|
722 |
|
---|
723 | push = ndr_push_init_ctx(r, NULL);
|
---|
724 | if (push == NULL) {
|
---|
725 | talloc_free(r);
|
---|
726 | return false;
|
---|
727 | }
|
---|
728 |
|
---|
729 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
730 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
731 | talloc_free(r);
|
---|
732 | return false;
|
---|
733 | }
|
---|
734 |
|
---|
735 | blob = ndr_push_blob(push);
|
---|
736 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
737 | talloc_free(r);
|
---|
738 | return false;
|
---|
739 | }
|
---|
740 |
|
---|
741 | talloc_free(r);
|
---|
742 |
|
---|
743 | return true;
|
---|
744 | }
|
---|
745 |
|
---|
746 | static bool api_PNP_GetDeviceList(pipes_struct *p)
|
---|
747 | {
|
---|
748 | const struct ndr_interface_call *call;
|
---|
749 | struct ndr_pull *pull;
|
---|
750 | struct ndr_push *push;
|
---|
751 | enum ndr_err_code ndr_err;
|
---|
752 | DATA_BLOB blob;
|
---|
753 | struct PNP_GetDeviceList *r;
|
---|
754 |
|
---|
755 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELIST];
|
---|
756 |
|
---|
757 | r = talloc(talloc_tos(), struct PNP_GetDeviceList);
|
---|
758 | if (r == NULL) {
|
---|
759 | return false;
|
---|
760 | }
|
---|
761 |
|
---|
762 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
763 | talloc_free(r);
|
---|
764 | return false;
|
---|
765 | }
|
---|
766 |
|
---|
767 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
768 | if (pull == NULL) {
|
---|
769 | talloc_free(r);
|
---|
770 | return false;
|
---|
771 | }
|
---|
772 |
|
---|
773 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
774 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
775 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
776 | talloc_free(r);
|
---|
777 | return false;
|
---|
778 | }
|
---|
779 |
|
---|
780 | if (DEBUGLEVEL >= 10) {
|
---|
781 | NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r);
|
---|
782 | }
|
---|
783 |
|
---|
784 | ZERO_STRUCT(r->out);
|
---|
785 | r->out.length = r->in.length;
|
---|
786 | r->out.buffer = talloc_zero_array(r, uint16_t, *r->out.length);
|
---|
787 | if (r->out.buffer == NULL) {
|
---|
788 | talloc_free(r);
|
---|
789 | return false;
|
---|
790 | }
|
---|
791 |
|
---|
792 | r->out.result = _PNP_GetDeviceList(p, r);
|
---|
793 |
|
---|
794 | if (p->rng_fault_state) {
|
---|
795 | talloc_free(r);
|
---|
796 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
797 | return true;
|
---|
798 | }
|
---|
799 |
|
---|
800 | if (DEBUGLEVEL >= 10) {
|
---|
801 | NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, r);
|
---|
802 | }
|
---|
803 |
|
---|
804 | push = ndr_push_init_ctx(r, NULL);
|
---|
805 | if (push == NULL) {
|
---|
806 | talloc_free(r);
|
---|
807 | return false;
|
---|
808 | }
|
---|
809 |
|
---|
810 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
811 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
812 | talloc_free(r);
|
---|
813 | return false;
|
---|
814 | }
|
---|
815 |
|
---|
816 | blob = ndr_push_blob(push);
|
---|
817 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
818 | talloc_free(r);
|
---|
819 | return false;
|
---|
820 | }
|
---|
821 |
|
---|
822 | talloc_free(r);
|
---|
823 |
|
---|
824 | return true;
|
---|
825 | }
|
---|
826 |
|
---|
827 | static bool api_PNP_GetDeviceListSize(pipes_struct *p)
|
---|
828 | {
|
---|
829 | const struct ndr_interface_call *call;
|
---|
830 | struct ndr_pull *pull;
|
---|
831 | struct ndr_push *push;
|
---|
832 | enum ndr_err_code ndr_err;
|
---|
833 | DATA_BLOB blob;
|
---|
834 | struct PNP_GetDeviceListSize *r;
|
---|
835 |
|
---|
836 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICELISTSIZE];
|
---|
837 |
|
---|
838 | r = talloc(talloc_tos(), struct PNP_GetDeviceListSize);
|
---|
839 | if (r == NULL) {
|
---|
840 | return false;
|
---|
841 | }
|
---|
842 |
|
---|
843 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
844 | talloc_free(r);
|
---|
845 | return false;
|
---|
846 | }
|
---|
847 |
|
---|
848 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
849 | if (pull == NULL) {
|
---|
850 | talloc_free(r);
|
---|
851 | return false;
|
---|
852 | }
|
---|
853 |
|
---|
854 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
855 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
856 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
857 | talloc_free(r);
|
---|
858 | return false;
|
---|
859 | }
|
---|
860 |
|
---|
861 | if (DEBUGLEVEL >= 10) {
|
---|
862 | NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r);
|
---|
863 | }
|
---|
864 |
|
---|
865 | ZERO_STRUCT(r->out);
|
---|
866 | r->out.size = talloc_zero(r, uint32_t);
|
---|
867 | if (r->out.size == NULL) {
|
---|
868 | talloc_free(r);
|
---|
869 | return false;
|
---|
870 | }
|
---|
871 |
|
---|
872 | r->out.result = _PNP_GetDeviceListSize(p, r);
|
---|
873 |
|
---|
874 | if (p->rng_fault_state) {
|
---|
875 | talloc_free(r);
|
---|
876 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
877 | return true;
|
---|
878 | }
|
---|
879 |
|
---|
880 | if (DEBUGLEVEL >= 10) {
|
---|
881 | NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, r);
|
---|
882 | }
|
---|
883 |
|
---|
884 | push = ndr_push_init_ctx(r, NULL);
|
---|
885 | if (push == NULL) {
|
---|
886 | talloc_free(r);
|
---|
887 | return false;
|
---|
888 | }
|
---|
889 |
|
---|
890 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
891 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
892 | talloc_free(r);
|
---|
893 | return false;
|
---|
894 | }
|
---|
895 |
|
---|
896 | blob = ndr_push_blob(push);
|
---|
897 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
898 | talloc_free(r);
|
---|
899 | return false;
|
---|
900 | }
|
---|
901 |
|
---|
902 | talloc_free(r);
|
---|
903 |
|
---|
904 | return true;
|
---|
905 | }
|
---|
906 |
|
---|
907 | static bool api_PNP_GetDepth(pipes_struct *p)
|
---|
908 | {
|
---|
909 | const struct ndr_interface_call *call;
|
---|
910 | struct ndr_pull *pull;
|
---|
911 | struct ndr_push *push;
|
---|
912 | enum ndr_err_code ndr_err;
|
---|
913 | DATA_BLOB blob;
|
---|
914 | struct PNP_GetDepth *r;
|
---|
915 |
|
---|
916 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEPTH];
|
---|
917 |
|
---|
918 | r = talloc(talloc_tos(), struct PNP_GetDepth);
|
---|
919 | if (r == NULL) {
|
---|
920 | return false;
|
---|
921 | }
|
---|
922 |
|
---|
923 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
924 | talloc_free(r);
|
---|
925 | return false;
|
---|
926 | }
|
---|
927 |
|
---|
928 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
929 | if (pull == NULL) {
|
---|
930 | talloc_free(r);
|
---|
931 | return false;
|
---|
932 | }
|
---|
933 |
|
---|
934 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
935 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
936 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
937 | talloc_free(r);
|
---|
938 | return false;
|
---|
939 | }
|
---|
940 |
|
---|
941 | if (DEBUGLEVEL >= 10) {
|
---|
942 | NDR_PRINT_IN_DEBUG(PNP_GetDepth, r);
|
---|
943 | }
|
---|
944 |
|
---|
945 | r->out.result = _PNP_GetDepth(p, r);
|
---|
946 |
|
---|
947 | if (p->rng_fault_state) {
|
---|
948 | talloc_free(r);
|
---|
949 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
950 | return true;
|
---|
951 | }
|
---|
952 |
|
---|
953 | if (DEBUGLEVEL >= 10) {
|
---|
954 | NDR_PRINT_OUT_DEBUG(PNP_GetDepth, r);
|
---|
955 | }
|
---|
956 |
|
---|
957 | push = ndr_push_init_ctx(r, NULL);
|
---|
958 | if (push == NULL) {
|
---|
959 | talloc_free(r);
|
---|
960 | return false;
|
---|
961 | }
|
---|
962 |
|
---|
963 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
964 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
965 | talloc_free(r);
|
---|
966 | return false;
|
---|
967 | }
|
---|
968 |
|
---|
969 | blob = ndr_push_blob(push);
|
---|
970 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
971 | talloc_free(r);
|
---|
972 | return false;
|
---|
973 | }
|
---|
974 |
|
---|
975 | talloc_free(r);
|
---|
976 |
|
---|
977 | return true;
|
---|
978 | }
|
---|
979 |
|
---|
980 | static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
|
---|
981 | {
|
---|
982 | const struct ndr_interface_call *call;
|
---|
983 | struct ndr_pull *pull;
|
---|
984 | struct ndr_push *push;
|
---|
985 | enum ndr_err_code ndr_err;
|
---|
986 | DATA_BLOB blob;
|
---|
987 | struct PNP_GetDeviceRegProp *r;
|
---|
988 |
|
---|
989 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICEREGPROP];
|
---|
990 |
|
---|
991 | r = talloc(talloc_tos(), struct PNP_GetDeviceRegProp);
|
---|
992 | if (r == NULL) {
|
---|
993 | return false;
|
---|
994 | }
|
---|
995 |
|
---|
996 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
997 | talloc_free(r);
|
---|
998 | return false;
|
---|
999 | }
|
---|
1000 |
|
---|
1001 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1002 | if (pull == NULL) {
|
---|
1003 | talloc_free(r);
|
---|
1004 | return false;
|
---|
1005 | }
|
---|
1006 |
|
---|
1007 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1008 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1009 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1010 | talloc_free(r);
|
---|
1011 | return false;
|
---|
1012 | }
|
---|
1013 |
|
---|
1014 | if (DEBUGLEVEL >= 10) {
|
---|
1015 | NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, r);
|
---|
1016 | }
|
---|
1017 |
|
---|
1018 | ZERO_STRUCT(r->out);
|
---|
1019 | r->out.reg_data_type = r->in.reg_data_type;
|
---|
1020 | r->out.buffer_size = r->in.buffer_size;
|
---|
1021 | r->out.needed = r->in.needed;
|
---|
1022 | r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
|
---|
1023 | if (r->out.buffer == NULL) {
|
---|
1024 | talloc_free(r);
|
---|
1025 | return false;
|
---|
1026 | }
|
---|
1027 |
|
---|
1028 | r->out.result = _PNP_GetDeviceRegProp(p, r);
|
---|
1029 |
|
---|
1030 | if (p->rng_fault_state) {
|
---|
1031 | talloc_free(r);
|
---|
1032 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1033 | return true;
|
---|
1034 | }
|
---|
1035 |
|
---|
1036 | if (DEBUGLEVEL >= 10) {
|
---|
1037 | NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, r);
|
---|
1038 | }
|
---|
1039 |
|
---|
1040 | push = ndr_push_init_ctx(r, NULL);
|
---|
1041 | if (push == NULL) {
|
---|
1042 | talloc_free(r);
|
---|
1043 | return false;
|
---|
1044 | }
|
---|
1045 |
|
---|
1046 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1047 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1048 | talloc_free(r);
|
---|
1049 | return false;
|
---|
1050 | }
|
---|
1051 |
|
---|
1052 | blob = ndr_push_blob(push);
|
---|
1053 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1054 | talloc_free(r);
|
---|
1055 | return false;
|
---|
1056 | }
|
---|
1057 |
|
---|
1058 | talloc_free(r);
|
---|
1059 |
|
---|
1060 | return true;
|
---|
1061 | }
|
---|
1062 |
|
---|
1063 | static bool api_PNP_SetDeviceRegProp(pipes_struct *p)
|
---|
1064 | {
|
---|
1065 | const struct ndr_interface_call *call;
|
---|
1066 | struct ndr_pull *pull;
|
---|
1067 | struct ndr_push *push;
|
---|
1068 | enum ndr_err_code ndr_err;
|
---|
1069 | DATA_BLOB blob;
|
---|
1070 | struct PNP_SetDeviceRegProp *r;
|
---|
1071 |
|
---|
1072 | call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEREGPROP];
|
---|
1073 |
|
---|
1074 | r = talloc(talloc_tos(), struct PNP_SetDeviceRegProp);
|
---|
1075 | if (r == NULL) {
|
---|
1076 | return false;
|
---|
1077 | }
|
---|
1078 |
|
---|
1079 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1080 | talloc_free(r);
|
---|
1081 | return false;
|
---|
1082 | }
|
---|
1083 |
|
---|
1084 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1085 | if (pull == NULL) {
|
---|
1086 | talloc_free(r);
|
---|
1087 | return false;
|
---|
1088 | }
|
---|
1089 |
|
---|
1090 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1091 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1092 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1093 | talloc_free(r);
|
---|
1094 | return false;
|
---|
1095 | }
|
---|
1096 |
|
---|
1097 | if (DEBUGLEVEL >= 10) {
|
---|
1098 | NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, r);
|
---|
1099 | }
|
---|
1100 |
|
---|
1101 | r->out.result = _PNP_SetDeviceRegProp(p, r);
|
---|
1102 |
|
---|
1103 | if (p->rng_fault_state) {
|
---|
1104 | talloc_free(r);
|
---|
1105 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1106 | return true;
|
---|
1107 | }
|
---|
1108 |
|
---|
1109 | if (DEBUGLEVEL >= 10) {
|
---|
1110 | NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, r);
|
---|
1111 | }
|
---|
1112 |
|
---|
1113 | push = ndr_push_init_ctx(r, NULL);
|
---|
1114 | if (push == NULL) {
|
---|
1115 | talloc_free(r);
|
---|
1116 | return false;
|
---|
1117 | }
|
---|
1118 |
|
---|
1119 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1120 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1121 | talloc_free(r);
|
---|
1122 | return false;
|
---|
1123 | }
|
---|
1124 |
|
---|
1125 | blob = ndr_push_blob(push);
|
---|
1126 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1127 | talloc_free(r);
|
---|
1128 | return false;
|
---|
1129 | }
|
---|
1130 |
|
---|
1131 | talloc_free(r);
|
---|
1132 |
|
---|
1133 | return true;
|
---|
1134 | }
|
---|
1135 |
|
---|
1136 | static bool api_PNP_GetClassInstance(pipes_struct *p)
|
---|
1137 | {
|
---|
1138 | const struct ndr_interface_call *call;
|
---|
1139 | struct ndr_pull *pull;
|
---|
1140 | struct ndr_push *push;
|
---|
1141 | enum ndr_err_code ndr_err;
|
---|
1142 | DATA_BLOB blob;
|
---|
1143 | struct PNP_GetClassInstance *r;
|
---|
1144 |
|
---|
1145 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSINSTANCE];
|
---|
1146 |
|
---|
1147 | r = talloc(talloc_tos(), struct PNP_GetClassInstance);
|
---|
1148 | if (r == NULL) {
|
---|
1149 | return false;
|
---|
1150 | }
|
---|
1151 |
|
---|
1152 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1153 | talloc_free(r);
|
---|
1154 | return false;
|
---|
1155 | }
|
---|
1156 |
|
---|
1157 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1158 | if (pull == NULL) {
|
---|
1159 | talloc_free(r);
|
---|
1160 | return false;
|
---|
1161 | }
|
---|
1162 |
|
---|
1163 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1164 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1165 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1166 | talloc_free(r);
|
---|
1167 | return false;
|
---|
1168 | }
|
---|
1169 |
|
---|
1170 | if (DEBUGLEVEL >= 10) {
|
---|
1171 | NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, r);
|
---|
1172 | }
|
---|
1173 |
|
---|
1174 | r->out.result = _PNP_GetClassInstance(p, r);
|
---|
1175 |
|
---|
1176 | if (p->rng_fault_state) {
|
---|
1177 | talloc_free(r);
|
---|
1178 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1179 | return true;
|
---|
1180 | }
|
---|
1181 |
|
---|
1182 | if (DEBUGLEVEL >= 10) {
|
---|
1183 | NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, r);
|
---|
1184 | }
|
---|
1185 |
|
---|
1186 | push = ndr_push_init_ctx(r, NULL);
|
---|
1187 | if (push == NULL) {
|
---|
1188 | talloc_free(r);
|
---|
1189 | return false;
|
---|
1190 | }
|
---|
1191 |
|
---|
1192 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1193 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1194 | talloc_free(r);
|
---|
1195 | return false;
|
---|
1196 | }
|
---|
1197 |
|
---|
1198 | blob = ndr_push_blob(push);
|
---|
1199 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1200 | talloc_free(r);
|
---|
1201 | return false;
|
---|
1202 | }
|
---|
1203 |
|
---|
1204 | talloc_free(r);
|
---|
1205 |
|
---|
1206 | return true;
|
---|
1207 | }
|
---|
1208 |
|
---|
1209 | static bool api_PNP_CreateKey(pipes_struct *p)
|
---|
1210 | {
|
---|
1211 | const struct ndr_interface_call *call;
|
---|
1212 | struct ndr_pull *pull;
|
---|
1213 | struct ndr_push *push;
|
---|
1214 | enum ndr_err_code ndr_err;
|
---|
1215 | DATA_BLOB blob;
|
---|
1216 | struct PNP_CreateKey *r;
|
---|
1217 |
|
---|
1218 | call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEKEY];
|
---|
1219 |
|
---|
1220 | r = talloc(talloc_tos(), struct PNP_CreateKey);
|
---|
1221 | if (r == NULL) {
|
---|
1222 | return false;
|
---|
1223 | }
|
---|
1224 |
|
---|
1225 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1226 | talloc_free(r);
|
---|
1227 | return false;
|
---|
1228 | }
|
---|
1229 |
|
---|
1230 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1231 | if (pull == NULL) {
|
---|
1232 | talloc_free(r);
|
---|
1233 | return false;
|
---|
1234 | }
|
---|
1235 |
|
---|
1236 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1237 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1238 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1239 | talloc_free(r);
|
---|
1240 | return false;
|
---|
1241 | }
|
---|
1242 |
|
---|
1243 | if (DEBUGLEVEL >= 10) {
|
---|
1244 | NDR_PRINT_IN_DEBUG(PNP_CreateKey, r);
|
---|
1245 | }
|
---|
1246 |
|
---|
1247 | r->out.result = _PNP_CreateKey(p, r);
|
---|
1248 |
|
---|
1249 | if (p->rng_fault_state) {
|
---|
1250 | talloc_free(r);
|
---|
1251 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1252 | return true;
|
---|
1253 | }
|
---|
1254 |
|
---|
1255 | if (DEBUGLEVEL >= 10) {
|
---|
1256 | NDR_PRINT_OUT_DEBUG(PNP_CreateKey, r);
|
---|
1257 | }
|
---|
1258 |
|
---|
1259 | push = ndr_push_init_ctx(r, NULL);
|
---|
1260 | if (push == NULL) {
|
---|
1261 | talloc_free(r);
|
---|
1262 | return false;
|
---|
1263 | }
|
---|
1264 |
|
---|
1265 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1266 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1267 | talloc_free(r);
|
---|
1268 | return false;
|
---|
1269 | }
|
---|
1270 |
|
---|
1271 | blob = ndr_push_blob(push);
|
---|
1272 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1273 | talloc_free(r);
|
---|
1274 | return false;
|
---|
1275 | }
|
---|
1276 |
|
---|
1277 | talloc_free(r);
|
---|
1278 |
|
---|
1279 | return true;
|
---|
1280 | }
|
---|
1281 |
|
---|
1282 | static bool api_PNP_DeleteRegistryKey(pipes_struct *p)
|
---|
1283 | {
|
---|
1284 | const struct ndr_interface_call *call;
|
---|
1285 | struct ndr_pull *pull;
|
---|
1286 | struct ndr_push *push;
|
---|
1287 | enum ndr_err_code ndr_err;
|
---|
1288 | DATA_BLOB blob;
|
---|
1289 | struct PNP_DeleteRegistryKey *r;
|
---|
1290 |
|
---|
1291 | call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETEREGISTRYKEY];
|
---|
1292 |
|
---|
1293 | r = talloc(talloc_tos(), struct PNP_DeleteRegistryKey);
|
---|
1294 | if (r == NULL) {
|
---|
1295 | return false;
|
---|
1296 | }
|
---|
1297 |
|
---|
1298 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1299 | talloc_free(r);
|
---|
1300 | return false;
|
---|
1301 | }
|
---|
1302 |
|
---|
1303 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1304 | if (pull == NULL) {
|
---|
1305 | talloc_free(r);
|
---|
1306 | return false;
|
---|
1307 | }
|
---|
1308 |
|
---|
1309 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1310 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1311 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1312 | talloc_free(r);
|
---|
1313 | return false;
|
---|
1314 | }
|
---|
1315 |
|
---|
1316 | if (DEBUGLEVEL >= 10) {
|
---|
1317 | NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, r);
|
---|
1318 | }
|
---|
1319 |
|
---|
1320 | r->out.result = _PNP_DeleteRegistryKey(p, r);
|
---|
1321 |
|
---|
1322 | if (p->rng_fault_state) {
|
---|
1323 | talloc_free(r);
|
---|
1324 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1325 | return true;
|
---|
1326 | }
|
---|
1327 |
|
---|
1328 | if (DEBUGLEVEL >= 10) {
|
---|
1329 | NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, r);
|
---|
1330 | }
|
---|
1331 |
|
---|
1332 | push = ndr_push_init_ctx(r, NULL);
|
---|
1333 | if (push == NULL) {
|
---|
1334 | talloc_free(r);
|
---|
1335 | return false;
|
---|
1336 | }
|
---|
1337 |
|
---|
1338 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1339 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1340 | talloc_free(r);
|
---|
1341 | return false;
|
---|
1342 | }
|
---|
1343 |
|
---|
1344 | blob = ndr_push_blob(push);
|
---|
1345 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1346 | talloc_free(r);
|
---|
1347 | return false;
|
---|
1348 | }
|
---|
1349 |
|
---|
1350 | talloc_free(r);
|
---|
1351 |
|
---|
1352 | return true;
|
---|
1353 | }
|
---|
1354 |
|
---|
1355 | static bool api_PNP_GetClassCount(pipes_struct *p)
|
---|
1356 | {
|
---|
1357 | const struct ndr_interface_call *call;
|
---|
1358 | struct ndr_pull *pull;
|
---|
1359 | struct ndr_push *push;
|
---|
1360 | enum ndr_err_code ndr_err;
|
---|
1361 | DATA_BLOB blob;
|
---|
1362 | struct PNP_GetClassCount *r;
|
---|
1363 |
|
---|
1364 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSCOUNT];
|
---|
1365 |
|
---|
1366 | r = talloc(talloc_tos(), struct PNP_GetClassCount);
|
---|
1367 | if (r == NULL) {
|
---|
1368 | return false;
|
---|
1369 | }
|
---|
1370 |
|
---|
1371 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1372 | talloc_free(r);
|
---|
1373 | return false;
|
---|
1374 | }
|
---|
1375 |
|
---|
1376 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1377 | if (pull == NULL) {
|
---|
1378 | talloc_free(r);
|
---|
1379 | return false;
|
---|
1380 | }
|
---|
1381 |
|
---|
1382 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1383 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1384 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1385 | talloc_free(r);
|
---|
1386 | return false;
|
---|
1387 | }
|
---|
1388 |
|
---|
1389 | if (DEBUGLEVEL >= 10) {
|
---|
1390 | NDR_PRINT_IN_DEBUG(PNP_GetClassCount, r);
|
---|
1391 | }
|
---|
1392 |
|
---|
1393 | r->out.result = _PNP_GetClassCount(p, r);
|
---|
1394 |
|
---|
1395 | if (p->rng_fault_state) {
|
---|
1396 | talloc_free(r);
|
---|
1397 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1398 | return true;
|
---|
1399 | }
|
---|
1400 |
|
---|
1401 | if (DEBUGLEVEL >= 10) {
|
---|
1402 | NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, r);
|
---|
1403 | }
|
---|
1404 |
|
---|
1405 | push = ndr_push_init_ctx(r, NULL);
|
---|
1406 | if (push == NULL) {
|
---|
1407 | talloc_free(r);
|
---|
1408 | return false;
|
---|
1409 | }
|
---|
1410 |
|
---|
1411 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1412 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1413 | talloc_free(r);
|
---|
1414 | return false;
|
---|
1415 | }
|
---|
1416 |
|
---|
1417 | blob = ndr_push_blob(push);
|
---|
1418 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1419 | talloc_free(r);
|
---|
1420 | return false;
|
---|
1421 | }
|
---|
1422 |
|
---|
1423 | talloc_free(r);
|
---|
1424 |
|
---|
1425 | return true;
|
---|
1426 | }
|
---|
1427 |
|
---|
1428 | static bool api_PNP_GetClassName(pipes_struct *p)
|
---|
1429 | {
|
---|
1430 | const struct ndr_interface_call *call;
|
---|
1431 | struct ndr_pull *pull;
|
---|
1432 | struct ndr_push *push;
|
---|
1433 | enum ndr_err_code ndr_err;
|
---|
1434 | DATA_BLOB blob;
|
---|
1435 | struct PNP_GetClassName *r;
|
---|
1436 |
|
---|
1437 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSNAME];
|
---|
1438 |
|
---|
1439 | r = talloc(talloc_tos(), struct PNP_GetClassName);
|
---|
1440 | if (r == NULL) {
|
---|
1441 | return false;
|
---|
1442 | }
|
---|
1443 |
|
---|
1444 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1445 | talloc_free(r);
|
---|
1446 | return false;
|
---|
1447 | }
|
---|
1448 |
|
---|
1449 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1450 | if (pull == NULL) {
|
---|
1451 | talloc_free(r);
|
---|
1452 | return false;
|
---|
1453 | }
|
---|
1454 |
|
---|
1455 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1456 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1457 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1458 | talloc_free(r);
|
---|
1459 | return false;
|
---|
1460 | }
|
---|
1461 |
|
---|
1462 | if (DEBUGLEVEL >= 10) {
|
---|
1463 | NDR_PRINT_IN_DEBUG(PNP_GetClassName, r);
|
---|
1464 | }
|
---|
1465 |
|
---|
1466 | r->out.result = _PNP_GetClassName(p, r);
|
---|
1467 |
|
---|
1468 | if (p->rng_fault_state) {
|
---|
1469 | talloc_free(r);
|
---|
1470 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1471 | return true;
|
---|
1472 | }
|
---|
1473 |
|
---|
1474 | if (DEBUGLEVEL >= 10) {
|
---|
1475 | NDR_PRINT_OUT_DEBUG(PNP_GetClassName, r);
|
---|
1476 | }
|
---|
1477 |
|
---|
1478 | push = ndr_push_init_ctx(r, NULL);
|
---|
1479 | if (push == NULL) {
|
---|
1480 | talloc_free(r);
|
---|
1481 | return false;
|
---|
1482 | }
|
---|
1483 |
|
---|
1484 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1485 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1486 | talloc_free(r);
|
---|
1487 | return false;
|
---|
1488 | }
|
---|
1489 |
|
---|
1490 | blob = ndr_push_blob(push);
|
---|
1491 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1492 | talloc_free(r);
|
---|
1493 | return false;
|
---|
1494 | }
|
---|
1495 |
|
---|
1496 | talloc_free(r);
|
---|
1497 |
|
---|
1498 | return true;
|
---|
1499 | }
|
---|
1500 |
|
---|
1501 | static bool api_PNP_DeleteClassKey(pipes_struct *p)
|
---|
1502 | {
|
---|
1503 | const struct ndr_interface_call *call;
|
---|
1504 | struct ndr_pull *pull;
|
---|
1505 | struct ndr_push *push;
|
---|
1506 | enum ndr_err_code ndr_err;
|
---|
1507 | DATA_BLOB blob;
|
---|
1508 | struct PNP_DeleteClassKey *r;
|
---|
1509 |
|
---|
1510 | call = &ndr_table_ntsvcs.calls[NDR_PNP_DELETECLASSKEY];
|
---|
1511 |
|
---|
1512 | r = talloc(talloc_tos(), struct PNP_DeleteClassKey);
|
---|
1513 | if (r == NULL) {
|
---|
1514 | return false;
|
---|
1515 | }
|
---|
1516 |
|
---|
1517 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1518 | talloc_free(r);
|
---|
1519 | return false;
|
---|
1520 | }
|
---|
1521 |
|
---|
1522 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1523 | if (pull == NULL) {
|
---|
1524 | talloc_free(r);
|
---|
1525 | return false;
|
---|
1526 | }
|
---|
1527 |
|
---|
1528 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1529 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1530 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1531 | talloc_free(r);
|
---|
1532 | return false;
|
---|
1533 | }
|
---|
1534 |
|
---|
1535 | if (DEBUGLEVEL >= 10) {
|
---|
1536 | NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, r);
|
---|
1537 | }
|
---|
1538 |
|
---|
1539 | r->out.result = _PNP_DeleteClassKey(p, r);
|
---|
1540 |
|
---|
1541 | if (p->rng_fault_state) {
|
---|
1542 | talloc_free(r);
|
---|
1543 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1544 | return true;
|
---|
1545 | }
|
---|
1546 |
|
---|
1547 | if (DEBUGLEVEL >= 10) {
|
---|
1548 | NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, r);
|
---|
1549 | }
|
---|
1550 |
|
---|
1551 | push = ndr_push_init_ctx(r, NULL);
|
---|
1552 | if (push == NULL) {
|
---|
1553 | talloc_free(r);
|
---|
1554 | return false;
|
---|
1555 | }
|
---|
1556 |
|
---|
1557 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1558 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1559 | talloc_free(r);
|
---|
1560 | return false;
|
---|
1561 | }
|
---|
1562 |
|
---|
1563 | blob = ndr_push_blob(push);
|
---|
1564 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1565 | talloc_free(r);
|
---|
1566 | return false;
|
---|
1567 | }
|
---|
1568 |
|
---|
1569 | talloc_free(r);
|
---|
1570 |
|
---|
1571 | return true;
|
---|
1572 | }
|
---|
1573 |
|
---|
1574 | static bool api_PNP_GetInterfaceDeviceAlias(pipes_struct *p)
|
---|
1575 | {
|
---|
1576 | const struct ndr_interface_call *call;
|
---|
1577 | struct ndr_pull *pull;
|
---|
1578 | struct ndr_push *push;
|
---|
1579 | enum ndr_err_code ndr_err;
|
---|
1580 | DATA_BLOB blob;
|
---|
1581 | struct PNP_GetInterfaceDeviceAlias *r;
|
---|
1582 |
|
---|
1583 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICEALIAS];
|
---|
1584 |
|
---|
1585 | r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceAlias);
|
---|
1586 | if (r == NULL) {
|
---|
1587 | return false;
|
---|
1588 | }
|
---|
1589 |
|
---|
1590 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1591 | talloc_free(r);
|
---|
1592 | return false;
|
---|
1593 | }
|
---|
1594 |
|
---|
1595 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1596 | if (pull == NULL) {
|
---|
1597 | talloc_free(r);
|
---|
1598 | return false;
|
---|
1599 | }
|
---|
1600 |
|
---|
1601 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1602 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1603 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1604 | talloc_free(r);
|
---|
1605 | return false;
|
---|
1606 | }
|
---|
1607 |
|
---|
1608 | if (DEBUGLEVEL >= 10) {
|
---|
1609 | NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, r);
|
---|
1610 | }
|
---|
1611 |
|
---|
1612 | r->out.result = _PNP_GetInterfaceDeviceAlias(p, r);
|
---|
1613 |
|
---|
1614 | if (p->rng_fault_state) {
|
---|
1615 | talloc_free(r);
|
---|
1616 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1617 | return true;
|
---|
1618 | }
|
---|
1619 |
|
---|
1620 | if (DEBUGLEVEL >= 10) {
|
---|
1621 | NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, r);
|
---|
1622 | }
|
---|
1623 |
|
---|
1624 | push = ndr_push_init_ctx(r, NULL);
|
---|
1625 | if (push == NULL) {
|
---|
1626 | talloc_free(r);
|
---|
1627 | return false;
|
---|
1628 | }
|
---|
1629 |
|
---|
1630 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1631 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1632 | talloc_free(r);
|
---|
1633 | return false;
|
---|
1634 | }
|
---|
1635 |
|
---|
1636 | blob = ndr_push_blob(push);
|
---|
1637 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1638 | talloc_free(r);
|
---|
1639 | return false;
|
---|
1640 | }
|
---|
1641 |
|
---|
1642 | talloc_free(r);
|
---|
1643 |
|
---|
1644 | return true;
|
---|
1645 | }
|
---|
1646 |
|
---|
1647 | static bool api_PNP_GetInterfaceDeviceList(pipes_struct *p)
|
---|
1648 | {
|
---|
1649 | const struct ndr_interface_call *call;
|
---|
1650 | struct ndr_pull *pull;
|
---|
1651 | struct ndr_push *push;
|
---|
1652 | enum ndr_err_code ndr_err;
|
---|
1653 | DATA_BLOB blob;
|
---|
1654 | struct PNP_GetInterfaceDeviceList *r;
|
---|
1655 |
|
---|
1656 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELIST];
|
---|
1657 |
|
---|
1658 | r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceList);
|
---|
1659 | if (r == NULL) {
|
---|
1660 | return false;
|
---|
1661 | }
|
---|
1662 |
|
---|
1663 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1664 | talloc_free(r);
|
---|
1665 | return false;
|
---|
1666 | }
|
---|
1667 |
|
---|
1668 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1669 | if (pull == NULL) {
|
---|
1670 | talloc_free(r);
|
---|
1671 | return false;
|
---|
1672 | }
|
---|
1673 |
|
---|
1674 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1675 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1676 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1677 | talloc_free(r);
|
---|
1678 | return false;
|
---|
1679 | }
|
---|
1680 |
|
---|
1681 | if (DEBUGLEVEL >= 10) {
|
---|
1682 | NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, r);
|
---|
1683 | }
|
---|
1684 |
|
---|
1685 | r->out.result = _PNP_GetInterfaceDeviceList(p, r);
|
---|
1686 |
|
---|
1687 | if (p->rng_fault_state) {
|
---|
1688 | talloc_free(r);
|
---|
1689 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1690 | return true;
|
---|
1691 | }
|
---|
1692 |
|
---|
1693 | if (DEBUGLEVEL >= 10) {
|
---|
1694 | NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, r);
|
---|
1695 | }
|
---|
1696 |
|
---|
1697 | push = ndr_push_init_ctx(r, NULL);
|
---|
1698 | if (push == NULL) {
|
---|
1699 | talloc_free(r);
|
---|
1700 | return false;
|
---|
1701 | }
|
---|
1702 |
|
---|
1703 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1704 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1705 | talloc_free(r);
|
---|
1706 | return false;
|
---|
1707 | }
|
---|
1708 |
|
---|
1709 | blob = ndr_push_blob(push);
|
---|
1710 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1711 | talloc_free(r);
|
---|
1712 | return false;
|
---|
1713 | }
|
---|
1714 |
|
---|
1715 | talloc_free(r);
|
---|
1716 |
|
---|
1717 | return true;
|
---|
1718 | }
|
---|
1719 |
|
---|
1720 | static bool api_PNP_GetInterfaceDeviceListSize(pipes_struct *p)
|
---|
1721 | {
|
---|
1722 | const struct ndr_interface_call *call;
|
---|
1723 | struct ndr_pull *pull;
|
---|
1724 | struct ndr_push *push;
|
---|
1725 | enum ndr_err_code ndr_err;
|
---|
1726 | DATA_BLOB blob;
|
---|
1727 | struct PNP_GetInterfaceDeviceListSize *r;
|
---|
1728 |
|
---|
1729 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETINTERFACEDEVICELISTSIZE];
|
---|
1730 |
|
---|
1731 | r = talloc(talloc_tos(), struct PNP_GetInterfaceDeviceListSize);
|
---|
1732 | if (r == NULL) {
|
---|
1733 | return false;
|
---|
1734 | }
|
---|
1735 |
|
---|
1736 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1737 | talloc_free(r);
|
---|
1738 | return false;
|
---|
1739 | }
|
---|
1740 |
|
---|
1741 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1742 | if (pull == NULL) {
|
---|
1743 | talloc_free(r);
|
---|
1744 | return false;
|
---|
1745 | }
|
---|
1746 |
|
---|
1747 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1748 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1749 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1750 | talloc_free(r);
|
---|
1751 | return false;
|
---|
1752 | }
|
---|
1753 |
|
---|
1754 | if (DEBUGLEVEL >= 10) {
|
---|
1755 | NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, r);
|
---|
1756 | }
|
---|
1757 |
|
---|
1758 | r->out.result = _PNP_GetInterfaceDeviceListSize(p, r);
|
---|
1759 |
|
---|
1760 | if (p->rng_fault_state) {
|
---|
1761 | talloc_free(r);
|
---|
1762 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1763 | return true;
|
---|
1764 | }
|
---|
1765 |
|
---|
1766 | if (DEBUGLEVEL >= 10) {
|
---|
1767 | NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, r);
|
---|
1768 | }
|
---|
1769 |
|
---|
1770 | push = ndr_push_init_ctx(r, NULL);
|
---|
1771 | if (push == NULL) {
|
---|
1772 | talloc_free(r);
|
---|
1773 | return false;
|
---|
1774 | }
|
---|
1775 |
|
---|
1776 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1777 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1778 | talloc_free(r);
|
---|
1779 | return false;
|
---|
1780 | }
|
---|
1781 |
|
---|
1782 | blob = ndr_push_blob(push);
|
---|
1783 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1784 | talloc_free(r);
|
---|
1785 | return false;
|
---|
1786 | }
|
---|
1787 |
|
---|
1788 | talloc_free(r);
|
---|
1789 |
|
---|
1790 | return true;
|
---|
1791 | }
|
---|
1792 |
|
---|
1793 | static bool api_PNP_RegisterDeviceClassAssociation(pipes_struct *p)
|
---|
1794 | {
|
---|
1795 | const struct ndr_interface_call *call;
|
---|
1796 | struct ndr_pull *pull;
|
---|
1797 | struct ndr_push *push;
|
---|
1798 | enum ndr_err_code ndr_err;
|
---|
1799 | DATA_BLOB blob;
|
---|
1800 | struct PNP_RegisterDeviceClassAssociation *r;
|
---|
1801 |
|
---|
1802 | call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDEVICECLASSASSOCIATION];
|
---|
1803 |
|
---|
1804 | r = talloc(talloc_tos(), struct PNP_RegisterDeviceClassAssociation);
|
---|
1805 | if (r == NULL) {
|
---|
1806 | return false;
|
---|
1807 | }
|
---|
1808 |
|
---|
1809 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1810 | talloc_free(r);
|
---|
1811 | return false;
|
---|
1812 | }
|
---|
1813 |
|
---|
1814 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1815 | if (pull == NULL) {
|
---|
1816 | talloc_free(r);
|
---|
1817 | return false;
|
---|
1818 | }
|
---|
1819 |
|
---|
1820 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1821 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1822 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1823 | talloc_free(r);
|
---|
1824 | return false;
|
---|
1825 | }
|
---|
1826 |
|
---|
1827 | if (DEBUGLEVEL >= 10) {
|
---|
1828 | NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, r);
|
---|
1829 | }
|
---|
1830 |
|
---|
1831 | r->out.result = _PNP_RegisterDeviceClassAssociation(p, r);
|
---|
1832 |
|
---|
1833 | if (p->rng_fault_state) {
|
---|
1834 | talloc_free(r);
|
---|
1835 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1836 | return true;
|
---|
1837 | }
|
---|
1838 |
|
---|
1839 | if (DEBUGLEVEL >= 10) {
|
---|
1840 | NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, r);
|
---|
1841 | }
|
---|
1842 |
|
---|
1843 | push = ndr_push_init_ctx(r, NULL);
|
---|
1844 | if (push == NULL) {
|
---|
1845 | talloc_free(r);
|
---|
1846 | return false;
|
---|
1847 | }
|
---|
1848 |
|
---|
1849 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1850 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1851 | talloc_free(r);
|
---|
1852 | return false;
|
---|
1853 | }
|
---|
1854 |
|
---|
1855 | blob = ndr_push_blob(push);
|
---|
1856 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1857 | talloc_free(r);
|
---|
1858 | return false;
|
---|
1859 | }
|
---|
1860 |
|
---|
1861 | talloc_free(r);
|
---|
1862 |
|
---|
1863 | return true;
|
---|
1864 | }
|
---|
1865 |
|
---|
1866 | static bool api_PNP_UnregisterDeviceClassAssociation(pipes_struct *p)
|
---|
1867 | {
|
---|
1868 | const struct ndr_interface_call *call;
|
---|
1869 | struct ndr_pull *pull;
|
---|
1870 | struct ndr_push *push;
|
---|
1871 | enum ndr_err_code ndr_err;
|
---|
1872 | DATA_BLOB blob;
|
---|
1873 | struct PNP_UnregisterDeviceClassAssociation *r;
|
---|
1874 |
|
---|
1875 | call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION];
|
---|
1876 |
|
---|
1877 | r = talloc(talloc_tos(), struct PNP_UnregisterDeviceClassAssociation);
|
---|
1878 | if (r == NULL) {
|
---|
1879 | return false;
|
---|
1880 | }
|
---|
1881 |
|
---|
1882 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1883 | talloc_free(r);
|
---|
1884 | return false;
|
---|
1885 | }
|
---|
1886 |
|
---|
1887 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1888 | if (pull == NULL) {
|
---|
1889 | talloc_free(r);
|
---|
1890 | return false;
|
---|
1891 | }
|
---|
1892 |
|
---|
1893 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1894 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1895 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1896 | talloc_free(r);
|
---|
1897 | return false;
|
---|
1898 | }
|
---|
1899 |
|
---|
1900 | if (DEBUGLEVEL >= 10) {
|
---|
1901 | NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
|
---|
1902 | }
|
---|
1903 |
|
---|
1904 | r->out.result = _PNP_UnregisterDeviceClassAssociation(p, r);
|
---|
1905 |
|
---|
1906 | if (p->rng_fault_state) {
|
---|
1907 | talloc_free(r);
|
---|
1908 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1909 | return true;
|
---|
1910 | }
|
---|
1911 |
|
---|
1912 | if (DEBUGLEVEL >= 10) {
|
---|
1913 | NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, r);
|
---|
1914 | }
|
---|
1915 |
|
---|
1916 | push = ndr_push_init_ctx(r, NULL);
|
---|
1917 | if (push == NULL) {
|
---|
1918 | talloc_free(r);
|
---|
1919 | return false;
|
---|
1920 | }
|
---|
1921 |
|
---|
1922 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1923 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1924 | talloc_free(r);
|
---|
1925 | return false;
|
---|
1926 | }
|
---|
1927 |
|
---|
1928 | blob = ndr_push_blob(push);
|
---|
1929 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
1930 | talloc_free(r);
|
---|
1931 | return false;
|
---|
1932 | }
|
---|
1933 |
|
---|
1934 | talloc_free(r);
|
---|
1935 |
|
---|
1936 | return true;
|
---|
1937 | }
|
---|
1938 |
|
---|
1939 | static bool api_PNP_GetClassRegProp(pipes_struct *p)
|
---|
1940 | {
|
---|
1941 | const struct ndr_interface_call *call;
|
---|
1942 | struct ndr_pull *pull;
|
---|
1943 | struct ndr_push *push;
|
---|
1944 | enum ndr_err_code ndr_err;
|
---|
1945 | DATA_BLOB blob;
|
---|
1946 | struct PNP_GetClassRegProp *r;
|
---|
1947 |
|
---|
1948 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCLASSREGPROP];
|
---|
1949 |
|
---|
1950 | r = talloc(talloc_tos(), struct PNP_GetClassRegProp);
|
---|
1951 | if (r == NULL) {
|
---|
1952 | return false;
|
---|
1953 | }
|
---|
1954 |
|
---|
1955 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
1956 | talloc_free(r);
|
---|
1957 | return false;
|
---|
1958 | }
|
---|
1959 |
|
---|
1960 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
1961 | if (pull == NULL) {
|
---|
1962 | talloc_free(r);
|
---|
1963 | return false;
|
---|
1964 | }
|
---|
1965 |
|
---|
1966 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
1967 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
1968 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1969 | talloc_free(r);
|
---|
1970 | return false;
|
---|
1971 | }
|
---|
1972 |
|
---|
1973 | if (DEBUGLEVEL >= 10) {
|
---|
1974 | NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, r);
|
---|
1975 | }
|
---|
1976 |
|
---|
1977 | r->out.result = _PNP_GetClassRegProp(p, r);
|
---|
1978 |
|
---|
1979 | if (p->rng_fault_state) {
|
---|
1980 | talloc_free(r);
|
---|
1981 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
1982 | return true;
|
---|
1983 | }
|
---|
1984 |
|
---|
1985 | if (DEBUGLEVEL >= 10) {
|
---|
1986 | NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, r);
|
---|
1987 | }
|
---|
1988 |
|
---|
1989 | push = ndr_push_init_ctx(r, NULL);
|
---|
1990 | if (push == NULL) {
|
---|
1991 | talloc_free(r);
|
---|
1992 | return false;
|
---|
1993 | }
|
---|
1994 |
|
---|
1995 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
1996 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
1997 | talloc_free(r);
|
---|
1998 | return false;
|
---|
1999 | }
|
---|
2000 |
|
---|
2001 | blob = ndr_push_blob(push);
|
---|
2002 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2003 | talloc_free(r);
|
---|
2004 | return false;
|
---|
2005 | }
|
---|
2006 |
|
---|
2007 | talloc_free(r);
|
---|
2008 |
|
---|
2009 | return true;
|
---|
2010 | }
|
---|
2011 |
|
---|
2012 | static bool api_PNP_SetClassRegProp(pipes_struct *p)
|
---|
2013 | {
|
---|
2014 | const struct ndr_interface_call *call;
|
---|
2015 | struct ndr_pull *pull;
|
---|
2016 | struct ndr_push *push;
|
---|
2017 | enum ndr_err_code ndr_err;
|
---|
2018 | DATA_BLOB blob;
|
---|
2019 | struct PNP_SetClassRegProp *r;
|
---|
2020 |
|
---|
2021 | call = &ndr_table_ntsvcs.calls[NDR_PNP_SETCLASSREGPROP];
|
---|
2022 |
|
---|
2023 | r = talloc(talloc_tos(), struct PNP_SetClassRegProp);
|
---|
2024 | if (r == NULL) {
|
---|
2025 | return false;
|
---|
2026 | }
|
---|
2027 |
|
---|
2028 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2029 | talloc_free(r);
|
---|
2030 | return false;
|
---|
2031 | }
|
---|
2032 |
|
---|
2033 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2034 | if (pull == NULL) {
|
---|
2035 | talloc_free(r);
|
---|
2036 | return false;
|
---|
2037 | }
|
---|
2038 |
|
---|
2039 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2040 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2041 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2042 | talloc_free(r);
|
---|
2043 | return false;
|
---|
2044 | }
|
---|
2045 |
|
---|
2046 | if (DEBUGLEVEL >= 10) {
|
---|
2047 | NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, r);
|
---|
2048 | }
|
---|
2049 |
|
---|
2050 | r->out.result = _PNP_SetClassRegProp(p, r);
|
---|
2051 |
|
---|
2052 | if (p->rng_fault_state) {
|
---|
2053 | talloc_free(r);
|
---|
2054 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2055 | return true;
|
---|
2056 | }
|
---|
2057 |
|
---|
2058 | if (DEBUGLEVEL >= 10) {
|
---|
2059 | NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, r);
|
---|
2060 | }
|
---|
2061 |
|
---|
2062 | push = ndr_push_init_ctx(r, NULL);
|
---|
2063 | if (push == NULL) {
|
---|
2064 | talloc_free(r);
|
---|
2065 | return false;
|
---|
2066 | }
|
---|
2067 |
|
---|
2068 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2069 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2070 | talloc_free(r);
|
---|
2071 | return false;
|
---|
2072 | }
|
---|
2073 |
|
---|
2074 | blob = ndr_push_blob(push);
|
---|
2075 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2076 | talloc_free(r);
|
---|
2077 | return false;
|
---|
2078 | }
|
---|
2079 |
|
---|
2080 | talloc_free(r);
|
---|
2081 |
|
---|
2082 | return true;
|
---|
2083 | }
|
---|
2084 |
|
---|
2085 | static bool api_PNP_CreateDevInst(pipes_struct *p)
|
---|
2086 | {
|
---|
2087 | const struct ndr_interface_call *call;
|
---|
2088 | struct ndr_pull *pull;
|
---|
2089 | struct ndr_push *push;
|
---|
2090 | enum ndr_err_code ndr_err;
|
---|
2091 | DATA_BLOB blob;
|
---|
2092 | struct PNP_CreateDevInst *r;
|
---|
2093 |
|
---|
2094 | call = &ndr_table_ntsvcs.calls[NDR_PNP_CREATEDEVINST];
|
---|
2095 |
|
---|
2096 | r = talloc(talloc_tos(), struct PNP_CreateDevInst);
|
---|
2097 | if (r == NULL) {
|
---|
2098 | return false;
|
---|
2099 | }
|
---|
2100 |
|
---|
2101 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2102 | talloc_free(r);
|
---|
2103 | return false;
|
---|
2104 | }
|
---|
2105 |
|
---|
2106 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2107 | if (pull == NULL) {
|
---|
2108 | talloc_free(r);
|
---|
2109 | return false;
|
---|
2110 | }
|
---|
2111 |
|
---|
2112 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2113 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2114 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2115 | talloc_free(r);
|
---|
2116 | return false;
|
---|
2117 | }
|
---|
2118 |
|
---|
2119 | if (DEBUGLEVEL >= 10) {
|
---|
2120 | NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, r);
|
---|
2121 | }
|
---|
2122 |
|
---|
2123 | r->out.result = _PNP_CreateDevInst(p, r);
|
---|
2124 |
|
---|
2125 | if (p->rng_fault_state) {
|
---|
2126 | talloc_free(r);
|
---|
2127 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2128 | return true;
|
---|
2129 | }
|
---|
2130 |
|
---|
2131 | if (DEBUGLEVEL >= 10) {
|
---|
2132 | NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, r);
|
---|
2133 | }
|
---|
2134 |
|
---|
2135 | push = ndr_push_init_ctx(r, NULL);
|
---|
2136 | if (push == NULL) {
|
---|
2137 | talloc_free(r);
|
---|
2138 | return false;
|
---|
2139 | }
|
---|
2140 |
|
---|
2141 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2142 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2143 | talloc_free(r);
|
---|
2144 | return false;
|
---|
2145 | }
|
---|
2146 |
|
---|
2147 | blob = ndr_push_blob(push);
|
---|
2148 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2149 | talloc_free(r);
|
---|
2150 | return false;
|
---|
2151 | }
|
---|
2152 |
|
---|
2153 | talloc_free(r);
|
---|
2154 |
|
---|
2155 | return true;
|
---|
2156 | }
|
---|
2157 |
|
---|
2158 | static bool api_PNP_DeviceInstanceAction(pipes_struct *p)
|
---|
2159 | {
|
---|
2160 | const struct ndr_interface_call *call;
|
---|
2161 | struct ndr_pull *pull;
|
---|
2162 | struct ndr_push *push;
|
---|
2163 | enum ndr_err_code ndr_err;
|
---|
2164 | DATA_BLOB blob;
|
---|
2165 | struct PNP_DeviceInstanceAction *r;
|
---|
2166 |
|
---|
2167 | call = &ndr_table_ntsvcs.calls[NDR_PNP_DEVICEINSTANCEACTION];
|
---|
2168 |
|
---|
2169 | r = talloc(talloc_tos(), struct PNP_DeviceInstanceAction);
|
---|
2170 | if (r == NULL) {
|
---|
2171 | return false;
|
---|
2172 | }
|
---|
2173 |
|
---|
2174 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2175 | talloc_free(r);
|
---|
2176 | return false;
|
---|
2177 | }
|
---|
2178 |
|
---|
2179 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2180 | if (pull == NULL) {
|
---|
2181 | talloc_free(r);
|
---|
2182 | return false;
|
---|
2183 | }
|
---|
2184 |
|
---|
2185 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2186 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2187 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2188 | talloc_free(r);
|
---|
2189 | return false;
|
---|
2190 | }
|
---|
2191 |
|
---|
2192 | if (DEBUGLEVEL >= 10) {
|
---|
2193 | NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, r);
|
---|
2194 | }
|
---|
2195 |
|
---|
2196 | r->out.result = _PNP_DeviceInstanceAction(p, r);
|
---|
2197 |
|
---|
2198 | if (p->rng_fault_state) {
|
---|
2199 | talloc_free(r);
|
---|
2200 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2201 | return true;
|
---|
2202 | }
|
---|
2203 |
|
---|
2204 | if (DEBUGLEVEL >= 10) {
|
---|
2205 | NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, r);
|
---|
2206 | }
|
---|
2207 |
|
---|
2208 | push = ndr_push_init_ctx(r, NULL);
|
---|
2209 | if (push == NULL) {
|
---|
2210 | talloc_free(r);
|
---|
2211 | return false;
|
---|
2212 | }
|
---|
2213 |
|
---|
2214 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2215 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2216 | talloc_free(r);
|
---|
2217 | return false;
|
---|
2218 | }
|
---|
2219 |
|
---|
2220 | blob = ndr_push_blob(push);
|
---|
2221 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2222 | talloc_free(r);
|
---|
2223 | return false;
|
---|
2224 | }
|
---|
2225 |
|
---|
2226 | talloc_free(r);
|
---|
2227 |
|
---|
2228 | return true;
|
---|
2229 | }
|
---|
2230 |
|
---|
2231 | static bool api_PNP_GetDeviceStatus(pipes_struct *p)
|
---|
2232 | {
|
---|
2233 | const struct ndr_interface_call *call;
|
---|
2234 | struct ndr_pull *pull;
|
---|
2235 | struct ndr_push *push;
|
---|
2236 | enum ndr_err_code ndr_err;
|
---|
2237 | DATA_BLOB blob;
|
---|
2238 | struct PNP_GetDeviceStatus *r;
|
---|
2239 |
|
---|
2240 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETDEVICESTATUS];
|
---|
2241 |
|
---|
2242 | r = talloc(talloc_tos(), struct PNP_GetDeviceStatus);
|
---|
2243 | if (r == NULL) {
|
---|
2244 | return false;
|
---|
2245 | }
|
---|
2246 |
|
---|
2247 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2248 | talloc_free(r);
|
---|
2249 | return false;
|
---|
2250 | }
|
---|
2251 |
|
---|
2252 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2253 | if (pull == NULL) {
|
---|
2254 | talloc_free(r);
|
---|
2255 | return false;
|
---|
2256 | }
|
---|
2257 |
|
---|
2258 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2259 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2260 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2261 | talloc_free(r);
|
---|
2262 | return false;
|
---|
2263 | }
|
---|
2264 |
|
---|
2265 | if (DEBUGLEVEL >= 10) {
|
---|
2266 | NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, r);
|
---|
2267 | }
|
---|
2268 |
|
---|
2269 | r->out.result = _PNP_GetDeviceStatus(p, r);
|
---|
2270 |
|
---|
2271 | if (p->rng_fault_state) {
|
---|
2272 | talloc_free(r);
|
---|
2273 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2274 | return true;
|
---|
2275 | }
|
---|
2276 |
|
---|
2277 | if (DEBUGLEVEL >= 10) {
|
---|
2278 | NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, r);
|
---|
2279 | }
|
---|
2280 |
|
---|
2281 | push = ndr_push_init_ctx(r, NULL);
|
---|
2282 | if (push == NULL) {
|
---|
2283 | talloc_free(r);
|
---|
2284 | return false;
|
---|
2285 | }
|
---|
2286 |
|
---|
2287 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2288 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2289 | talloc_free(r);
|
---|
2290 | return false;
|
---|
2291 | }
|
---|
2292 |
|
---|
2293 | blob = ndr_push_blob(push);
|
---|
2294 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2295 | talloc_free(r);
|
---|
2296 | return false;
|
---|
2297 | }
|
---|
2298 |
|
---|
2299 | talloc_free(r);
|
---|
2300 |
|
---|
2301 | return true;
|
---|
2302 | }
|
---|
2303 |
|
---|
2304 | static bool api_PNP_SetDeviceProblem(pipes_struct *p)
|
---|
2305 | {
|
---|
2306 | const struct ndr_interface_call *call;
|
---|
2307 | struct ndr_pull *pull;
|
---|
2308 | struct ndr_push *push;
|
---|
2309 | enum ndr_err_code ndr_err;
|
---|
2310 | DATA_BLOB blob;
|
---|
2311 | struct PNP_SetDeviceProblem *r;
|
---|
2312 |
|
---|
2313 | call = &ndr_table_ntsvcs.calls[NDR_PNP_SETDEVICEPROBLEM];
|
---|
2314 |
|
---|
2315 | r = talloc(talloc_tos(), struct PNP_SetDeviceProblem);
|
---|
2316 | if (r == NULL) {
|
---|
2317 | return false;
|
---|
2318 | }
|
---|
2319 |
|
---|
2320 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2321 | talloc_free(r);
|
---|
2322 | return false;
|
---|
2323 | }
|
---|
2324 |
|
---|
2325 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2326 | if (pull == NULL) {
|
---|
2327 | talloc_free(r);
|
---|
2328 | return false;
|
---|
2329 | }
|
---|
2330 |
|
---|
2331 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2332 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2333 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2334 | talloc_free(r);
|
---|
2335 | return false;
|
---|
2336 | }
|
---|
2337 |
|
---|
2338 | if (DEBUGLEVEL >= 10) {
|
---|
2339 | NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, r);
|
---|
2340 | }
|
---|
2341 |
|
---|
2342 | r->out.result = _PNP_SetDeviceProblem(p, r);
|
---|
2343 |
|
---|
2344 | if (p->rng_fault_state) {
|
---|
2345 | talloc_free(r);
|
---|
2346 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2347 | return true;
|
---|
2348 | }
|
---|
2349 |
|
---|
2350 | if (DEBUGLEVEL >= 10) {
|
---|
2351 | NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, r);
|
---|
2352 | }
|
---|
2353 |
|
---|
2354 | push = ndr_push_init_ctx(r, NULL);
|
---|
2355 | if (push == NULL) {
|
---|
2356 | talloc_free(r);
|
---|
2357 | return false;
|
---|
2358 | }
|
---|
2359 |
|
---|
2360 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2361 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2362 | talloc_free(r);
|
---|
2363 | return false;
|
---|
2364 | }
|
---|
2365 |
|
---|
2366 | blob = ndr_push_blob(push);
|
---|
2367 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2368 | talloc_free(r);
|
---|
2369 | return false;
|
---|
2370 | }
|
---|
2371 |
|
---|
2372 | talloc_free(r);
|
---|
2373 |
|
---|
2374 | return true;
|
---|
2375 | }
|
---|
2376 |
|
---|
2377 | static bool api_PNP_DisableDevInst(pipes_struct *p)
|
---|
2378 | {
|
---|
2379 | const struct ndr_interface_call *call;
|
---|
2380 | struct ndr_pull *pull;
|
---|
2381 | struct ndr_push *push;
|
---|
2382 | enum ndr_err_code ndr_err;
|
---|
2383 | DATA_BLOB blob;
|
---|
2384 | struct PNP_DisableDevInst *r;
|
---|
2385 |
|
---|
2386 | call = &ndr_table_ntsvcs.calls[NDR_PNP_DISABLEDEVINST];
|
---|
2387 |
|
---|
2388 | r = talloc(talloc_tos(), struct PNP_DisableDevInst);
|
---|
2389 | if (r == NULL) {
|
---|
2390 | return false;
|
---|
2391 | }
|
---|
2392 |
|
---|
2393 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2394 | talloc_free(r);
|
---|
2395 | return false;
|
---|
2396 | }
|
---|
2397 |
|
---|
2398 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2399 | if (pull == NULL) {
|
---|
2400 | talloc_free(r);
|
---|
2401 | return false;
|
---|
2402 | }
|
---|
2403 |
|
---|
2404 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2405 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2406 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2407 | talloc_free(r);
|
---|
2408 | return false;
|
---|
2409 | }
|
---|
2410 |
|
---|
2411 | if (DEBUGLEVEL >= 10) {
|
---|
2412 | NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, r);
|
---|
2413 | }
|
---|
2414 |
|
---|
2415 | r->out.result = _PNP_DisableDevInst(p, r);
|
---|
2416 |
|
---|
2417 | if (p->rng_fault_state) {
|
---|
2418 | talloc_free(r);
|
---|
2419 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2420 | return true;
|
---|
2421 | }
|
---|
2422 |
|
---|
2423 | if (DEBUGLEVEL >= 10) {
|
---|
2424 | NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, r);
|
---|
2425 | }
|
---|
2426 |
|
---|
2427 | push = ndr_push_init_ctx(r, NULL);
|
---|
2428 | if (push == NULL) {
|
---|
2429 | talloc_free(r);
|
---|
2430 | return false;
|
---|
2431 | }
|
---|
2432 |
|
---|
2433 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2434 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2435 | talloc_free(r);
|
---|
2436 | return false;
|
---|
2437 | }
|
---|
2438 |
|
---|
2439 | blob = ndr_push_blob(push);
|
---|
2440 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2441 | talloc_free(r);
|
---|
2442 | return false;
|
---|
2443 | }
|
---|
2444 |
|
---|
2445 | talloc_free(r);
|
---|
2446 |
|
---|
2447 | return true;
|
---|
2448 | }
|
---|
2449 |
|
---|
2450 | static bool api_PNP_UninstallDevInst(pipes_struct *p)
|
---|
2451 | {
|
---|
2452 | const struct ndr_interface_call *call;
|
---|
2453 | struct ndr_pull *pull;
|
---|
2454 | struct ndr_push *push;
|
---|
2455 | enum ndr_err_code ndr_err;
|
---|
2456 | DATA_BLOB blob;
|
---|
2457 | struct PNP_UninstallDevInst *r;
|
---|
2458 |
|
---|
2459 | call = &ndr_table_ntsvcs.calls[NDR_PNP_UNINSTALLDEVINST];
|
---|
2460 |
|
---|
2461 | r = talloc(talloc_tos(), struct PNP_UninstallDevInst);
|
---|
2462 | if (r == NULL) {
|
---|
2463 | return false;
|
---|
2464 | }
|
---|
2465 |
|
---|
2466 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2467 | talloc_free(r);
|
---|
2468 | return false;
|
---|
2469 | }
|
---|
2470 |
|
---|
2471 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2472 | if (pull == NULL) {
|
---|
2473 | talloc_free(r);
|
---|
2474 | return false;
|
---|
2475 | }
|
---|
2476 |
|
---|
2477 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2478 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2479 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2480 | talloc_free(r);
|
---|
2481 | return false;
|
---|
2482 | }
|
---|
2483 |
|
---|
2484 | if (DEBUGLEVEL >= 10) {
|
---|
2485 | NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, r);
|
---|
2486 | }
|
---|
2487 |
|
---|
2488 | r->out.result = _PNP_UninstallDevInst(p, r);
|
---|
2489 |
|
---|
2490 | if (p->rng_fault_state) {
|
---|
2491 | talloc_free(r);
|
---|
2492 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2493 | return true;
|
---|
2494 | }
|
---|
2495 |
|
---|
2496 | if (DEBUGLEVEL >= 10) {
|
---|
2497 | NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, r);
|
---|
2498 | }
|
---|
2499 |
|
---|
2500 | push = ndr_push_init_ctx(r, NULL);
|
---|
2501 | if (push == NULL) {
|
---|
2502 | talloc_free(r);
|
---|
2503 | return false;
|
---|
2504 | }
|
---|
2505 |
|
---|
2506 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2507 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2508 | talloc_free(r);
|
---|
2509 | return false;
|
---|
2510 | }
|
---|
2511 |
|
---|
2512 | blob = ndr_push_blob(push);
|
---|
2513 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2514 | talloc_free(r);
|
---|
2515 | return false;
|
---|
2516 | }
|
---|
2517 |
|
---|
2518 | talloc_free(r);
|
---|
2519 |
|
---|
2520 | return true;
|
---|
2521 | }
|
---|
2522 |
|
---|
2523 | static bool api_PNP_AddID(pipes_struct *p)
|
---|
2524 | {
|
---|
2525 | const struct ndr_interface_call *call;
|
---|
2526 | struct ndr_pull *pull;
|
---|
2527 | struct ndr_push *push;
|
---|
2528 | enum ndr_err_code ndr_err;
|
---|
2529 | DATA_BLOB blob;
|
---|
2530 | struct PNP_AddID *r;
|
---|
2531 |
|
---|
2532 | call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDID];
|
---|
2533 |
|
---|
2534 | r = talloc(talloc_tos(), struct PNP_AddID);
|
---|
2535 | if (r == NULL) {
|
---|
2536 | return false;
|
---|
2537 | }
|
---|
2538 |
|
---|
2539 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2540 | talloc_free(r);
|
---|
2541 | return false;
|
---|
2542 | }
|
---|
2543 |
|
---|
2544 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2545 | if (pull == NULL) {
|
---|
2546 | talloc_free(r);
|
---|
2547 | return false;
|
---|
2548 | }
|
---|
2549 |
|
---|
2550 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2551 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2552 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2553 | talloc_free(r);
|
---|
2554 | return false;
|
---|
2555 | }
|
---|
2556 |
|
---|
2557 | if (DEBUGLEVEL >= 10) {
|
---|
2558 | NDR_PRINT_IN_DEBUG(PNP_AddID, r);
|
---|
2559 | }
|
---|
2560 |
|
---|
2561 | r->out.result = _PNP_AddID(p, r);
|
---|
2562 |
|
---|
2563 | if (p->rng_fault_state) {
|
---|
2564 | talloc_free(r);
|
---|
2565 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2566 | return true;
|
---|
2567 | }
|
---|
2568 |
|
---|
2569 | if (DEBUGLEVEL >= 10) {
|
---|
2570 | NDR_PRINT_OUT_DEBUG(PNP_AddID, r);
|
---|
2571 | }
|
---|
2572 |
|
---|
2573 | push = ndr_push_init_ctx(r, NULL);
|
---|
2574 | if (push == NULL) {
|
---|
2575 | talloc_free(r);
|
---|
2576 | return false;
|
---|
2577 | }
|
---|
2578 |
|
---|
2579 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2580 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2581 | talloc_free(r);
|
---|
2582 | return false;
|
---|
2583 | }
|
---|
2584 |
|
---|
2585 | blob = ndr_push_blob(push);
|
---|
2586 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2587 | talloc_free(r);
|
---|
2588 | return false;
|
---|
2589 | }
|
---|
2590 |
|
---|
2591 | talloc_free(r);
|
---|
2592 |
|
---|
2593 | return true;
|
---|
2594 | }
|
---|
2595 |
|
---|
2596 | static bool api_PNP_RegisterDriver(pipes_struct *p)
|
---|
2597 | {
|
---|
2598 | const struct ndr_interface_call *call;
|
---|
2599 | struct ndr_pull *pull;
|
---|
2600 | struct ndr_push *push;
|
---|
2601 | enum ndr_err_code ndr_err;
|
---|
2602 | DATA_BLOB blob;
|
---|
2603 | struct PNP_RegisterDriver *r;
|
---|
2604 |
|
---|
2605 | call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERDRIVER];
|
---|
2606 |
|
---|
2607 | r = talloc(talloc_tos(), struct PNP_RegisterDriver);
|
---|
2608 | if (r == NULL) {
|
---|
2609 | return false;
|
---|
2610 | }
|
---|
2611 |
|
---|
2612 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2613 | talloc_free(r);
|
---|
2614 | return false;
|
---|
2615 | }
|
---|
2616 |
|
---|
2617 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2618 | if (pull == NULL) {
|
---|
2619 | talloc_free(r);
|
---|
2620 | return false;
|
---|
2621 | }
|
---|
2622 |
|
---|
2623 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2624 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2625 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2626 | talloc_free(r);
|
---|
2627 | return false;
|
---|
2628 | }
|
---|
2629 |
|
---|
2630 | if (DEBUGLEVEL >= 10) {
|
---|
2631 | NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, r);
|
---|
2632 | }
|
---|
2633 |
|
---|
2634 | r->out.result = _PNP_RegisterDriver(p, r);
|
---|
2635 |
|
---|
2636 | if (p->rng_fault_state) {
|
---|
2637 | talloc_free(r);
|
---|
2638 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2639 | return true;
|
---|
2640 | }
|
---|
2641 |
|
---|
2642 | if (DEBUGLEVEL >= 10) {
|
---|
2643 | NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, r);
|
---|
2644 | }
|
---|
2645 |
|
---|
2646 | push = ndr_push_init_ctx(r, NULL);
|
---|
2647 | if (push == NULL) {
|
---|
2648 | talloc_free(r);
|
---|
2649 | return false;
|
---|
2650 | }
|
---|
2651 |
|
---|
2652 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2653 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2654 | talloc_free(r);
|
---|
2655 | return false;
|
---|
2656 | }
|
---|
2657 |
|
---|
2658 | blob = ndr_push_blob(push);
|
---|
2659 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2660 | talloc_free(r);
|
---|
2661 | return false;
|
---|
2662 | }
|
---|
2663 |
|
---|
2664 | talloc_free(r);
|
---|
2665 |
|
---|
2666 | return true;
|
---|
2667 | }
|
---|
2668 |
|
---|
2669 | static bool api_PNP_QueryRemove(pipes_struct *p)
|
---|
2670 | {
|
---|
2671 | const struct ndr_interface_call *call;
|
---|
2672 | struct ndr_pull *pull;
|
---|
2673 | struct ndr_push *push;
|
---|
2674 | enum ndr_err_code ndr_err;
|
---|
2675 | DATA_BLOB blob;
|
---|
2676 | struct PNP_QueryRemove *r;
|
---|
2677 |
|
---|
2678 | call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYREMOVE];
|
---|
2679 |
|
---|
2680 | r = talloc(talloc_tos(), struct PNP_QueryRemove);
|
---|
2681 | if (r == NULL) {
|
---|
2682 | return false;
|
---|
2683 | }
|
---|
2684 |
|
---|
2685 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2686 | talloc_free(r);
|
---|
2687 | return false;
|
---|
2688 | }
|
---|
2689 |
|
---|
2690 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2691 | if (pull == NULL) {
|
---|
2692 | talloc_free(r);
|
---|
2693 | return false;
|
---|
2694 | }
|
---|
2695 |
|
---|
2696 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2697 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2698 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2699 | talloc_free(r);
|
---|
2700 | return false;
|
---|
2701 | }
|
---|
2702 |
|
---|
2703 | if (DEBUGLEVEL >= 10) {
|
---|
2704 | NDR_PRINT_IN_DEBUG(PNP_QueryRemove, r);
|
---|
2705 | }
|
---|
2706 |
|
---|
2707 | r->out.result = _PNP_QueryRemove(p, r);
|
---|
2708 |
|
---|
2709 | if (p->rng_fault_state) {
|
---|
2710 | talloc_free(r);
|
---|
2711 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2712 | return true;
|
---|
2713 | }
|
---|
2714 |
|
---|
2715 | if (DEBUGLEVEL >= 10) {
|
---|
2716 | NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, r);
|
---|
2717 | }
|
---|
2718 |
|
---|
2719 | push = ndr_push_init_ctx(r, NULL);
|
---|
2720 | if (push == NULL) {
|
---|
2721 | talloc_free(r);
|
---|
2722 | return false;
|
---|
2723 | }
|
---|
2724 |
|
---|
2725 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2726 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2727 | talloc_free(r);
|
---|
2728 | return false;
|
---|
2729 | }
|
---|
2730 |
|
---|
2731 | blob = ndr_push_blob(push);
|
---|
2732 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2733 | talloc_free(r);
|
---|
2734 | return false;
|
---|
2735 | }
|
---|
2736 |
|
---|
2737 | talloc_free(r);
|
---|
2738 |
|
---|
2739 | return true;
|
---|
2740 | }
|
---|
2741 |
|
---|
2742 | static bool api_PNP_RequestDeviceEject(pipes_struct *p)
|
---|
2743 | {
|
---|
2744 | const struct ndr_interface_call *call;
|
---|
2745 | struct ndr_pull *pull;
|
---|
2746 | struct ndr_push *push;
|
---|
2747 | enum ndr_err_code ndr_err;
|
---|
2748 | DATA_BLOB blob;
|
---|
2749 | struct PNP_RequestDeviceEject *r;
|
---|
2750 |
|
---|
2751 | call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTDEVICEEJECT];
|
---|
2752 |
|
---|
2753 | r = talloc(talloc_tos(), struct PNP_RequestDeviceEject);
|
---|
2754 | if (r == NULL) {
|
---|
2755 | return false;
|
---|
2756 | }
|
---|
2757 |
|
---|
2758 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2759 | talloc_free(r);
|
---|
2760 | return false;
|
---|
2761 | }
|
---|
2762 |
|
---|
2763 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2764 | if (pull == NULL) {
|
---|
2765 | talloc_free(r);
|
---|
2766 | return false;
|
---|
2767 | }
|
---|
2768 |
|
---|
2769 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2770 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2771 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2772 | talloc_free(r);
|
---|
2773 | return false;
|
---|
2774 | }
|
---|
2775 |
|
---|
2776 | if (DEBUGLEVEL >= 10) {
|
---|
2777 | NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, r);
|
---|
2778 | }
|
---|
2779 |
|
---|
2780 | r->out.result = _PNP_RequestDeviceEject(p, r);
|
---|
2781 |
|
---|
2782 | if (p->rng_fault_state) {
|
---|
2783 | talloc_free(r);
|
---|
2784 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2785 | return true;
|
---|
2786 | }
|
---|
2787 |
|
---|
2788 | if (DEBUGLEVEL >= 10) {
|
---|
2789 | NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, r);
|
---|
2790 | }
|
---|
2791 |
|
---|
2792 | push = ndr_push_init_ctx(r, NULL);
|
---|
2793 | if (push == NULL) {
|
---|
2794 | talloc_free(r);
|
---|
2795 | return false;
|
---|
2796 | }
|
---|
2797 |
|
---|
2798 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2799 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2800 | talloc_free(r);
|
---|
2801 | return false;
|
---|
2802 | }
|
---|
2803 |
|
---|
2804 | blob = ndr_push_blob(push);
|
---|
2805 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2806 | talloc_free(r);
|
---|
2807 | return false;
|
---|
2808 | }
|
---|
2809 |
|
---|
2810 | talloc_free(r);
|
---|
2811 |
|
---|
2812 | return true;
|
---|
2813 | }
|
---|
2814 |
|
---|
2815 | static bool api_PNP_IsDockStationPresent(pipes_struct *p)
|
---|
2816 | {
|
---|
2817 | const struct ndr_interface_call *call;
|
---|
2818 | struct ndr_pull *pull;
|
---|
2819 | struct ndr_push *push;
|
---|
2820 | enum ndr_err_code ndr_err;
|
---|
2821 | DATA_BLOB blob;
|
---|
2822 | struct PNP_IsDockStationPresent *r;
|
---|
2823 |
|
---|
2824 | call = &ndr_table_ntsvcs.calls[NDR_PNP_ISDOCKSTATIONPRESENT];
|
---|
2825 |
|
---|
2826 | r = talloc(talloc_tos(), struct PNP_IsDockStationPresent);
|
---|
2827 | if (r == NULL) {
|
---|
2828 | return false;
|
---|
2829 | }
|
---|
2830 |
|
---|
2831 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2832 | talloc_free(r);
|
---|
2833 | return false;
|
---|
2834 | }
|
---|
2835 |
|
---|
2836 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2837 | if (pull == NULL) {
|
---|
2838 | talloc_free(r);
|
---|
2839 | return false;
|
---|
2840 | }
|
---|
2841 |
|
---|
2842 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2843 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2844 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2845 | talloc_free(r);
|
---|
2846 | return false;
|
---|
2847 | }
|
---|
2848 |
|
---|
2849 | if (DEBUGLEVEL >= 10) {
|
---|
2850 | NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, r);
|
---|
2851 | }
|
---|
2852 |
|
---|
2853 | r->out.result = _PNP_IsDockStationPresent(p, r);
|
---|
2854 |
|
---|
2855 | if (p->rng_fault_state) {
|
---|
2856 | talloc_free(r);
|
---|
2857 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2858 | return true;
|
---|
2859 | }
|
---|
2860 |
|
---|
2861 | if (DEBUGLEVEL >= 10) {
|
---|
2862 | NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, r);
|
---|
2863 | }
|
---|
2864 |
|
---|
2865 | push = ndr_push_init_ctx(r, NULL);
|
---|
2866 | if (push == NULL) {
|
---|
2867 | talloc_free(r);
|
---|
2868 | return false;
|
---|
2869 | }
|
---|
2870 |
|
---|
2871 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2872 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2873 | talloc_free(r);
|
---|
2874 | return false;
|
---|
2875 | }
|
---|
2876 |
|
---|
2877 | blob = ndr_push_blob(push);
|
---|
2878 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2879 | talloc_free(r);
|
---|
2880 | return false;
|
---|
2881 | }
|
---|
2882 |
|
---|
2883 | talloc_free(r);
|
---|
2884 |
|
---|
2885 | return true;
|
---|
2886 | }
|
---|
2887 |
|
---|
2888 | static bool api_PNP_RequestEjectPC(pipes_struct *p)
|
---|
2889 | {
|
---|
2890 | const struct ndr_interface_call *call;
|
---|
2891 | struct ndr_pull *pull;
|
---|
2892 | struct ndr_push *push;
|
---|
2893 | enum ndr_err_code ndr_err;
|
---|
2894 | DATA_BLOB blob;
|
---|
2895 | struct PNP_RequestEjectPC *r;
|
---|
2896 |
|
---|
2897 | call = &ndr_table_ntsvcs.calls[NDR_PNP_REQUESTEJECTPC];
|
---|
2898 |
|
---|
2899 | r = talloc(talloc_tos(), struct PNP_RequestEjectPC);
|
---|
2900 | if (r == NULL) {
|
---|
2901 | return false;
|
---|
2902 | }
|
---|
2903 |
|
---|
2904 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2905 | talloc_free(r);
|
---|
2906 | return false;
|
---|
2907 | }
|
---|
2908 |
|
---|
2909 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2910 | if (pull == NULL) {
|
---|
2911 | talloc_free(r);
|
---|
2912 | return false;
|
---|
2913 | }
|
---|
2914 |
|
---|
2915 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2916 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2917 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2918 | talloc_free(r);
|
---|
2919 | return false;
|
---|
2920 | }
|
---|
2921 |
|
---|
2922 | if (DEBUGLEVEL >= 10) {
|
---|
2923 | NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, r);
|
---|
2924 | }
|
---|
2925 |
|
---|
2926 | r->out.result = _PNP_RequestEjectPC(p, r);
|
---|
2927 |
|
---|
2928 | if (p->rng_fault_state) {
|
---|
2929 | talloc_free(r);
|
---|
2930 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
2931 | return true;
|
---|
2932 | }
|
---|
2933 |
|
---|
2934 | if (DEBUGLEVEL >= 10) {
|
---|
2935 | NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, r);
|
---|
2936 | }
|
---|
2937 |
|
---|
2938 | push = ndr_push_init_ctx(r, NULL);
|
---|
2939 | if (push == NULL) {
|
---|
2940 | talloc_free(r);
|
---|
2941 | return false;
|
---|
2942 | }
|
---|
2943 |
|
---|
2944 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
2945 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2946 | talloc_free(r);
|
---|
2947 | return false;
|
---|
2948 | }
|
---|
2949 |
|
---|
2950 | blob = ndr_push_blob(push);
|
---|
2951 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
2952 | talloc_free(r);
|
---|
2953 | return false;
|
---|
2954 | }
|
---|
2955 |
|
---|
2956 | talloc_free(r);
|
---|
2957 |
|
---|
2958 | return true;
|
---|
2959 | }
|
---|
2960 |
|
---|
2961 | static bool api_PNP_HwProfFlags(pipes_struct *p)
|
---|
2962 | {
|
---|
2963 | const struct ndr_interface_call *call;
|
---|
2964 | struct ndr_pull *pull;
|
---|
2965 | struct ndr_push *push;
|
---|
2966 | enum ndr_err_code ndr_err;
|
---|
2967 | DATA_BLOB blob;
|
---|
2968 | struct PNP_HwProfFlags *r;
|
---|
2969 |
|
---|
2970 | call = &ndr_table_ntsvcs.calls[NDR_PNP_HWPROFFLAGS];
|
---|
2971 |
|
---|
2972 | r = talloc(talloc_tos(), struct PNP_HwProfFlags);
|
---|
2973 | if (r == NULL) {
|
---|
2974 | return false;
|
---|
2975 | }
|
---|
2976 |
|
---|
2977 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
2978 | talloc_free(r);
|
---|
2979 | return false;
|
---|
2980 | }
|
---|
2981 |
|
---|
2982 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
2983 | if (pull == NULL) {
|
---|
2984 | talloc_free(r);
|
---|
2985 | return false;
|
---|
2986 | }
|
---|
2987 |
|
---|
2988 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
2989 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
2990 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
2991 | talloc_free(r);
|
---|
2992 | return false;
|
---|
2993 | }
|
---|
2994 |
|
---|
2995 | if (DEBUGLEVEL >= 10) {
|
---|
2996 | NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, r);
|
---|
2997 | }
|
---|
2998 |
|
---|
2999 | ZERO_STRUCT(r->out);
|
---|
3000 | r->out.profile_flags = r->in.profile_flags;
|
---|
3001 | r->out.veto_type = r->in.veto_type;
|
---|
3002 | r->out.unknown5a = talloc_zero(r, const char *);
|
---|
3003 | if (r->out.unknown5a == NULL) {
|
---|
3004 | talloc_free(r);
|
---|
3005 | return false;
|
---|
3006 | }
|
---|
3007 |
|
---|
3008 | r->out.result = _PNP_HwProfFlags(p, r);
|
---|
3009 |
|
---|
3010 | if (p->rng_fault_state) {
|
---|
3011 | talloc_free(r);
|
---|
3012 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3013 | return true;
|
---|
3014 | }
|
---|
3015 |
|
---|
3016 | if (DEBUGLEVEL >= 10) {
|
---|
3017 | NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, r);
|
---|
3018 | }
|
---|
3019 |
|
---|
3020 | push = ndr_push_init_ctx(r, NULL);
|
---|
3021 | if (push == NULL) {
|
---|
3022 | talloc_free(r);
|
---|
3023 | return false;
|
---|
3024 | }
|
---|
3025 |
|
---|
3026 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3027 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3028 | talloc_free(r);
|
---|
3029 | return false;
|
---|
3030 | }
|
---|
3031 |
|
---|
3032 | blob = ndr_push_blob(push);
|
---|
3033 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3034 | talloc_free(r);
|
---|
3035 | return false;
|
---|
3036 | }
|
---|
3037 |
|
---|
3038 | talloc_free(r);
|
---|
3039 |
|
---|
3040 | return true;
|
---|
3041 | }
|
---|
3042 |
|
---|
3043 | static bool api_PNP_GetHwProfInfo(pipes_struct *p)
|
---|
3044 | {
|
---|
3045 | const struct ndr_interface_call *call;
|
---|
3046 | struct ndr_pull *pull;
|
---|
3047 | struct ndr_push *push;
|
---|
3048 | enum ndr_err_code ndr_err;
|
---|
3049 | DATA_BLOB blob;
|
---|
3050 | struct PNP_GetHwProfInfo *r;
|
---|
3051 |
|
---|
3052 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETHWPROFINFO];
|
---|
3053 |
|
---|
3054 | r = talloc(talloc_tos(), struct PNP_GetHwProfInfo);
|
---|
3055 | if (r == NULL) {
|
---|
3056 | return false;
|
---|
3057 | }
|
---|
3058 |
|
---|
3059 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3060 | talloc_free(r);
|
---|
3061 | return false;
|
---|
3062 | }
|
---|
3063 |
|
---|
3064 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3065 | if (pull == NULL) {
|
---|
3066 | talloc_free(r);
|
---|
3067 | return false;
|
---|
3068 | }
|
---|
3069 |
|
---|
3070 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3071 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3072 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3073 | talloc_free(r);
|
---|
3074 | return false;
|
---|
3075 | }
|
---|
3076 |
|
---|
3077 | if (DEBUGLEVEL >= 10) {
|
---|
3078 | NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, r);
|
---|
3079 | }
|
---|
3080 |
|
---|
3081 | ZERO_STRUCT(r->out);
|
---|
3082 | r->out.info = r->in.info;
|
---|
3083 | r->out.result = _PNP_GetHwProfInfo(p, r);
|
---|
3084 |
|
---|
3085 | if (p->rng_fault_state) {
|
---|
3086 | talloc_free(r);
|
---|
3087 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3088 | return true;
|
---|
3089 | }
|
---|
3090 |
|
---|
3091 | if (DEBUGLEVEL >= 10) {
|
---|
3092 | NDR_PRINT_OUT_DEBUG(PNP_GetHwProfInfo, r);
|
---|
3093 | }
|
---|
3094 |
|
---|
3095 | push = ndr_push_init_ctx(r, NULL);
|
---|
3096 | if (push == NULL) {
|
---|
3097 | talloc_free(r);
|
---|
3098 | return false;
|
---|
3099 | }
|
---|
3100 |
|
---|
3101 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3102 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3103 | talloc_free(r);
|
---|
3104 | return false;
|
---|
3105 | }
|
---|
3106 |
|
---|
3107 | blob = ndr_push_blob(push);
|
---|
3108 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3109 | talloc_free(r);
|
---|
3110 | return false;
|
---|
3111 | }
|
---|
3112 |
|
---|
3113 | talloc_free(r);
|
---|
3114 |
|
---|
3115 | return true;
|
---|
3116 | }
|
---|
3117 |
|
---|
3118 | static bool api_PNP_AddEmptyLogConf(pipes_struct *p)
|
---|
3119 | {
|
---|
3120 | const struct ndr_interface_call *call;
|
---|
3121 | struct ndr_pull *pull;
|
---|
3122 | struct ndr_push *push;
|
---|
3123 | enum ndr_err_code ndr_err;
|
---|
3124 | DATA_BLOB blob;
|
---|
3125 | struct PNP_AddEmptyLogConf *r;
|
---|
3126 |
|
---|
3127 | call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDEMPTYLOGCONF];
|
---|
3128 |
|
---|
3129 | r = talloc(talloc_tos(), struct PNP_AddEmptyLogConf);
|
---|
3130 | if (r == NULL) {
|
---|
3131 | return false;
|
---|
3132 | }
|
---|
3133 |
|
---|
3134 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3135 | talloc_free(r);
|
---|
3136 | return false;
|
---|
3137 | }
|
---|
3138 |
|
---|
3139 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3140 | if (pull == NULL) {
|
---|
3141 | talloc_free(r);
|
---|
3142 | return false;
|
---|
3143 | }
|
---|
3144 |
|
---|
3145 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3146 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3147 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3148 | talloc_free(r);
|
---|
3149 | return false;
|
---|
3150 | }
|
---|
3151 |
|
---|
3152 | if (DEBUGLEVEL >= 10) {
|
---|
3153 | NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, r);
|
---|
3154 | }
|
---|
3155 |
|
---|
3156 | r->out.result = _PNP_AddEmptyLogConf(p, r);
|
---|
3157 |
|
---|
3158 | if (p->rng_fault_state) {
|
---|
3159 | talloc_free(r);
|
---|
3160 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3161 | return true;
|
---|
3162 | }
|
---|
3163 |
|
---|
3164 | if (DEBUGLEVEL >= 10) {
|
---|
3165 | NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, r);
|
---|
3166 | }
|
---|
3167 |
|
---|
3168 | push = ndr_push_init_ctx(r, NULL);
|
---|
3169 | if (push == NULL) {
|
---|
3170 | talloc_free(r);
|
---|
3171 | return false;
|
---|
3172 | }
|
---|
3173 |
|
---|
3174 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3175 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3176 | talloc_free(r);
|
---|
3177 | return false;
|
---|
3178 | }
|
---|
3179 |
|
---|
3180 | blob = ndr_push_blob(push);
|
---|
3181 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3182 | talloc_free(r);
|
---|
3183 | return false;
|
---|
3184 | }
|
---|
3185 |
|
---|
3186 | talloc_free(r);
|
---|
3187 |
|
---|
3188 | return true;
|
---|
3189 | }
|
---|
3190 |
|
---|
3191 | static bool api_PNP_FreeLogConf(pipes_struct *p)
|
---|
3192 | {
|
---|
3193 | const struct ndr_interface_call *call;
|
---|
3194 | struct ndr_pull *pull;
|
---|
3195 | struct ndr_push *push;
|
---|
3196 | enum ndr_err_code ndr_err;
|
---|
3197 | DATA_BLOB blob;
|
---|
3198 | struct PNP_FreeLogConf *r;
|
---|
3199 |
|
---|
3200 | call = &ndr_table_ntsvcs.calls[NDR_PNP_FREELOGCONF];
|
---|
3201 |
|
---|
3202 | r = talloc(talloc_tos(), struct PNP_FreeLogConf);
|
---|
3203 | if (r == NULL) {
|
---|
3204 | return false;
|
---|
3205 | }
|
---|
3206 |
|
---|
3207 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3208 | talloc_free(r);
|
---|
3209 | return false;
|
---|
3210 | }
|
---|
3211 |
|
---|
3212 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3213 | if (pull == NULL) {
|
---|
3214 | talloc_free(r);
|
---|
3215 | return false;
|
---|
3216 | }
|
---|
3217 |
|
---|
3218 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3219 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3220 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3221 | talloc_free(r);
|
---|
3222 | return false;
|
---|
3223 | }
|
---|
3224 |
|
---|
3225 | if (DEBUGLEVEL >= 10) {
|
---|
3226 | NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, r);
|
---|
3227 | }
|
---|
3228 |
|
---|
3229 | r->out.result = _PNP_FreeLogConf(p, r);
|
---|
3230 |
|
---|
3231 | if (p->rng_fault_state) {
|
---|
3232 | talloc_free(r);
|
---|
3233 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3234 | return true;
|
---|
3235 | }
|
---|
3236 |
|
---|
3237 | if (DEBUGLEVEL >= 10) {
|
---|
3238 | NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, r);
|
---|
3239 | }
|
---|
3240 |
|
---|
3241 | push = ndr_push_init_ctx(r, NULL);
|
---|
3242 | if (push == NULL) {
|
---|
3243 | talloc_free(r);
|
---|
3244 | return false;
|
---|
3245 | }
|
---|
3246 |
|
---|
3247 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3248 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3249 | talloc_free(r);
|
---|
3250 | return false;
|
---|
3251 | }
|
---|
3252 |
|
---|
3253 | blob = ndr_push_blob(push);
|
---|
3254 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3255 | talloc_free(r);
|
---|
3256 | return false;
|
---|
3257 | }
|
---|
3258 |
|
---|
3259 | talloc_free(r);
|
---|
3260 |
|
---|
3261 | return true;
|
---|
3262 | }
|
---|
3263 |
|
---|
3264 | static bool api_PNP_GetFirstLogConf(pipes_struct *p)
|
---|
3265 | {
|
---|
3266 | const struct ndr_interface_call *call;
|
---|
3267 | struct ndr_pull *pull;
|
---|
3268 | struct ndr_push *push;
|
---|
3269 | enum ndr_err_code ndr_err;
|
---|
3270 | DATA_BLOB blob;
|
---|
3271 | struct PNP_GetFirstLogConf *r;
|
---|
3272 |
|
---|
3273 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETFIRSTLOGCONF];
|
---|
3274 |
|
---|
3275 | r = talloc(talloc_tos(), struct PNP_GetFirstLogConf);
|
---|
3276 | if (r == NULL) {
|
---|
3277 | return false;
|
---|
3278 | }
|
---|
3279 |
|
---|
3280 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3281 | talloc_free(r);
|
---|
3282 | return false;
|
---|
3283 | }
|
---|
3284 |
|
---|
3285 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3286 | if (pull == NULL) {
|
---|
3287 | talloc_free(r);
|
---|
3288 | return false;
|
---|
3289 | }
|
---|
3290 |
|
---|
3291 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3292 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3293 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3294 | talloc_free(r);
|
---|
3295 | return false;
|
---|
3296 | }
|
---|
3297 |
|
---|
3298 | if (DEBUGLEVEL >= 10) {
|
---|
3299 | NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, r);
|
---|
3300 | }
|
---|
3301 |
|
---|
3302 | r->out.result = _PNP_GetFirstLogConf(p, r);
|
---|
3303 |
|
---|
3304 | if (p->rng_fault_state) {
|
---|
3305 | talloc_free(r);
|
---|
3306 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3307 | return true;
|
---|
3308 | }
|
---|
3309 |
|
---|
3310 | if (DEBUGLEVEL >= 10) {
|
---|
3311 | NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, r);
|
---|
3312 | }
|
---|
3313 |
|
---|
3314 | push = ndr_push_init_ctx(r, NULL);
|
---|
3315 | if (push == NULL) {
|
---|
3316 | talloc_free(r);
|
---|
3317 | return false;
|
---|
3318 | }
|
---|
3319 |
|
---|
3320 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3321 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3322 | talloc_free(r);
|
---|
3323 | return false;
|
---|
3324 | }
|
---|
3325 |
|
---|
3326 | blob = ndr_push_blob(push);
|
---|
3327 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3328 | talloc_free(r);
|
---|
3329 | return false;
|
---|
3330 | }
|
---|
3331 |
|
---|
3332 | talloc_free(r);
|
---|
3333 |
|
---|
3334 | return true;
|
---|
3335 | }
|
---|
3336 |
|
---|
3337 | static bool api_PNP_GetNextLogConf(pipes_struct *p)
|
---|
3338 | {
|
---|
3339 | const struct ndr_interface_call *call;
|
---|
3340 | struct ndr_pull *pull;
|
---|
3341 | struct ndr_push *push;
|
---|
3342 | enum ndr_err_code ndr_err;
|
---|
3343 | DATA_BLOB blob;
|
---|
3344 | struct PNP_GetNextLogConf *r;
|
---|
3345 |
|
---|
3346 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTLOGCONF];
|
---|
3347 |
|
---|
3348 | r = talloc(talloc_tos(), struct PNP_GetNextLogConf);
|
---|
3349 | if (r == NULL) {
|
---|
3350 | return false;
|
---|
3351 | }
|
---|
3352 |
|
---|
3353 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3354 | talloc_free(r);
|
---|
3355 | return false;
|
---|
3356 | }
|
---|
3357 |
|
---|
3358 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3359 | if (pull == NULL) {
|
---|
3360 | talloc_free(r);
|
---|
3361 | return false;
|
---|
3362 | }
|
---|
3363 |
|
---|
3364 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3365 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3366 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3367 | talloc_free(r);
|
---|
3368 | return false;
|
---|
3369 | }
|
---|
3370 |
|
---|
3371 | if (DEBUGLEVEL >= 10) {
|
---|
3372 | NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, r);
|
---|
3373 | }
|
---|
3374 |
|
---|
3375 | r->out.result = _PNP_GetNextLogConf(p, r);
|
---|
3376 |
|
---|
3377 | if (p->rng_fault_state) {
|
---|
3378 | talloc_free(r);
|
---|
3379 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3380 | return true;
|
---|
3381 | }
|
---|
3382 |
|
---|
3383 | if (DEBUGLEVEL >= 10) {
|
---|
3384 | NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, r);
|
---|
3385 | }
|
---|
3386 |
|
---|
3387 | push = ndr_push_init_ctx(r, NULL);
|
---|
3388 | if (push == NULL) {
|
---|
3389 | talloc_free(r);
|
---|
3390 | return false;
|
---|
3391 | }
|
---|
3392 |
|
---|
3393 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3394 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3395 | talloc_free(r);
|
---|
3396 | return false;
|
---|
3397 | }
|
---|
3398 |
|
---|
3399 | blob = ndr_push_blob(push);
|
---|
3400 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3401 | talloc_free(r);
|
---|
3402 | return false;
|
---|
3403 | }
|
---|
3404 |
|
---|
3405 | talloc_free(r);
|
---|
3406 |
|
---|
3407 | return true;
|
---|
3408 | }
|
---|
3409 |
|
---|
3410 | static bool api_PNP_GetLogConfPriority(pipes_struct *p)
|
---|
3411 | {
|
---|
3412 | const struct ndr_interface_call *call;
|
---|
3413 | struct ndr_pull *pull;
|
---|
3414 | struct ndr_push *push;
|
---|
3415 | enum ndr_err_code ndr_err;
|
---|
3416 | DATA_BLOB blob;
|
---|
3417 | struct PNP_GetLogConfPriority *r;
|
---|
3418 |
|
---|
3419 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETLOGCONFPRIORITY];
|
---|
3420 |
|
---|
3421 | r = talloc(talloc_tos(), struct PNP_GetLogConfPriority);
|
---|
3422 | if (r == NULL) {
|
---|
3423 | return false;
|
---|
3424 | }
|
---|
3425 |
|
---|
3426 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3427 | talloc_free(r);
|
---|
3428 | return false;
|
---|
3429 | }
|
---|
3430 |
|
---|
3431 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3432 | if (pull == NULL) {
|
---|
3433 | talloc_free(r);
|
---|
3434 | return false;
|
---|
3435 | }
|
---|
3436 |
|
---|
3437 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3438 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3439 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3440 | talloc_free(r);
|
---|
3441 | return false;
|
---|
3442 | }
|
---|
3443 |
|
---|
3444 | if (DEBUGLEVEL >= 10) {
|
---|
3445 | NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, r);
|
---|
3446 | }
|
---|
3447 |
|
---|
3448 | r->out.result = _PNP_GetLogConfPriority(p, r);
|
---|
3449 |
|
---|
3450 | if (p->rng_fault_state) {
|
---|
3451 | talloc_free(r);
|
---|
3452 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3453 | return true;
|
---|
3454 | }
|
---|
3455 |
|
---|
3456 | if (DEBUGLEVEL >= 10) {
|
---|
3457 | NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, r);
|
---|
3458 | }
|
---|
3459 |
|
---|
3460 | push = ndr_push_init_ctx(r, NULL);
|
---|
3461 | if (push == NULL) {
|
---|
3462 | talloc_free(r);
|
---|
3463 | return false;
|
---|
3464 | }
|
---|
3465 |
|
---|
3466 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3467 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3468 | talloc_free(r);
|
---|
3469 | return false;
|
---|
3470 | }
|
---|
3471 |
|
---|
3472 | blob = ndr_push_blob(push);
|
---|
3473 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3474 | talloc_free(r);
|
---|
3475 | return false;
|
---|
3476 | }
|
---|
3477 |
|
---|
3478 | talloc_free(r);
|
---|
3479 |
|
---|
3480 | return true;
|
---|
3481 | }
|
---|
3482 |
|
---|
3483 | static bool api_PNP_AddResDes(pipes_struct *p)
|
---|
3484 | {
|
---|
3485 | const struct ndr_interface_call *call;
|
---|
3486 | struct ndr_pull *pull;
|
---|
3487 | struct ndr_push *push;
|
---|
3488 | enum ndr_err_code ndr_err;
|
---|
3489 | DATA_BLOB blob;
|
---|
3490 | struct PNP_AddResDes *r;
|
---|
3491 |
|
---|
3492 | call = &ndr_table_ntsvcs.calls[NDR_PNP_ADDRESDES];
|
---|
3493 |
|
---|
3494 | r = talloc(talloc_tos(), struct PNP_AddResDes);
|
---|
3495 | if (r == NULL) {
|
---|
3496 | return false;
|
---|
3497 | }
|
---|
3498 |
|
---|
3499 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3500 | talloc_free(r);
|
---|
3501 | return false;
|
---|
3502 | }
|
---|
3503 |
|
---|
3504 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3505 | if (pull == NULL) {
|
---|
3506 | talloc_free(r);
|
---|
3507 | return false;
|
---|
3508 | }
|
---|
3509 |
|
---|
3510 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3511 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3512 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3513 | talloc_free(r);
|
---|
3514 | return false;
|
---|
3515 | }
|
---|
3516 |
|
---|
3517 | if (DEBUGLEVEL >= 10) {
|
---|
3518 | NDR_PRINT_IN_DEBUG(PNP_AddResDes, r);
|
---|
3519 | }
|
---|
3520 |
|
---|
3521 | r->out.result = _PNP_AddResDes(p, r);
|
---|
3522 |
|
---|
3523 | if (p->rng_fault_state) {
|
---|
3524 | talloc_free(r);
|
---|
3525 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3526 | return true;
|
---|
3527 | }
|
---|
3528 |
|
---|
3529 | if (DEBUGLEVEL >= 10) {
|
---|
3530 | NDR_PRINT_OUT_DEBUG(PNP_AddResDes, r);
|
---|
3531 | }
|
---|
3532 |
|
---|
3533 | push = ndr_push_init_ctx(r, NULL);
|
---|
3534 | if (push == NULL) {
|
---|
3535 | talloc_free(r);
|
---|
3536 | return false;
|
---|
3537 | }
|
---|
3538 |
|
---|
3539 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3540 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3541 | talloc_free(r);
|
---|
3542 | return false;
|
---|
3543 | }
|
---|
3544 |
|
---|
3545 | blob = ndr_push_blob(push);
|
---|
3546 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3547 | talloc_free(r);
|
---|
3548 | return false;
|
---|
3549 | }
|
---|
3550 |
|
---|
3551 | talloc_free(r);
|
---|
3552 |
|
---|
3553 | return true;
|
---|
3554 | }
|
---|
3555 |
|
---|
3556 | static bool api_PNP_FreeResDes(pipes_struct *p)
|
---|
3557 | {
|
---|
3558 | const struct ndr_interface_call *call;
|
---|
3559 | struct ndr_pull *pull;
|
---|
3560 | struct ndr_push *push;
|
---|
3561 | enum ndr_err_code ndr_err;
|
---|
3562 | DATA_BLOB blob;
|
---|
3563 | struct PNP_FreeResDes *r;
|
---|
3564 |
|
---|
3565 | call = &ndr_table_ntsvcs.calls[NDR_PNP_FREERESDES];
|
---|
3566 |
|
---|
3567 | r = talloc(talloc_tos(), struct PNP_FreeResDes);
|
---|
3568 | if (r == NULL) {
|
---|
3569 | return false;
|
---|
3570 | }
|
---|
3571 |
|
---|
3572 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3573 | talloc_free(r);
|
---|
3574 | return false;
|
---|
3575 | }
|
---|
3576 |
|
---|
3577 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3578 | if (pull == NULL) {
|
---|
3579 | talloc_free(r);
|
---|
3580 | return false;
|
---|
3581 | }
|
---|
3582 |
|
---|
3583 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3584 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3585 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3586 | talloc_free(r);
|
---|
3587 | return false;
|
---|
3588 | }
|
---|
3589 |
|
---|
3590 | if (DEBUGLEVEL >= 10) {
|
---|
3591 | NDR_PRINT_IN_DEBUG(PNP_FreeResDes, r);
|
---|
3592 | }
|
---|
3593 |
|
---|
3594 | r->out.result = _PNP_FreeResDes(p, r);
|
---|
3595 |
|
---|
3596 | if (p->rng_fault_state) {
|
---|
3597 | talloc_free(r);
|
---|
3598 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3599 | return true;
|
---|
3600 | }
|
---|
3601 |
|
---|
3602 | if (DEBUGLEVEL >= 10) {
|
---|
3603 | NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, r);
|
---|
3604 | }
|
---|
3605 |
|
---|
3606 | push = ndr_push_init_ctx(r, NULL);
|
---|
3607 | if (push == NULL) {
|
---|
3608 | talloc_free(r);
|
---|
3609 | return false;
|
---|
3610 | }
|
---|
3611 |
|
---|
3612 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3613 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3614 | talloc_free(r);
|
---|
3615 | return false;
|
---|
3616 | }
|
---|
3617 |
|
---|
3618 | blob = ndr_push_blob(push);
|
---|
3619 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3620 | talloc_free(r);
|
---|
3621 | return false;
|
---|
3622 | }
|
---|
3623 |
|
---|
3624 | talloc_free(r);
|
---|
3625 |
|
---|
3626 | return true;
|
---|
3627 | }
|
---|
3628 |
|
---|
3629 | static bool api_PNP_GetNextResDes(pipes_struct *p)
|
---|
3630 | {
|
---|
3631 | const struct ndr_interface_call *call;
|
---|
3632 | struct ndr_pull *pull;
|
---|
3633 | struct ndr_push *push;
|
---|
3634 | enum ndr_err_code ndr_err;
|
---|
3635 | DATA_BLOB blob;
|
---|
3636 | struct PNP_GetNextResDes *r;
|
---|
3637 |
|
---|
3638 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETNEXTRESDES];
|
---|
3639 |
|
---|
3640 | r = talloc(talloc_tos(), struct PNP_GetNextResDes);
|
---|
3641 | if (r == NULL) {
|
---|
3642 | return false;
|
---|
3643 | }
|
---|
3644 |
|
---|
3645 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3646 | talloc_free(r);
|
---|
3647 | return false;
|
---|
3648 | }
|
---|
3649 |
|
---|
3650 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3651 | if (pull == NULL) {
|
---|
3652 | talloc_free(r);
|
---|
3653 | return false;
|
---|
3654 | }
|
---|
3655 |
|
---|
3656 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3657 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3658 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3659 | talloc_free(r);
|
---|
3660 | return false;
|
---|
3661 | }
|
---|
3662 |
|
---|
3663 | if (DEBUGLEVEL >= 10) {
|
---|
3664 | NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, r);
|
---|
3665 | }
|
---|
3666 |
|
---|
3667 | r->out.result = _PNP_GetNextResDes(p, r);
|
---|
3668 |
|
---|
3669 | if (p->rng_fault_state) {
|
---|
3670 | talloc_free(r);
|
---|
3671 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3672 | return true;
|
---|
3673 | }
|
---|
3674 |
|
---|
3675 | if (DEBUGLEVEL >= 10) {
|
---|
3676 | NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, r);
|
---|
3677 | }
|
---|
3678 |
|
---|
3679 | push = ndr_push_init_ctx(r, NULL);
|
---|
3680 | if (push == NULL) {
|
---|
3681 | talloc_free(r);
|
---|
3682 | return false;
|
---|
3683 | }
|
---|
3684 |
|
---|
3685 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3686 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3687 | talloc_free(r);
|
---|
3688 | return false;
|
---|
3689 | }
|
---|
3690 |
|
---|
3691 | blob = ndr_push_blob(push);
|
---|
3692 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3693 | talloc_free(r);
|
---|
3694 | return false;
|
---|
3695 | }
|
---|
3696 |
|
---|
3697 | talloc_free(r);
|
---|
3698 |
|
---|
3699 | return true;
|
---|
3700 | }
|
---|
3701 |
|
---|
3702 | static bool api_PNP_GetResDesData(pipes_struct *p)
|
---|
3703 | {
|
---|
3704 | const struct ndr_interface_call *call;
|
---|
3705 | struct ndr_pull *pull;
|
---|
3706 | struct ndr_push *push;
|
---|
3707 | enum ndr_err_code ndr_err;
|
---|
3708 | DATA_BLOB blob;
|
---|
3709 | struct PNP_GetResDesData *r;
|
---|
3710 |
|
---|
3711 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATA];
|
---|
3712 |
|
---|
3713 | r = talloc(talloc_tos(), struct PNP_GetResDesData);
|
---|
3714 | if (r == NULL) {
|
---|
3715 | return false;
|
---|
3716 | }
|
---|
3717 |
|
---|
3718 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3719 | talloc_free(r);
|
---|
3720 | return false;
|
---|
3721 | }
|
---|
3722 |
|
---|
3723 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3724 | if (pull == NULL) {
|
---|
3725 | talloc_free(r);
|
---|
3726 | return false;
|
---|
3727 | }
|
---|
3728 |
|
---|
3729 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3730 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3731 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3732 | talloc_free(r);
|
---|
3733 | return false;
|
---|
3734 | }
|
---|
3735 |
|
---|
3736 | if (DEBUGLEVEL >= 10) {
|
---|
3737 | NDR_PRINT_IN_DEBUG(PNP_GetResDesData, r);
|
---|
3738 | }
|
---|
3739 |
|
---|
3740 | r->out.result = _PNP_GetResDesData(p, r);
|
---|
3741 |
|
---|
3742 | if (p->rng_fault_state) {
|
---|
3743 | talloc_free(r);
|
---|
3744 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3745 | return true;
|
---|
3746 | }
|
---|
3747 |
|
---|
3748 | if (DEBUGLEVEL >= 10) {
|
---|
3749 | NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, r);
|
---|
3750 | }
|
---|
3751 |
|
---|
3752 | push = ndr_push_init_ctx(r, NULL);
|
---|
3753 | if (push == NULL) {
|
---|
3754 | talloc_free(r);
|
---|
3755 | return false;
|
---|
3756 | }
|
---|
3757 |
|
---|
3758 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3759 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3760 | talloc_free(r);
|
---|
3761 | return false;
|
---|
3762 | }
|
---|
3763 |
|
---|
3764 | blob = ndr_push_blob(push);
|
---|
3765 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3766 | talloc_free(r);
|
---|
3767 | return false;
|
---|
3768 | }
|
---|
3769 |
|
---|
3770 | talloc_free(r);
|
---|
3771 |
|
---|
3772 | return true;
|
---|
3773 | }
|
---|
3774 |
|
---|
3775 | static bool api_PNP_GetResDesDataSize(pipes_struct *p)
|
---|
3776 | {
|
---|
3777 | const struct ndr_interface_call *call;
|
---|
3778 | struct ndr_pull *pull;
|
---|
3779 | struct ndr_push *push;
|
---|
3780 | enum ndr_err_code ndr_err;
|
---|
3781 | DATA_BLOB blob;
|
---|
3782 | struct PNP_GetResDesDataSize *r;
|
---|
3783 |
|
---|
3784 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETRESDESDATASIZE];
|
---|
3785 |
|
---|
3786 | r = talloc(talloc_tos(), struct PNP_GetResDesDataSize);
|
---|
3787 | if (r == NULL) {
|
---|
3788 | return false;
|
---|
3789 | }
|
---|
3790 |
|
---|
3791 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3792 | talloc_free(r);
|
---|
3793 | return false;
|
---|
3794 | }
|
---|
3795 |
|
---|
3796 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3797 | if (pull == NULL) {
|
---|
3798 | talloc_free(r);
|
---|
3799 | return false;
|
---|
3800 | }
|
---|
3801 |
|
---|
3802 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3803 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3804 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3805 | talloc_free(r);
|
---|
3806 | return false;
|
---|
3807 | }
|
---|
3808 |
|
---|
3809 | if (DEBUGLEVEL >= 10) {
|
---|
3810 | NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, r);
|
---|
3811 | }
|
---|
3812 |
|
---|
3813 | r->out.result = _PNP_GetResDesDataSize(p, r);
|
---|
3814 |
|
---|
3815 | if (p->rng_fault_state) {
|
---|
3816 | talloc_free(r);
|
---|
3817 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3818 | return true;
|
---|
3819 | }
|
---|
3820 |
|
---|
3821 | if (DEBUGLEVEL >= 10) {
|
---|
3822 | NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, r);
|
---|
3823 | }
|
---|
3824 |
|
---|
3825 | push = ndr_push_init_ctx(r, NULL);
|
---|
3826 | if (push == NULL) {
|
---|
3827 | talloc_free(r);
|
---|
3828 | return false;
|
---|
3829 | }
|
---|
3830 |
|
---|
3831 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3832 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3833 | talloc_free(r);
|
---|
3834 | return false;
|
---|
3835 | }
|
---|
3836 |
|
---|
3837 | blob = ndr_push_blob(push);
|
---|
3838 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3839 | talloc_free(r);
|
---|
3840 | return false;
|
---|
3841 | }
|
---|
3842 |
|
---|
3843 | talloc_free(r);
|
---|
3844 |
|
---|
3845 | return true;
|
---|
3846 | }
|
---|
3847 |
|
---|
3848 | static bool api_PNP_ModifyResDes(pipes_struct *p)
|
---|
3849 | {
|
---|
3850 | const struct ndr_interface_call *call;
|
---|
3851 | struct ndr_pull *pull;
|
---|
3852 | struct ndr_push *push;
|
---|
3853 | enum ndr_err_code ndr_err;
|
---|
3854 | DATA_BLOB blob;
|
---|
3855 | struct PNP_ModifyResDes *r;
|
---|
3856 |
|
---|
3857 | call = &ndr_table_ntsvcs.calls[NDR_PNP_MODIFYRESDES];
|
---|
3858 |
|
---|
3859 | r = talloc(talloc_tos(), struct PNP_ModifyResDes);
|
---|
3860 | if (r == NULL) {
|
---|
3861 | return false;
|
---|
3862 | }
|
---|
3863 |
|
---|
3864 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3865 | talloc_free(r);
|
---|
3866 | return false;
|
---|
3867 | }
|
---|
3868 |
|
---|
3869 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3870 | if (pull == NULL) {
|
---|
3871 | talloc_free(r);
|
---|
3872 | return false;
|
---|
3873 | }
|
---|
3874 |
|
---|
3875 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3876 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3877 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3878 | talloc_free(r);
|
---|
3879 | return false;
|
---|
3880 | }
|
---|
3881 |
|
---|
3882 | if (DEBUGLEVEL >= 10) {
|
---|
3883 | NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, r);
|
---|
3884 | }
|
---|
3885 |
|
---|
3886 | r->out.result = _PNP_ModifyResDes(p, r);
|
---|
3887 |
|
---|
3888 | if (p->rng_fault_state) {
|
---|
3889 | talloc_free(r);
|
---|
3890 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3891 | return true;
|
---|
3892 | }
|
---|
3893 |
|
---|
3894 | if (DEBUGLEVEL >= 10) {
|
---|
3895 | NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, r);
|
---|
3896 | }
|
---|
3897 |
|
---|
3898 | push = ndr_push_init_ctx(r, NULL);
|
---|
3899 | if (push == NULL) {
|
---|
3900 | talloc_free(r);
|
---|
3901 | return false;
|
---|
3902 | }
|
---|
3903 |
|
---|
3904 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3905 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3906 | talloc_free(r);
|
---|
3907 | return false;
|
---|
3908 | }
|
---|
3909 |
|
---|
3910 | blob = ndr_push_blob(push);
|
---|
3911 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3912 | talloc_free(r);
|
---|
3913 | return false;
|
---|
3914 | }
|
---|
3915 |
|
---|
3916 | talloc_free(r);
|
---|
3917 |
|
---|
3918 | return true;
|
---|
3919 | }
|
---|
3920 |
|
---|
3921 | static bool api_PNP_DetectResourceLimit(pipes_struct *p)
|
---|
3922 | {
|
---|
3923 | const struct ndr_interface_call *call;
|
---|
3924 | struct ndr_pull *pull;
|
---|
3925 | struct ndr_push *push;
|
---|
3926 | enum ndr_err_code ndr_err;
|
---|
3927 | DATA_BLOB blob;
|
---|
3928 | struct PNP_DetectResourceLimit *r;
|
---|
3929 |
|
---|
3930 | call = &ndr_table_ntsvcs.calls[NDR_PNP_DETECTRESOURCELIMIT];
|
---|
3931 |
|
---|
3932 | r = talloc(talloc_tos(), struct PNP_DetectResourceLimit);
|
---|
3933 | if (r == NULL) {
|
---|
3934 | return false;
|
---|
3935 | }
|
---|
3936 |
|
---|
3937 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
3938 | talloc_free(r);
|
---|
3939 | return false;
|
---|
3940 | }
|
---|
3941 |
|
---|
3942 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
3943 | if (pull == NULL) {
|
---|
3944 | talloc_free(r);
|
---|
3945 | return false;
|
---|
3946 | }
|
---|
3947 |
|
---|
3948 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
3949 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
3950 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3951 | talloc_free(r);
|
---|
3952 | return false;
|
---|
3953 | }
|
---|
3954 |
|
---|
3955 | if (DEBUGLEVEL >= 10) {
|
---|
3956 | NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, r);
|
---|
3957 | }
|
---|
3958 |
|
---|
3959 | r->out.result = _PNP_DetectResourceLimit(p, r);
|
---|
3960 |
|
---|
3961 | if (p->rng_fault_state) {
|
---|
3962 | talloc_free(r);
|
---|
3963 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
3964 | return true;
|
---|
3965 | }
|
---|
3966 |
|
---|
3967 | if (DEBUGLEVEL >= 10) {
|
---|
3968 | NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, r);
|
---|
3969 | }
|
---|
3970 |
|
---|
3971 | push = ndr_push_init_ctx(r, NULL);
|
---|
3972 | if (push == NULL) {
|
---|
3973 | talloc_free(r);
|
---|
3974 | return false;
|
---|
3975 | }
|
---|
3976 |
|
---|
3977 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
3978 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
3979 | talloc_free(r);
|
---|
3980 | return false;
|
---|
3981 | }
|
---|
3982 |
|
---|
3983 | blob = ndr_push_blob(push);
|
---|
3984 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
3985 | talloc_free(r);
|
---|
3986 | return false;
|
---|
3987 | }
|
---|
3988 |
|
---|
3989 | talloc_free(r);
|
---|
3990 |
|
---|
3991 | return true;
|
---|
3992 | }
|
---|
3993 |
|
---|
3994 | static bool api_PNP_QueryResConfList(pipes_struct *p)
|
---|
3995 | {
|
---|
3996 | const struct ndr_interface_call *call;
|
---|
3997 | struct ndr_pull *pull;
|
---|
3998 | struct ndr_push *push;
|
---|
3999 | enum ndr_err_code ndr_err;
|
---|
4000 | DATA_BLOB blob;
|
---|
4001 | struct PNP_QueryResConfList *r;
|
---|
4002 |
|
---|
4003 | call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYRESCONFLIST];
|
---|
4004 |
|
---|
4005 | r = talloc(talloc_tos(), struct PNP_QueryResConfList);
|
---|
4006 | if (r == NULL) {
|
---|
4007 | return false;
|
---|
4008 | }
|
---|
4009 |
|
---|
4010 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4011 | talloc_free(r);
|
---|
4012 | return false;
|
---|
4013 | }
|
---|
4014 |
|
---|
4015 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4016 | if (pull == NULL) {
|
---|
4017 | talloc_free(r);
|
---|
4018 | return false;
|
---|
4019 | }
|
---|
4020 |
|
---|
4021 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4022 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4023 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4024 | talloc_free(r);
|
---|
4025 | return false;
|
---|
4026 | }
|
---|
4027 |
|
---|
4028 | if (DEBUGLEVEL >= 10) {
|
---|
4029 | NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, r);
|
---|
4030 | }
|
---|
4031 |
|
---|
4032 | r->out.result = _PNP_QueryResConfList(p, r);
|
---|
4033 |
|
---|
4034 | if (p->rng_fault_state) {
|
---|
4035 | talloc_free(r);
|
---|
4036 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4037 | return true;
|
---|
4038 | }
|
---|
4039 |
|
---|
4040 | if (DEBUGLEVEL >= 10) {
|
---|
4041 | NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, r);
|
---|
4042 | }
|
---|
4043 |
|
---|
4044 | push = ndr_push_init_ctx(r, NULL);
|
---|
4045 | if (push == NULL) {
|
---|
4046 | talloc_free(r);
|
---|
4047 | return false;
|
---|
4048 | }
|
---|
4049 |
|
---|
4050 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4051 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4052 | talloc_free(r);
|
---|
4053 | return false;
|
---|
4054 | }
|
---|
4055 |
|
---|
4056 | blob = ndr_push_blob(push);
|
---|
4057 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4058 | talloc_free(r);
|
---|
4059 | return false;
|
---|
4060 | }
|
---|
4061 |
|
---|
4062 | talloc_free(r);
|
---|
4063 |
|
---|
4064 | return true;
|
---|
4065 | }
|
---|
4066 |
|
---|
4067 | static bool api_PNP_SetHwProf(pipes_struct *p)
|
---|
4068 | {
|
---|
4069 | const struct ndr_interface_call *call;
|
---|
4070 | struct ndr_pull *pull;
|
---|
4071 | struct ndr_push *push;
|
---|
4072 | enum ndr_err_code ndr_err;
|
---|
4073 | DATA_BLOB blob;
|
---|
4074 | struct PNP_SetHwProf *r;
|
---|
4075 |
|
---|
4076 | call = &ndr_table_ntsvcs.calls[NDR_PNP_SETHWPROF];
|
---|
4077 |
|
---|
4078 | r = talloc(talloc_tos(), struct PNP_SetHwProf);
|
---|
4079 | if (r == NULL) {
|
---|
4080 | return false;
|
---|
4081 | }
|
---|
4082 |
|
---|
4083 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4084 | talloc_free(r);
|
---|
4085 | return false;
|
---|
4086 | }
|
---|
4087 |
|
---|
4088 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4089 | if (pull == NULL) {
|
---|
4090 | talloc_free(r);
|
---|
4091 | return false;
|
---|
4092 | }
|
---|
4093 |
|
---|
4094 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4095 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4096 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4097 | talloc_free(r);
|
---|
4098 | return false;
|
---|
4099 | }
|
---|
4100 |
|
---|
4101 | if (DEBUGLEVEL >= 10) {
|
---|
4102 | NDR_PRINT_IN_DEBUG(PNP_SetHwProf, r);
|
---|
4103 | }
|
---|
4104 |
|
---|
4105 | r->out.result = _PNP_SetHwProf(p, r);
|
---|
4106 |
|
---|
4107 | if (p->rng_fault_state) {
|
---|
4108 | talloc_free(r);
|
---|
4109 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4110 | return true;
|
---|
4111 | }
|
---|
4112 |
|
---|
4113 | if (DEBUGLEVEL >= 10) {
|
---|
4114 | NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, r);
|
---|
4115 | }
|
---|
4116 |
|
---|
4117 | push = ndr_push_init_ctx(r, NULL);
|
---|
4118 | if (push == NULL) {
|
---|
4119 | talloc_free(r);
|
---|
4120 | return false;
|
---|
4121 | }
|
---|
4122 |
|
---|
4123 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4124 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4125 | talloc_free(r);
|
---|
4126 | return false;
|
---|
4127 | }
|
---|
4128 |
|
---|
4129 | blob = ndr_push_blob(push);
|
---|
4130 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4131 | talloc_free(r);
|
---|
4132 | return false;
|
---|
4133 | }
|
---|
4134 |
|
---|
4135 | talloc_free(r);
|
---|
4136 |
|
---|
4137 | return true;
|
---|
4138 | }
|
---|
4139 |
|
---|
4140 | static bool api_PNP_QueryArbitratorFreeData(pipes_struct *p)
|
---|
4141 | {
|
---|
4142 | const struct ndr_interface_call *call;
|
---|
4143 | struct ndr_pull *pull;
|
---|
4144 | struct ndr_push *push;
|
---|
4145 | enum ndr_err_code ndr_err;
|
---|
4146 | DATA_BLOB blob;
|
---|
4147 | struct PNP_QueryArbitratorFreeData *r;
|
---|
4148 |
|
---|
4149 | call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREEDATA];
|
---|
4150 |
|
---|
4151 | r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeData);
|
---|
4152 | if (r == NULL) {
|
---|
4153 | return false;
|
---|
4154 | }
|
---|
4155 |
|
---|
4156 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4157 | talloc_free(r);
|
---|
4158 | return false;
|
---|
4159 | }
|
---|
4160 |
|
---|
4161 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4162 | if (pull == NULL) {
|
---|
4163 | talloc_free(r);
|
---|
4164 | return false;
|
---|
4165 | }
|
---|
4166 |
|
---|
4167 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4168 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4169 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4170 | talloc_free(r);
|
---|
4171 | return false;
|
---|
4172 | }
|
---|
4173 |
|
---|
4174 | if (DEBUGLEVEL >= 10) {
|
---|
4175 | NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, r);
|
---|
4176 | }
|
---|
4177 |
|
---|
4178 | r->out.result = _PNP_QueryArbitratorFreeData(p, r);
|
---|
4179 |
|
---|
4180 | if (p->rng_fault_state) {
|
---|
4181 | talloc_free(r);
|
---|
4182 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4183 | return true;
|
---|
4184 | }
|
---|
4185 |
|
---|
4186 | if (DEBUGLEVEL >= 10) {
|
---|
4187 | NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, r);
|
---|
4188 | }
|
---|
4189 |
|
---|
4190 | push = ndr_push_init_ctx(r, NULL);
|
---|
4191 | if (push == NULL) {
|
---|
4192 | talloc_free(r);
|
---|
4193 | return false;
|
---|
4194 | }
|
---|
4195 |
|
---|
4196 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4197 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4198 | talloc_free(r);
|
---|
4199 | return false;
|
---|
4200 | }
|
---|
4201 |
|
---|
4202 | blob = ndr_push_blob(push);
|
---|
4203 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4204 | talloc_free(r);
|
---|
4205 | return false;
|
---|
4206 | }
|
---|
4207 |
|
---|
4208 | talloc_free(r);
|
---|
4209 |
|
---|
4210 | return true;
|
---|
4211 | }
|
---|
4212 |
|
---|
4213 | static bool api_PNP_QueryArbitratorFreeSize(pipes_struct *p)
|
---|
4214 | {
|
---|
4215 | const struct ndr_interface_call *call;
|
---|
4216 | struct ndr_pull *pull;
|
---|
4217 | struct ndr_push *push;
|
---|
4218 | enum ndr_err_code ndr_err;
|
---|
4219 | DATA_BLOB blob;
|
---|
4220 | struct PNP_QueryArbitratorFreeSize *r;
|
---|
4221 |
|
---|
4222 | call = &ndr_table_ntsvcs.calls[NDR_PNP_QUERYARBITRATORFREESIZE];
|
---|
4223 |
|
---|
4224 | r = talloc(talloc_tos(), struct PNP_QueryArbitratorFreeSize);
|
---|
4225 | if (r == NULL) {
|
---|
4226 | return false;
|
---|
4227 | }
|
---|
4228 |
|
---|
4229 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4230 | talloc_free(r);
|
---|
4231 | return false;
|
---|
4232 | }
|
---|
4233 |
|
---|
4234 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4235 | if (pull == NULL) {
|
---|
4236 | talloc_free(r);
|
---|
4237 | return false;
|
---|
4238 | }
|
---|
4239 |
|
---|
4240 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4241 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4242 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4243 | talloc_free(r);
|
---|
4244 | return false;
|
---|
4245 | }
|
---|
4246 |
|
---|
4247 | if (DEBUGLEVEL >= 10) {
|
---|
4248 | NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, r);
|
---|
4249 | }
|
---|
4250 |
|
---|
4251 | r->out.result = _PNP_QueryArbitratorFreeSize(p, r);
|
---|
4252 |
|
---|
4253 | if (p->rng_fault_state) {
|
---|
4254 | talloc_free(r);
|
---|
4255 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4256 | return true;
|
---|
4257 | }
|
---|
4258 |
|
---|
4259 | if (DEBUGLEVEL >= 10) {
|
---|
4260 | NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, r);
|
---|
4261 | }
|
---|
4262 |
|
---|
4263 | push = ndr_push_init_ctx(r, NULL);
|
---|
4264 | if (push == NULL) {
|
---|
4265 | talloc_free(r);
|
---|
4266 | return false;
|
---|
4267 | }
|
---|
4268 |
|
---|
4269 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4270 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4271 | talloc_free(r);
|
---|
4272 | return false;
|
---|
4273 | }
|
---|
4274 |
|
---|
4275 | blob = ndr_push_blob(push);
|
---|
4276 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4277 | talloc_free(r);
|
---|
4278 | return false;
|
---|
4279 | }
|
---|
4280 |
|
---|
4281 | talloc_free(r);
|
---|
4282 |
|
---|
4283 | return true;
|
---|
4284 | }
|
---|
4285 |
|
---|
4286 | static bool api_PNP_RunDetection(pipes_struct *p)
|
---|
4287 | {
|
---|
4288 | const struct ndr_interface_call *call;
|
---|
4289 | struct ndr_pull *pull;
|
---|
4290 | struct ndr_push *push;
|
---|
4291 | enum ndr_err_code ndr_err;
|
---|
4292 | DATA_BLOB blob;
|
---|
4293 | struct PNP_RunDetection *r;
|
---|
4294 |
|
---|
4295 | call = &ndr_table_ntsvcs.calls[NDR_PNP_RUNDETECTION];
|
---|
4296 |
|
---|
4297 | r = talloc(talloc_tos(), struct PNP_RunDetection);
|
---|
4298 | if (r == NULL) {
|
---|
4299 | return false;
|
---|
4300 | }
|
---|
4301 |
|
---|
4302 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4303 | talloc_free(r);
|
---|
4304 | return false;
|
---|
4305 | }
|
---|
4306 |
|
---|
4307 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4308 | if (pull == NULL) {
|
---|
4309 | talloc_free(r);
|
---|
4310 | return false;
|
---|
4311 | }
|
---|
4312 |
|
---|
4313 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4314 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4315 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4316 | talloc_free(r);
|
---|
4317 | return false;
|
---|
4318 | }
|
---|
4319 |
|
---|
4320 | if (DEBUGLEVEL >= 10) {
|
---|
4321 | NDR_PRINT_IN_DEBUG(PNP_RunDetection, r);
|
---|
4322 | }
|
---|
4323 |
|
---|
4324 | r->out.result = _PNP_RunDetection(p, r);
|
---|
4325 |
|
---|
4326 | if (p->rng_fault_state) {
|
---|
4327 | talloc_free(r);
|
---|
4328 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4329 | return true;
|
---|
4330 | }
|
---|
4331 |
|
---|
4332 | if (DEBUGLEVEL >= 10) {
|
---|
4333 | NDR_PRINT_OUT_DEBUG(PNP_RunDetection, r);
|
---|
4334 | }
|
---|
4335 |
|
---|
4336 | push = ndr_push_init_ctx(r, NULL);
|
---|
4337 | if (push == NULL) {
|
---|
4338 | talloc_free(r);
|
---|
4339 | return false;
|
---|
4340 | }
|
---|
4341 |
|
---|
4342 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4343 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4344 | talloc_free(r);
|
---|
4345 | return false;
|
---|
4346 | }
|
---|
4347 |
|
---|
4348 | blob = ndr_push_blob(push);
|
---|
4349 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4350 | talloc_free(r);
|
---|
4351 | return false;
|
---|
4352 | }
|
---|
4353 |
|
---|
4354 | talloc_free(r);
|
---|
4355 |
|
---|
4356 | return true;
|
---|
4357 | }
|
---|
4358 |
|
---|
4359 | static bool api_PNP_RegisterNotification(pipes_struct *p)
|
---|
4360 | {
|
---|
4361 | const struct ndr_interface_call *call;
|
---|
4362 | struct ndr_pull *pull;
|
---|
4363 | struct ndr_push *push;
|
---|
4364 | enum ndr_err_code ndr_err;
|
---|
4365 | DATA_BLOB blob;
|
---|
4366 | struct PNP_RegisterNotification *r;
|
---|
4367 |
|
---|
4368 | call = &ndr_table_ntsvcs.calls[NDR_PNP_REGISTERNOTIFICATION];
|
---|
4369 |
|
---|
4370 | r = talloc(talloc_tos(), struct PNP_RegisterNotification);
|
---|
4371 | if (r == NULL) {
|
---|
4372 | return false;
|
---|
4373 | }
|
---|
4374 |
|
---|
4375 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4376 | talloc_free(r);
|
---|
4377 | return false;
|
---|
4378 | }
|
---|
4379 |
|
---|
4380 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4381 | if (pull == NULL) {
|
---|
4382 | talloc_free(r);
|
---|
4383 | return false;
|
---|
4384 | }
|
---|
4385 |
|
---|
4386 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4387 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4388 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4389 | talloc_free(r);
|
---|
4390 | return false;
|
---|
4391 | }
|
---|
4392 |
|
---|
4393 | if (DEBUGLEVEL >= 10) {
|
---|
4394 | NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, r);
|
---|
4395 | }
|
---|
4396 |
|
---|
4397 | r->out.result = _PNP_RegisterNotification(p, r);
|
---|
4398 |
|
---|
4399 | if (p->rng_fault_state) {
|
---|
4400 | talloc_free(r);
|
---|
4401 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4402 | return true;
|
---|
4403 | }
|
---|
4404 |
|
---|
4405 | if (DEBUGLEVEL >= 10) {
|
---|
4406 | NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, r);
|
---|
4407 | }
|
---|
4408 |
|
---|
4409 | push = ndr_push_init_ctx(r, NULL);
|
---|
4410 | if (push == NULL) {
|
---|
4411 | talloc_free(r);
|
---|
4412 | return false;
|
---|
4413 | }
|
---|
4414 |
|
---|
4415 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4416 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4417 | talloc_free(r);
|
---|
4418 | return false;
|
---|
4419 | }
|
---|
4420 |
|
---|
4421 | blob = ndr_push_blob(push);
|
---|
4422 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4423 | talloc_free(r);
|
---|
4424 | return false;
|
---|
4425 | }
|
---|
4426 |
|
---|
4427 | talloc_free(r);
|
---|
4428 |
|
---|
4429 | return true;
|
---|
4430 | }
|
---|
4431 |
|
---|
4432 | static bool api_PNP_UnregisterNotification(pipes_struct *p)
|
---|
4433 | {
|
---|
4434 | const struct ndr_interface_call *call;
|
---|
4435 | struct ndr_pull *pull;
|
---|
4436 | struct ndr_push *push;
|
---|
4437 | enum ndr_err_code ndr_err;
|
---|
4438 | DATA_BLOB blob;
|
---|
4439 | struct PNP_UnregisterNotification *r;
|
---|
4440 |
|
---|
4441 | call = &ndr_table_ntsvcs.calls[NDR_PNP_UNREGISTERNOTIFICATION];
|
---|
4442 |
|
---|
4443 | r = talloc(talloc_tos(), struct PNP_UnregisterNotification);
|
---|
4444 | if (r == NULL) {
|
---|
4445 | return false;
|
---|
4446 | }
|
---|
4447 |
|
---|
4448 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4449 | talloc_free(r);
|
---|
4450 | return false;
|
---|
4451 | }
|
---|
4452 |
|
---|
4453 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4454 | if (pull == NULL) {
|
---|
4455 | talloc_free(r);
|
---|
4456 | return false;
|
---|
4457 | }
|
---|
4458 |
|
---|
4459 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4460 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4461 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4462 | talloc_free(r);
|
---|
4463 | return false;
|
---|
4464 | }
|
---|
4465 |
|
---|
4466 | if (DEBUGLEVEL >= 10) {
|
---|
4467 | NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, r);
|
---|
4468 | }
|
---|
4469 |
|
---|
4470 | r->out.result = _PNP_UnregisterNotification(p, r);
|
---|
4471 |
|
---|
4472 | if (p->rng_fault_state) {
|
---|
4473 | talloc_free(r);
|
---|
4474 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4475 | return true;
|
---|
4476 | }
|
---|
4477 |
|
---|
4478 | if (DEBUGLEVEL >= 10) {
|
---|
4479 | NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, r);
|
---|
4480 | }
|
---|
4481 |
|
---|
4482 | push = ndr_push_init_ctx(r, NULL);
|
---|
4483 | if (push == NULL) {
|
---|
4484 | talloc_free(r);
|
---|
4485 | return false;
|
---|
4486 | }
|
---|
4487 |
|
---|
4488 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4489 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4490 | talloc_free(r);
|
---|
4491 | return false;
|
---|
4492 | }
|
---|
4493 |
|
---|
4494 | blob = ndr_push_blob(push);
|
---|
4495 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4496 | talloc_free(r);
|
---|
4497 | return false;
|
---|
4498 | }
|
---|
4499 |
|
---|
4500 | talloc_free(r);
|
---|
4501 |
|
---|
4502 | return true;
|
---|
4503 | }
|
---|
4504 |
|
---|
4505 | static bool api_PNP_GetCustomDevProp(pipes_struct *p)
|
---|
4506 | {
|
---|
4507 | const struct ndr_interface_call *call;
|
---|
4508 | struct ndr_pull *pull;
|
---|
4509 | struct ndr_push *push;
|
---|
4510 | enum ndr_err_code ndr_err;
|
---|
4511 | DATA_BLOB blob;
|
---|
4512 | struct PNP_GetCustomDevProp *r;
|
---|
4513 |
|
---|
4514 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETCUSTOMDEVPROP];
|
---|
4515 |
|
---|
4516 | r = talloc(talloc_tos(), struct PNP_GetCustomDevProp);
|
---|
4517 | if (r == NULL) {
|
---|
4518 | return false;
|
---|
4519 | }
|
---|
4520 |
|
---|
4521 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4522 | talloc_free(r);
|
---|
4523 | return false;
|
---|
4524 | }
|
---|
4525 |
|
---|
4526 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4527 | if (pull == NULL) {
|
---|
4528 | talloc_free(r);
|
---|
4529 | return false;
|
---|
4530 | }
|
---|
4531 |
|
---|
4532 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4533 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4534 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4535 | talloc_free(r);
|
---|
4536 | return false;
|
---|
4537 | }
|
---|
4538 |
|
---|
4539 | if (DEBUGLEVEL >= 10) {
|
---|
4540 | NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, r);
|
---|
4541 | }
|
---|
4542 |
|
---|
4543 | r->out.result = _PNP_GetCustomDevProp(p, r);
|
---|
4544 |
|
---|
4545 | if (p->rng_fault_state) {
|
---|
4546 | talloc_free(r);
|
---|
4547 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4548 | return true;
|
---|
4549 | }
|
---|
4550 |
|
---|
4551 | if (DEBUGLEVEL >= 10) {
|
---|
4552 | NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, r);
|
---|
4553 | }
|
---|
4554 |
|
---|
4555 | push = ndr_push_init_ctx(r, NULL);
|
---|
4556 | if (push == NULL) {
|
---|
4557 | talloc_free(r);
|
---|
4558 | return false;
|
---|
4559 | }
|
---|
4560 |
|
---|
4561 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4562 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4563 | talloc_free(r);
|
---|
4564 | return false;
|
---|
4565 | }
|
---|
4566 |
|
---|
4567 | blob = ndr_push_blob(push);
|
---|
4568 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4569 | talloc_free(r);
|
---|
4570 | return false;
|
---|
4571 | }
|
---|
4572 |
|
---|
4573 | talloc_free(r);
|
---|
4574 |
|
---|
4575 | return true;
|
---|
4576 | }
|
---|
4577 |
|
---|
4578 | static bool api_PNP_GetVersionInternal(pipes_struct *p)
|
---|
4579 | {
|
---|
4580 | const struct ndr_interface_call *call;
|
---|
4581 | struct ndr_pull *pull;
|
---|
4582 | struct ndr_push *push;
|
---|
4583 | enum ndr_err_code ndr_err;
|
---|
4584 | DATA_BLOB blob;
|
---|
4585 | struct PNP_GetVersionInternal *r;
|
---|
4586 |
|
---|
4587 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETVERSIONINTERNAL];
|
---|
4588 |
|
---|
4589 | r = talloc(talloc_tos(), struct PNP_GetVersionInternal);
|
---|
4590 | if (r == NULL) {
|
---|
4591 | return false;
|
---|
4592 | }
|
---|
4593 |
|
---|
4594 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4595 | talloc_free(r);
|
---|
4596 | return false;
|
---|
4597 | }
|
---|
4598 |
|
---|
4599 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4600 | if (pull == NULL) {
|
---|
4601 | talloc_free(r);
|
---|
4602 | return false;
|
---|
4603 | }
|
---|
4604 |
|
---|
4605 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4606 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4607 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4608 | talloc_free(r);
|
---|
4609 | return false;
|
---|
4610 | }
|
---|
4611 |
|
---|
4612 | if (DEBUGLEVEL >= 10) {
|
---|
4613 | NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, r);
|
---|
4614 | }
|
---|
4615 |
|
---|
4616 | r->out.result = _PNP_GetVersionInternal(p, r);
|
---|
4617 |
|
---|
4618 | if (p->rng_fault_state) {
|
---|
4619 | talloc_free(r);
|
---|
4620 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4621 | return true;
|
---|
4622 | }
|
---|
4623 |
|
---|
4624 | if (DEBUGLEVEL >= 10) {
|
---|
4625 | NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, r);
|
---|
4626 | }
|
---|
4627 |
|
---|
4628 | push = ndr_push_init_ctx(r, NULL);
|
---|
4629 | if (push == NULL) {
|
---|
4630 | talloc_free(r);
|
---|
4631 | return false;
|
---|
4632 | }
|
---|
4633 |
|
---|
4634 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4635 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4636 | talloc_free(r);
|
---|
4637 | return false;
|
---|
4638 | }
|
---|
4639 |
|
---|
4640 | blob = ndr_push_blob(push);
|
---|
4641 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4642 | talloc_free(r);
|
---|
4643 | return false;
|
---|
4644 | }
|
---|
4645 |
|
---|
4646 | talloc_free(r);
|
---|
4647 |
|
---|
4648 | return true;
|
---|
4649 | }
|
---|
4650 |
|
---|
4651 | static bool api_PNP_GetBlockedDriverInfo(pipes_struct *p)
|
---|
4652 | {
|
---|
4653 | const struct ndr_interface_call *call;
|
---|
4654 | struct ndr_pull *pull;
|
---|
4655 | struct ndr_push *push;
|
---|
4656 | enum ndr_err_code ndr_err;
|
---|
4657 | DATA_BLOB blob;
|
---|
4658 | struct PNP_GetBlockedDriverInfo *r;
|
---|
4659 |
|
---|
4660 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETBLOCKEDDRIVERINFO];
|
---|
4661 |
|
---|
4662 | r = talloc(talloc_tos(), struct PNP_GetBlockedDriverInfo);
|
---|
4663 | if (r == NULL) {
|
---|
4664 | return false;
|
---|
4665 | }
|
---|
4666 |
|
---|
4667 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4668 | talloc_free(r);
|
---|
4669 | return false;
|
---|
4670 | }
|
---|
4671 |
|
---|
4672 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4673 | if (pull == NULL) {
|
---|
4674 | talloc_free(r);
|
---|
4675 | return false;
|
---|
4676 | }
|
---|
4677 |
|
---|
4678 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4679 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4680 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4681 | talloc_free(r);
|
---|
4682 | return false;
|
---|
4683 | }
|
---|
4684 |
|
---|
4685 | if (DEBUGLEVEL >= 10) {
|
---|
4686 | NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, r);
|
---|
4687 | }
|
---|
4688 |
|
---|
4689 | r->out.result = _PNP_GetBlockedDriverInfo(p, r);
|
---|
4690 |
|
---|
4691 | if (p->rng_fault_state) {
|
---|
4692 | talloc_free(r);
|
---|
4693 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4694 | return true;
|
---|
4695 | }
|
---|
4696 |
|
---|
4697 | if (DEBUGLEVEL >= 10) {
|
---|
4698 | NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, r);
|
---|
4699 | }
|
---|
4700 |
|
---|
4701 | push = ndr_push_init_ctx(r, NULL);
|
---|
4702 | if (push == NULL) {
|
---|
4703 | talloc_free(r);
|
---|
4704 | return false;
|
---|
4705 | }
|
---|
4706 |
|
---|
4707 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4708 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4709 | talloc_free(r);
|
---|
4710 | return false;
|
---|
4711 | }
|
---|
4712 |
|
---|
4713 | blob = ndr_push_blob(push);
|
---|
4714 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4715 | talloc_free(r);
|
---|
4716 | return false;
|
---|
4717 | }
|
---|
4718 |
|
---|
4719 | talloc_free(r);
|
---|
4720 |
|
---|
4721 | return true;
|
---|
4722 | }
|
---|
4723 |
|
---|
4724 | static bool api_PNP_GetServerSideDeviceInstallFlags(pipes_struct *p)
|
---|
4725 | {
|
---|
4726 | const struct ndr_interface_call *call;
|
---|
4727 | struct ndr_pull *pull;
|
---|
4728 | struct ndr_push *push;
|
---|
4729 | enum ndr_err_code ndr_err;
|
---|
4730 | DATA_BLOB blob;
|
---|
4731 | struct PNP_GetServerSideDeviceInstallFlags *r;
|
---|
4732 |
|
---|
4733 | call = &ndr_table_ntsvcs.calls[NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS];
|
---|
4734 |
|
---|
4735 | r = talloc(talloc_tos(), struct PNP_GetServerSideDeviceInstallFlags);
|
---|
4736 | if (r == NULL) {
|
---|
4737 | return false;
|
---|
4738 | }
|
---|
4739 |
|
---|
4740 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
---|
4741 | talloc_free(r);
|
---|
4742 | return false;
|
---|
4743 | }
|
---|
4744 |
|
---|
4745 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
---|
4746 | if (pull == NULL) {
|
---|
4747 | talloc_free(r);
|
---|
4748 | return false;
|
---|
4749 | }
|
---|
4750 |
|
---|
4751 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
---|
4752 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
---|
4753 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4754 | talloc_free(r);
|
---|
4755 | return false;
|
---|
4756 | }
|
---|
4757 |
|
---|
4758 | if (DEBUGLEVEL >= 10) {
|
---|
4759 | NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
|
---|
4760 | }
|
---|
4761 |
|
---|
4762 | r->out.result = _PNP_GetServerSideDeviceInstallFlags(p, r);
|
---|
4763 |
|
---|
4764 | if (p->rng_fault_state) {
|
---|
4765 | talloc_free(r);
|
---|
4766 | /* Return true here, srv_pipe_hnd.c will take care */
|
---|
4767 | return true;
|
---|
4768 | }
|
---|
4769 |
|
---|
4770 | if (DEBUGLEVEL >= 10) {
|
---|
4771 | NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, r);
|
---|
4772 | }
|
---|
4773 |
|
---|
4774 | push = ndr_push_init_ctx(r, NULL);
|
---|
4775 | if (push == NULL) {
|
---|
4776 | talloc_free(r);
|
---|
4777 | return false;
|
---|
4778 | }
|
---|
4779 |
|
---|
4780 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
---|
4781 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
---|
4782 | talloc_free(r);
|
---|
4783 | return false;
|
---|
4784 | }
|
---|
4785 |
|
---|
4786 | blob = ndr_push_blob(push);
|
---|
4787 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
---|
4788 | talloc_free(r);
|
---|
4789 | return false;
|
---|
4790 | }
|
---|
4791 |
|
---|
4792 | talloc_free(r);
|
---|
4793 |
|
---|
4794 | return true;
|
---|
4795 | }
|
---|
4796 |
|
---|
4797 |
|
---|
4798 | /* Tables */
|
---|
4799 | static struct api_struct api_ntsvcs_cmds[] =
|
---|
4800 | {
|
---|
4801 | {"PNP_DISCONNECT", NDR_PNP_DISCONNECT, api_PNP_Disconnect},
|
---|
4802 | {"PNP_CONNECT", NDR_PNP_CONNECT, api_PNP_Connect},
|
---|
4803 | {"PNP_GETVERSION", NDR_PNP_GETVERSION, api_PNP_GetVersion},
|
---|
4804 | {"PNP_GETGLOBALSTATE", NDR_PNP_GETGLOBALSTATE, api_PNP_GetGlobalState},
|
---|
4805 | {"PNP_INITDETECTION", NDR_PNP_INITDETECTION, api_PNP_InitDetection},
|
---|
4806 | {"PNP_REPORTLOGON", NDR_PNP_REPORTLOGON, api_PNP_ReportLogOn},
|
---|
4807 | {"PNP_VALIDATEDEVICEINSTANCE", NDR_PNP_VALIDATEDEVICEINSTANCE, api_PNP_ValidateDeviceInstance},
|
---|
4808 | {"PNP_GETROOTDEVICEINSTANCE", NDR_PNP_GETROOTDEVICEINSTANCE, api_PNP_GetRootDeviceInstance},
|
---|
4809 | {"PNP_GETRELATEDDEVICEINSTANCE", NDR_PNP_GETRELATEDDEVICEINSTANCE, api_PNP_GetRelatedDeviceInstance},
|
---|
4810 | {"PNP_ENUMERATESUBKEYS", NDR_PNP_ENUMERATESUBKEYS, api_PNP_EnumerateSubKeys},
|
---|
4811 | {"PNP_GETDEVICELIST", NDR_PNP_GETDEVICELIST, api_PNP_GetDeviceList},
|
---|
4812 | {"PNP_GETDEVICELISTSIZE", NDR_PNP_GETDEVICELISTSIZE, api_PNP_GetDeviceListSize},
|
---|
4813 | {"PNP_GETDEPTH", NDR_PNP_GETDEPTH, api_PNP_GetDepth},
|
---|
4814 | {"PNP_GETDEVICEREGPROP", NDR_PNP_GETDEVICEREGPROP, api_PNP_GetDeviceRegProp},
|
---|
4815 | {"PNP_SETDEVICEREGPROP", NDR_PNP_SETDEVICEREGPROP, api_PNP_SetDeviceRegProp},
|
---|
4816 | {"PNP_GETCLASSINSTANCE", NDR_PNP_GETCLASSINSTANCE, api_PNP_GetClassInstance},
|
---|
4817 | {"PNP_CREATEKEY", NDR_PNP_CREATEKEY, api_PNP_CreateKey},
|
---|
4818 | {"PNP_DELETEREGISTRYKEY", NDR_PNP_DELETEREGISTRYKEY, api_PNP_DeleteRegistryKey},
|
---|
4819 | {"PNP_GETCLASSCOUNT", NDR_PNP_GETCLASSCOUNT, api_PNP_GetClassCount},
|
---|
4820 | {"PNP_GETCLASSNAME", NDR_PNP_GETCLASSNAME, api_PNP_GetClassName},
|
---|
4821 | {"PNP_DELETECLASSKEY", NDR_PNP_DELETECLASSKEY, api_PNP_DeleteClassKey},
|
---|
4822 | {"PNP_GETINTERFACEDEVICEALIAS", NDR_PNP_GETINTERFACEDEVICEALIAS, api_PNP_GetInterfaceDeviceAlias},
|
---|
4823 | {"PNP_GETINTERFACEDEVICELIST", NDR_PNP_GETINTERFACEDEVICELIST, api_PNP_GetInterfaceDeviceList},
|
---|
4824 | {"PNP_GETINTERFACEDEVICELISTSIZE", NDR_PNP_GETINTERFACEDEVICELISTSIZE, api_PNP_GetInterfaceDeviceListSize},
|
---|
4825 | {"PNP_REGISTERDEVICECLASSASSOCIATION", NDR_PNP_REGISTERDEVICECLASSASSOCIATION, api_PNP_RegisterDeviceClassAssociation},
|
---|
4826 | {"PNP_UNREGISTERDEVICECLASSASSOCIATION", NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION, api_PNP_UnregisterDeviceClassAssociation},
|
---|
4827 | {"PNP_GETCLASSREGPROP", NDR_PNP_GETCLASSREGPROP, api_PNP_GetClassRegProp},
|
---|
4828 | {"PNP_SETCLASSREGPROP", NDR_PNP_SETCLASSREGPROP, api_PNP_SetClassRegProp},
|
---|
4829 | {"PNP_CREATEDEVINST", NDR_PNP_CREATEDEVINST, api_PNP_CreateDevInst},
|
---|
4830 | {"PNP_DEVICEINSTANCEACTION", NDR_PNP_DEVICEINSTANCEACTION, api_PNP_DeviceInstanceAction},
|
---|
4831 | {"PNP_GETDEVICESTATUS", NDR_PNP_GETDEVICESTATUS, api_PNP_GetDeviceStatus},
|
---|
4832 | {"PNP_SETDEVICEPROBLEM", NDR_PNP_SETDEVICEPROBLEM, api_PNP_SetDeviceProblem},
|
---|
4833 | {"PNP_DISABLEDEVINST", NDR_PNP_DISABLEDEVINST, api_PNP_DisableDevInst},
|
---|
4834 | {"PNP_UNINSTALLDEVINST", NDR_PNP_UNINSTALLDEVINST, api_PNP_UninstallDevInst},
|
---|
4835 | {"PNP_ADDID", NDR_PNP_ADDID, api_PNP_AddID},
|
---|
4836 | {"PNP_REGISTERDRIVER", NDR_PNP_REGISTERDRIVER, api_PNP_RegisterDriver},
|
---|
4837 | {"PNP_QUERYREMOVE", NDR_PNP_QUERYREMOVE, api_PNP_QueryRemove},
|
---|
4838 | {"PNP_REQUESTDEVICEEJECT", NDR_PNP_REQUESTDEVICEEJECT, api_PNP_RequestDeviceEject},
|
---|
4839 | {"PNP_ISDOCKSTATIONPRESENT", NDR_PNP_ISDOCKSTATIONPRESENT, api_PNP_IsDockStationPresent},
|
---|
4840 | {"PNP_REQUESTEJECTPC", NDR_PNP_REQUESTEJECTPC, api_PNP_RequestEjectPC},
|
---|
4841 | {"PNP_HWPROFFLAGS", NDR_PNP_HWPROFFLAGS, api_PNP_HwProfFlags},
|
---|
4842 | {"PNP_GETHWPROFINFO", NDR_PNP_GETHWPROFINFO, api_PNP_GetHwProfInfo},
|
---|
4843 | {"PNP_ADDEMPTYLOGCONF", NDR_PNP_ADDEMPTYLOGCONF, api_PNP_AddEmptyLogConf},
|
---|
4844 | {"PNP_FREELOGCONF", NDR_PNP_FREELOGCONF, api_PNP_FreeLogConf},
|
---|
4845 | {"PNP_GETFIRSTLOGCONF", NDR_PNP_GETFIRSTLOGCONF, api_PNP_GetFirstLogConf},
|
---|
4846 | {"PNP_GETNEXTLOGCONF", NDR_PNP_GETNEXTLOGCONF, api_PNP_GetNextLogConf},
|
---|
4847 | {"PNP_GETLOGCONFPRIORITY", NDR_PNP_GETLOGCONFPRIORITY, api_PNP_GetLogConfPriority},
|
---|
4848 | {"PNP_ADDRESDES", NDR_PNP_ADDRESDES, api_PNP_AddResDes},
|
---|
4849 | {"PNP_FREERESDES", NDR_PNP_FREERESDES, api_PNP_FreeResDes},
|
---|
4850 | {"PNP_GETNEXTRESDES", NDR_PNP_GETNEXTRESDES, api_PNP_GetNextResDes},
|
---|
4851 | {"PNP_GETRESDESDATA", NDR_PNP_GETRESDESDATA, api_PNP_GetResDesData},
|
---|
4852 | {"PNP_GETRESDESDATASIZE", NDR_PNP_GETRESDESDATASIZE, api_PNP_GetResDesDataSize},
|
---|
4853 | {"PNP_MODIFYRESDES", NDR_PNP_MODIFYRESDES, api_PNP_ModifyResDes},
|
---|
4854 | {"PNP_DETECTRESOURCELIMIT", NDR_PNP_DETECTRESOURCELIMIT, api_PNP_DetectResourceLimit},
|
---|
4855 | {"PNP_QUERYRESCONFLIST", NDR_PNP_QUERYRESCONFLIST, api_PNP_QueryResConfList},
|
---|
4856 | {"PNP_SETHWPROF", NDR_PNP_SETHWPROF, api_PNP_SetHwProf},
|
---|
4857 | {"PNP_QUERYARBITRATORFREEDATA", NDR_PNP_QUERYARBITRATORFREEDATA, api_PNP_QueryArbitratorFreeData},
|
---|
4858 | {"PNP_QUERYARBITRATORFREESIZE", NDR_PNP_QUERYARBITRATORFREESIZE, api_PNP_QueryArbitratorFreeSize},
|
---|
4859 | {"PNP_RUNDETECTION", NDR_PNP_RUNDETECTION, api_PNP_RunDetection},
|
---|
4860 | {"PNP_REGISTERNOTIFICATION", NDR_PNP_REGISTERNOTIFICATION, api_PNP_RegisterNotification},
|
---|
4861 | {"PNP_UNREGISTERNOTIFICATION", NDR_PNP_UNREGISTERNOTIFICATION, api_PNP_UnregisterNotification},
|
---|
4862 | {"PNP_GETCUSTOMDEVPROP", NDR_PNP_GETCUSTOMDEVPROP, api_PNP_GetCustomDevProp},
|
---|
4863 | {"PNP_GETVERSIONINTERNAL", NDR_PNP_GETVERSIONINTERNAL, api_PNP_GetVersionInternal},
|
---|
4864 | {"PNP_GETBLOCKEDDRIVERINFO", NDR_PNP_GETBLOCKEDDRIVERINFO, api_PNP_GetBlockedDriverInfo},
|
---|
4865 | {"PNP_GETSERVERSIDEDEVICEINSTALLFLAGS", NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS, api_PNP_GetServerSideDeviceInstallFlags},
|
---|
4866 | };
|
---|
4867 |
|
---|
4868 | void ntsvcs_get_pipe_fns(struct api_struct **fns, int *n_fns)
|
---|
4869 | {
|
---|
4870 | *fns = api_ntsvcs_cmds;
|
---|
4871 | *n_fns = sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct);
|
---|
4872 | }
|
---|
4873 |
|
---|
4874 | NTSTATUS rpc_ntsvcs_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
|
---|
4875 | {
|
---|
4876 | if (cli->pipes_struct == NULL) {
|
---|
4877 | return NT_STATUS_INVALID_PARAMETER;
|
---|
4878 | }
|
---|
4879 |
|
---|
4880 | switch (opnum)
|
---|
4881 | {
|
---|
4882 | case NDR_PNP_DISCONNECT: {
|
---|
4883 | struct PNP_Disconnect *r = (struct PNP_Disconnect *)_r;
|
---|
4884 | r->out.result = _PNP_Disconnect(cli->pipes_struct, r);
|
---|
4885 | return NT_STATUS_OK;
|
---|
4886 | }
|
---|
4887 |
|
---|
4888 | case NDR_PNP_CONNECT: {
|
---|
4889 | struct PNP_Connect *r = (struct PNP_Connect *)_r;
|
---|
4890 | r->out.result = _PNP_Connect(cli->pipes_struct, r);
|
---|
4891 | return NT_STATUS_OK;
|
---|
4892 | }
|
---|
4893 |
|
---|
4894 | case NDR_PNP_GETVERSION: {
|
---|
4895 | struct PNP_GetVersion *r = (struct PNP_GetVersion *)_r;
|
---|
4896 | ZERO_STRUCT(r->out);
|
---|
4897 | r->out.version = talloc_zero(mem_ctx, uint16_t);
|
---|
4898 | if (r->out.version == NULL) {
|
---|
4899 | return NT_STATUS_NO_MEMORY;
|
---|
4900 | }
|
---|
4901 |
|
---|
4902 | r->out.result = _PNP_GetVersion(cli->pipes_struct, r);
|
---|
4903 | return NT_STATUS_OK;
|
---|
4904 | }
|
---|
4905 |
|
---|
4906 | case NDR_PNP_GETGLOBALSTATE: {
|
---|
4907 | struct PNP_GetGlobalState *r = (struct PNP_GetGlobalState *)_r;
|
---|
4908 | r->out.result = _PNP_GetGlobalState(cli->pipes_struct, r);
|
---|
4909 | return NT_STATUS_OK;
|
---|
4910 | }
|
---|
4911 |
|
---|
4912 | case NDR_PNP_INITDETECTION: {
|
---|
4913 | struct PNP_InitDetection *r = (struct PNP_InitDetection *)_r;
|
---|
4914 | r->out.result = _PNP_InitDetection(cli->pipes_struct, r);
|
---|
4915 | return NT_STATUS_OK;
|
---|
4916 | }
|
---|
4917 |
|
---|
4918 | case NDR_PNP_REPORTLOGON: {
|
---|
4919 | struct PNP_ReportLogOn *r = (struct PNP_ReportLogOn *)_r;
|
---|
4920 | r->out.result = _PNP_ReportLogOn(cli->pipes_struct, r);
|
---|
4921 | return NT_STATUS_OK;
|
---|
4922 | }
|
---|
4923 |
|
---|
4924 | case NDR_PNP_VALIDATEDEVICEINSTANCE: {
|
---|
4925 | struct PNP_ValidateDeviceInstance *r = (struct PNP_ValidateDeviceInstance *)_r;
|
---|
4926 | r->out.result = _PNP_ValidateDeviceInstance(cli->pipes_struct, r);
|
---|
4927 | return NT_STATUS_OK;
|
---|
4928 | }
|
---|
4929 |
|
---|
4930 | case NDR_PNP_GETROOTDEVICEINSTANCE: {
|
---|
4931 | struct PNP_GetRootDeviceInstance *r = (struct PNP_GetRootDeviceInstance *)_r;
|
---|
4932 | r->out.result = _PNP_GetRootDeviceInstance(cli->pipes_struct, r);
|
---|
4933 | return NT_STATUS_OK;
|
---|
4934 | }
|
---|
4935 |
|
---|
4936 | case NDR_PNP_GETRELATEDDEVICEINSTANCE: {
|
---|
4937 | struct PNP_GetRelatedDeviceInstance *r = (struct PNP_GetRelatedDeviceInstance *)_r;
|
---|
4938 | r->out.result = _PNP_GetRelatedDeviceInstance(cli->pipes_struct, r);
|
---|
4939 | return NT_STATUS_OK;
|
---|
4940 | }
|
---|
4941 |
|
---|
4942 | case NDR_PNP_ENUMERATESUBKEYS: {
|
---|
4943 | struct PNP_EnumerateSubKeys *r = (struct PNP_EnumerateSubKeys *)_r;
|
---|
4944 | r->out.result = _PNP_EnumerateSubKeys(cli->pipes_struct, r);
|
---|
4945 | return NT_STATUS_OK;
|
---|
4946 | }
|
---|
4947 |
|
---|
4948 | case NDR_PNP_GETDEVICELIST: {
|
---|
4949 | struct PNP_GetDeviceList *r = (struct PNP_GetDeviceList *)_r;
|
---|
4950 | ZERO_STRUCT(r->out);
|
---|
4951 | r->out.length = r->in.length;
|
---|
4952 | r->out.buffer = talloc_zero_array(mem_ctx, uint16_t, *r->out.length);
|
---|
4953 | if (r->out.buffer == NULL) {
|
---|
4954 | return NT_STATUS_NO_MEMORY;
|
---|
4955 | }
|
---|
4956 |
|
---|
4957 | r->out.result = _PNP_GetDeviceList(cli->pipes_struct, r);
|
---|
4958 | return NT_STATUS_OK;
|
---|
4959 | }
|
---|
4960 |
|
---|
4961 | case NDR_PNP_GETDEVICELISTSIZE: {
|
---|
4962 | struct PNP_GetDeviceListSize *r = (struct PNP_GetDeviceListSize *)_r;
|
---|
4963 | ZERO_STRUCT(r->out);
|
---|
4964 | r->out.size = talloc_zero(mem_ctx, uint32_t);
|
---|
4965 | if (r->out.size == NULL) {
|
---|
4966 | return NT_STATUS_NO_MEMORY;
|
---|
4967 | }
|
---|
4968 |
|
---|
4969 | r->out.result = _PNP_GetDeviceListSize(cli->pipes_struct, r);
|
---|
4970 | return NT_STATUS_OK;
|
---|
4971 | }
|
---|
4972 |
|
---|
4973 | case NDR_PNP_GETDEPTH: {
|
---|
4974 | struct PNP_GetDepth *r = (struct PNP_GetDepth *)_r;
|
---|
4975 | r->out.result = _PNP_GetDepth(cli->pipes_struct, r);
|
---|
4976 | return NT_STATUS_OK;
|
---|
4977 | }
|
---|
4978 |
|
---|
4979 | case NDR_PNP_GETDEVICEREGPROP: {
|
---|
4980 | struct PNP_GetDeviceRegProp *r = (struct PNP_GetDeviceRegProp *)_r;
|
---|
4981 | ZERO_STRUCT(r->out);
|
---|
4982 | r->out.reg_data_type = r->in.reg_data_type;
|
---|
4983 | r->out.buffer_size = r->in.buffer_size;
|
---|
4984 | r->out.needed = r->in.needed;
|
---|
4985 | r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, *r->out.buffer_size);
|
---|
4986 | if (r->out.buffer == NULL) {
|
---|
4987 | return NT_STATUS_NO_MEMORY;
|
---|
4988 | }
|
---|
4989 |
|
---|
4990 | r->out.result = _PNP_GetDeviceRegProp(cli->pipes_struct, r);
|
---|
4991 | return NT_STATUS_OK;
|
---|
4992 | }
|
---|
4993 |
|
---|
4994 | case NDR_PNP_SETDEVICEREGPROP: {
|
---|
4995 | struct PNP_SetDeviceRegProp *r = (struct PNP_SetDeviceRegProp *)_r;
|
---|
4996 | r->out.result = _PNP_SetDeviceRegProp(cli->pipes_struct, r);
|
---|
4997 | return NT_STATUS_OK;
|
---|
4998 | }
|
---|
4999 |
|
---|
5000 | case NDR_PNP_GETCLASSINSTANCE: {
|
---|
5001 | struct PNP_GetClassInstance *r = (struct PNP_GetClassInstance *)_r;
|
---|
5002 | r->out.result = _PNP_GetClassInstance(cli->pipes_struct, r);
|
---|
5003 | return NT_STATUS_OK;
|
---|
5004 | }
|
---|
5005 |
|
---|
5006 | case NDR_PNP_CREATEKEY: {
|
---|
5007 | struct PNP_CreateKey *r = (struct PNP_CreateKey *)_r;
|
---|
5008 | r->out.result = _PNP_CreateKey(cli->pipes_struct, r);
|
---|
5009 | return NT_STATUS_OK;
|
---|
5010 | }
|
---|
5011 |
|
---|
5012 | case NDR_PNP_DELETEREGISTRYKEY: {
|
---|
5013 | struct PNP_DeleteRegistryKey *r = (struct PNP_DeleteRegistryKey *)_r;
|
---|
5014 | r->out.result = _PNP_DeleteRegistryKey(cli->pipes_struct, r);
|
---|
5015 | return NT_STATUS_OK;
|
---|
5016 | }
|
---|
5017 |
|
---|
5018 | case NDR_PNP_GETCLASSCOUNT: {
|
---|
5019 | struct PNP_GetClassCount *r = (struct PNP_GetClassCount *)_r;
|
---|
5020 | r->out.result = _PNP_GetClassCount(cli->pipes_struct, r);
|
---|
5021 | return NT_STATUS_OK;
|
---|
5022 | }
|
---|
5023 |
|
---|
5024 | case NDR_PNP_GETCLASSNAME: {
|
---|
5025 | struct PNP_GetClassName *r = (struct PNP_GetClassName *)_r;
|
---|
5026 | r->out.result = _PNP_GetClassName(cli->pipes_struct, r);
|
---|
5027 | return NT_STATUS_OK;
|
---|
5028 | }
|
---|
5029 |
|
---|
5030 | case NDR_PNP_DELETECLASSKEY: {
|
---|
5031 | struct PNP_DeleteClassKey *r = (struct PNP_DeleteClassKey *)_r;
|
---|
5032 | r->out.result = _PNP_DeleteClassKey(cli->pipes_struct, r);
|
---|
5033 | return NT_STATUS_OK;
|
---|
5034 | }
|
---|
5035 |
|
---|
5036 | case NDR_PNP_GETINTERFACEDEVICEALIAS: {
|
---|
5037 | struct PNP_GetInterfaceDeviceAlias *r = (struct PNP_GetInterfaceDeviceAlias *)_r;
|
---|
5038 | r->out.result = _PNP_GetInterfaceDeviceAlias(cli->pipes_struct, r);
|
---|
5039 | return NT_STATUS_OK;
|
---|
5040 | }
|
---|
5041 |
|
---|
5042 | case NDR_PNP_GETINTERFACEDEVICELIST: {
|
---|
5043 | struct PNP_GetInterfaceDeviceList *r = (struct PNP_GetInterfaceDeviceList *)_r;
|
---|
5044 | r->out.result = _PNP_GetInterfaceDeviceList(cli->pipes_struct, r);
|
---|
5045 | return NT_STATUS_OK;
|
---|
5046 | }
|
---|
5047 |
|
---|
5048 | case NDR_PNP_GETINTERFACEDEVICELISTSIZE: {
|
---|
5049 | struct PNP_GetInterfaceDeviceListSize *r = (struct PNP_GetInterfaceDeviceListSize *)_r;
|
---|
5050 | r->out.result = _PNP_GetInterfaceDeviceListSize(cli->pipes_struct, r);
|
---|
5051 | return NT_STATUS_OK;
|
---|
5052 | }
|
---|
5053 |
|
---|
5054 | case NDR_PNP_REGISTERDEVICECLASSASSOCIATION: {
|
---|
5055 | struct PNP_RegisterDeviceClassAssociation *r = (struct PNP_RegisterDeviceClassAssociation *)_r;
|
---|
5056 | r->out.result = _PNP_RegisterDeviceClassAssociation(cli->pipes_struct, r);
|
---|
5057 | return NT_STATUS_OK;
|
---|
5058 | }
|
---|
5059 |
|
---|
5060 | case NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION: {
|
---|
5061 | struct PNP_UnregisterDeviceClassAssociation *r = (struct PNP_UnregisterDeviceClassAssociation *)_r;
|
---|
5062 | r->out.result = _PNP_UnregisterDeviceClassAssociation(cli->pipes_struct, r);
|
---|
5063 | return NT_STATUS_OK;
|
---|
5064 | }
|
---|
5065 |
|
---|
5066 | case NDR_PNP_GETCLASSREGPROP: {
|
---|
5067 | struct PNP_GetClassRegProp *r = (struct PNP_GetClassRegProp *)_r;
|
---|
5068 | r->out.result = _PNP_GetClassRegProp(cli->pipes_struct, r);
|
---|
5069 | return NT_STATUS_OK;
|
---|
5070 | }
|
---|
5071 |
|
---|
5072 | case NDR_PNP_SETCLASSREGPROP: {
|
---|
5073 | struct PNP_SetClassRegProp *r = (struct PNP_SetClassRegProp *)_r;
|
---|
5074 | r->out.result = _PNP_SetClassRegProp(cli->pipes_struct, r);
|
---|
5075 | return NT_STATUS_OK;
|
---|
5076 | }
|
---|
5077 |
|
---|
5078 | case NDR_PNP_CREATEDEVINST: {
|
---|
5079 | struct PNP_CreateDevInst *r = (struct PNP_CreateDevInst *)_r;
|
---|
5080 | r->out.result = _PNP_CreateDevInst(cli->pipes_struct, r);
|
---|
5081 | return NT_STATUS_OK;
|
---|
5082 | }
|
---|
5083 |
|
---|
5084 | case NDR_PNP_DEVICEINSTANCEACTION: {
|
---|
5085 | struct PNP_DeviceInstanceAction *r = (struct PNP_DeviceInstanceAction *)_r;
|
---|
5086 | r->out.result = _PNP_DeviceInstanceAction(cli->pipes_struct, r);
|
---|
5087 | return NT_STATUS_OK;
|
---|
5088 | }
|
---|
5089 |
|
---|
5090 | case NDR_PNP_GETDEVICESTATUS: {
|
---|
5091 | struct PNP_GetDeviceStatus *r = (struct PNP_GetDeviceStatus *)_r;
|
---|
5092 | r->out.result = _PNP_GetDeviceStatus(cli->pipes_struct, r);
|
---|
5093 | return NT_STATUS_OK;
|
---|
5094 | }
|
---|
5095 |
|
---|
5096 | case NDR_PNP_SETDEVICEPROBLEM: {
|
---|
5097 | struct PNP_SetDeviceProblem *r = (struct PNP_SetDeviceProblem *)_r;
|
---|
5098 | r->out.result = _PNP_SetDeviceProblem(cli->pipes_struct, r);
|
---|
5099 | return NT_STATUS_OK;
|
---|
5100 | }
|
---|
5101 |
|
---|
5102 | case NDR_PNP_DISABLEDEVINST: {
|
---|
5103 | struct PNP_DisableDevInst *r = (struct PNP_DisableDevInst *)_r;
|
---|
5104 | r->out.result = _PNP_DisableDevInst(cli->pipes_struct, r);
|
---|
5105 | return NT_STATUS_OK;
|
---|
5106 | }
|
---|
5107 |
|
---|
5108 | case NDR_PNP_UNINSTALLDEVINST: {
|
---|
5109 | struct PNP_UninstallDevInst *r = (struct PNP_UninstallDevInst *)_r;
|
---|
5110 | r->out.result = _PNP_UninstallDevInst(cli->pipes_struct, r);
|
---|
5111 | return NT_STATUS_OK;
|
---|
5112 | }
|
---|
5113 |
|
---|
5114 | case NDR_PNP_ADDID: {
|
---|
5115 | struct PNP_AddID *r = (struct PNP_AddID *)_r;
|
---|
5116 | r->out.result = _PNP_AddID(cli->pipes_struct, r);
|
---|
5117 | return NT_STATUS_OK;
|
---|
5118 | }
|
---|
5119 |
|
---|
5120 | case NDR_PNP_REGISTERDRIVER: {
|
---|
5121 | struct PNP_RegisterDriver *r = (struct PNP_RegisterDriver *)_r;
|
---|
5122 | r->out.result = _PNP_RegisterDriver(cli->pipes_struct, r);
|
---|
5123 | return NT_STATUS_OK;
|
---|
5124 | }
|
---|
5125 |
|
---|
5126 | case NDR_PNP_QUERYREMOVE: {
|
---|
5127 | struct PNP_QueryRemove *r = (struct PNP_QueryRemove *)_r;
|
---|
5128 | r->out.result = _PNP_QueryRemove(cli->pipes_struct, r);
|
---|
5129 | return NT_STATUS_OK;
|
---|
5130 | }
|
---|
5131 |
|
---|
5132 | case NDR_PNP_REQUESTDEVICEEJECT: {
|
---|
5133 | struct PNP_RequestDeviceEject *r = (struct PNP_RequestDeviceEject *)_r;
|
---|
5134 | r->out.result = _PNP_RequestDeviceEject(cli->pipes_struct, r);
|
---|
5135 | return NT_STATUS_OK;
|
---|
5136 | }
|
---|
5137 |
|
---|
5138 | case NDR_PNP_ISDOCKSTATIONPRESENT: {
|
---|
5139 | struct PNP_IsDockStationPresent *r = (struct PNP_IsDockStationPresent *)_r;
|
---|
5140 | r->out.result = _PNP_IsDockStationPresent(cli->pipes_struct, r);
|
---|
5141 | return NT_STATUS_OK;
|
---|
5142 | }
|
---|
5143 |
|
---|
5144 | case NDR_PNP_REQUESTEJECTPC: {
|
---|
5145 | struct PNP_RequestEjectPC *r = (struct PNP_RequestEjectPC *)_r;
|
---|
5146 | r->out.result = _PNP_RequestEjectPC(cli->pipes_struct, r);
|
---|
5147 | return NT_STATUS_OK;
|
---|
5148 | }
|
---|
5149 |
|
---|
5150 | case NDR_PNP_HWPROFFLAGS: {
|
---|
5151 | struct PNP_HwProfFlags *r = (struct PNP_HwProfFlags *)_r;
|
---|
5152 | ZERO_STRUCT(r->out);
|
---|
5153 | r->out.profile_flags = r->in.profile_flags;
|
---|
5154 | r->out.veto_type = r->in.veto_type;
|
---|
5155 | r->out.unknown5a = talloc_zero(mem_ctx, const char *);
|
---|
5156 | if (r->out.unknown5a == NULL) {
|
---|
5157 | return NT_STATUS_NO_MEMORY;
|
---|
5158 | }
|
---|
5159 |
|
---|
5160 | r->out.result = _PNP_HwProfFlags(cli->pipes_struct, r);
|
---|
5161 | return NT_STATUS_OK;
|
---|
5162 | }
|
---|
5163 |
|
---|
5164 | case NDR_PNP_GETHWPROFINFO: {
|
---|
5165 | struct PNP_GetHwProfInfo *r = (struct PNP_GetHwProfInfo *)_r;
|
---|
5166 | ZERO_STRUCT(r->out);
|
---|
5167 | r->out.info = r->in.info;
|
---|
5168 | r->out.result = _PNP_GetHwProfInfo(cli->pipes_struct, r);
|
---|
5169 | return NT_STATUS_OK;
|
---|
5170 | }
|
---|
5171 |
|
---|
5172 | case NDR_PNP_ADDEMPTYLOGCONF: {
|
---|
5173 | struct PNP_AddEmptyLogConf *r = (struct PNP_AddEmptyLogConf *)_r;
|
---|
5174 | r->out.result = _PNP_AddEmptyLogConf(cli->pipes_struct, r);
|
---|
5175 | return NT_STATUS_OK;
|
---|
5176 | }
|
---|
5177 |
|
---|
5178 | case NDR_PNP_FREELOGCONF: {
|
---|
5179 | struct PNP_FreeLogConf *r = (struct PNP_FreeLogConf *)_r;
|
---|
5180 | r->out.result = _PNP_FreeLogConf(cli->pipes_struct, r);
|
---|
5181 | return NT_STATUS_OK;
|
---|
5182 | }
|
---|
5183 |
|
---|
5184 | case NDR_PNP_GETFIRSTLOGCONF: {
|
---|
5185 | struct PNP_GetFirstLogConf *r = (struct PNP_GetFirstLogConf *)_r;
|
---|
5186 | r->out.result = _PNP_GetFirstLogConf(cli->pipes_struct, r);
|
---|
5187 | return NT_STATUS_OK;
|
---|
5188 | }
|
---|
5189 |
|
---|
5190 | case NDR_PNP_GETNEXTLOGCONF: {
|
---|
5191 | struct PNP_GetNextLogConf *r = (struct PNP_GetNextLogConf *)_r;
|
---|
5192 | r->out.result = _PNP_GetNextLogConf(cli->pipes_struct, r);
|
---|
5193 | return NT_STATUS_OK;
|
---|
5194 | }
|
---|
5195 |
|
---|
5196 | case NDR_PNP_GETLOGCONFPRIORITY: {
|
---|
5197 | struct PNP_GetLogConfPriority *r = (struct PNP_GetLogConfPriority *)_r;
|
---|
5198 | r->out.result = _PNP_GetLogConfPriority(cli->pipes_struct, r);
|
---|
5199 | return NT_STATUS_OK;
|
---|
5200 | }
|
---|
5201 |
|
---|
5202 | case NDR_PNP_ADDRESDES: {
|
---|
5203 | struct PNP_AddResDes *r = (struct PNP_AddResDes *)_r;
|
---|
5204 | r->out.result = _PNP_AddResDes(cli->pipes_struct, r);
|
---|
5205 | return NT_STATUS_OK;
|
---|
5206 | }
|
---|
5207 |
|
---|
5208 | case NDR_PNP_FREERESDES: {
|
---|
5209 | struct PNP_FreeResDes *r = (struct PNP_FreeResDes *)_r;
|
---|
5210 | r->out.result = _PNP_FreeResDes(cli->pipes_struct, r);
|
---|
5211 | return NT_STATUS_OK;
|
---|
5212 | }
|
---|
5213 |
|
---|
5214 | case NDR_PNP_GETNEXTRESDES: {
|
---|
5215 | struct PNP_GetNextResDes *r = (struct PNP_GetNextResDes *)_r;
|
---|
5216 | r->out.result = _PNP_GetNextResDes(cli->pipes_struct, r);
|
---|
5217 | return NT_STATUS_OK;
|
---|
5218 | }
|
---|
5219 |
|
---|
5220 | case NDR_PNP_GETRESDESDATA: {
|
---|
5221 | struct PNP_GetResDesData *r = (struct PNP_GetResDesData *)_r;
|
---|
5222 | r->out.result = _PNP_GetResDesData(cli->pipes_struct, r);
|
---|
5223 | return NT_STATUS_OK;
|
---|
5224 | }
|
---|
5225 |
|
---|
5226 | case NDR_PNP_GETRESDESDATASIZE: {
|
---|
5227 | struct PNP_GetResDesDataSize *r = (struct PNP_GetResDesDataSize *)_r;
|
---|
5228 | r->out.result = _PNP_GetResDesDataSize(cli->pipes_struct, r);
|
---|
5229 | return NT_STATUS_OK;
|
---|
5230 | }
|
---|
5231 |
|
---|
5232 | case NDR_PNP_MODIFYRESDES: {
|
---|
5233 | struct PNP_ModifyResDes *r = (struct PNP_ModifyResDes *)_r;
|
---|
5234 | r->out.result = _PNP_ModifyResDes(cli->pipes_struct, r);
|
---|
5235 | return NT_STATUS_OK;
|
---|
5236 | }
|
---|
5237 |
|
---|
5238 | case NDR_PNP_DETECTRESOURCELIMIT: {
|
---|
5239 | struct PNP_DetectResourceLimit *r = (struct PNP_DetectResourceLimit *)_r;
|
---|
5240 | r->out.result = _PNP_DetectResourceLimit(cli->pipes_struct, r);
|
---|
5241 | return NT_STATUS_OK;
|
---|
5242 | }
|
---|
5243 |
|
---|
5244 | case NDR_PNP_QUERYRESCONFLIST: {
|
---|
5245 | struct PNP_QueryResConfList *r = (struct PNP_QueryResConfList *)_r;
|
---|
5246 | r->out.result = _PNP_QueryResConfList(cli->pipes_struct, r);
|
---|
5247 | return NT_STATUS_OK;
|
---|
5248 | }
|
---|
5249 |
|
---|
5250 | case NDR_PNP_SETHWPROF: {
|
---|
5251 | struct PNP_SetHwProf *r = (struct PNP_SetHwProf *)_r;
|
---|
5252 | r->out.result = _PNP_SetHwProf(cli->pipes_struct, r);
|
---|
5253 | return NT_STATUS_OK;
|
---|
5254 | }
|
---|
5255 |
|
---|
5256 | case NDR_PNP_QUERYARBITRATORFREEDATA: {
|
---|
5257 | struct PNP_QueryArbitratorFreeData *r = (struct PNP_QueryArbitratorFreeData *)_r;
|
---|
5258 | r->out.result = _PNP_QueryArbitratorFreeData(cli->pipes_struct, r);
|
---|
5259 | return NT_STATUS_OK;
|
---|
5260 | }
|
---|
5261 |
|
---|
5262 | case NDR_PNP_QUERYARBITRATORFREESIZE: {
|
---|
5263 | struct PNP_QueryArbitratorFreeSize *r = (struct PNP_QueryArbitratorFreeSize *)_r;
|
---|
5264 | r->out.result = _PNP_QueryArbitratorFreeSize(cli->pipes_struct, r);
|
---|
5265 | return NT_STATUS_OK;
|
---|
5266 | }
|
---|
5267 |
|
---|
5268 | case NDR_PNP_RUNDETECTION: {
|
---|
5269 | struct PNP_RunDetection *r = (struct PNP_RunDetection *)_r;
|
---|
5270 | r->out.result = _PNP_RunDetection(cli->pipes_struct, r);
|
---|
5271 | return NT_STATUS_OK;
|
---|
5272 | }
|
---|
5273 |
|
---|
5274 | case NDR_PNP_REGISTERNOTIFICATION: {
|
---|
5275 | struct PNP_RegisterNotification *r = (struct PNP_RegisterNotification *)_r;
|
---|
5276 | r->out.result = _PNP_RegisterNotification(cli->pipes_struct, r);
|
---|
5277 | return NT_STATUS_OK;
|
---|
5278 | }
|
---|
5279 |
|
---|
5280 | case NDR_PNP_UNREGISTERNOTIFICATION: {
|
---|
5281 | struct PNP_UnregisterNotification *r = (struct PNP_UnregisterNotification *)_r;
|
---|
5282 | r->out.result = _PNP_UnregisterNotification(cli->pipes_struct, r);
|
---|
5283 | return NT_STATUS_OK;
|
---|
5284 | }
|
---|
5285 |
|
---|
5286 | case NDR_PNP_GETCUSTOMDEVPROP: {
|
---|
5287 | struct PNP_GetCustomDevProp *r = (struct PNP_GetCustomDevProp *)_r;
|
---|
5288 | r->out.result = _PNP_GetCustomDevProp(cli->pipes_struct, r);
|
---|
5289 | return NT_STATUS_OK;
|
---|
5290 | }
|
---|
5291 |
|
---|
5292 | case NDR_PNP_GETVERSIONINTERNAL: {
|
---|
5293 | struct PNP_GetVersionInternal *r = (struct PNP_GetVersionInternal *)_r;
|
---|
5294 | r->out.result = _PNP_GetVersionInternal(cli->pipes_struct, r);
|
---|
5295 | return NT_STATUS_OK;
|
---|
5296 | }
|
---|
5297 |
|
---|
5298 | case NDR_PNP_GETBLOCKEDDRIVERINFO: {
|
---|
5299 | struct PNP_GetBlockedDriverInfo *r = (struct PNP_GetBlockedDriverInfo *)_r;
|
---|
5300 | r->out.result = _PNP_GetBlockedDriverInfo(cli->pipes_struct, r);
|
---|
5301 | return NT_STATUS_OK;
|
---|
5302 | }
|
---|
5303 |
|
---|
5304 | case NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS: {
|
---|
5305 | struct PNP_GetServerSideDeviceInstallFlags *r = (struct PNP_GetServerSideDeviceInstallFlags *)_r;
|
---|
5306 | r->out.result = _PNP_GetServerSideDeviceInstallFlags(cli->pipes_struct, r);
|
---|
5307 | return NT_STATUS_OK;
|
---|
5308 | }
|
---|
5309 |
|
---|
5310 | default:
|
---|
5311 | return NT_STATUS_NOT_IMPLEMENTED;
|
---|
5312 | }
|
---|
5313 | }
|
---|
5314 |
|
---|
5315 | NTSTATUS rpc_ntsvcs_init(void)
|
---|
5316 | {
|
---|
5317 | return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "ntsvcs", "ntsvcs", &ndr_table_ntsvcs, api_ntsvcs_cmds, sizeof(api_ntsvcs_cmds) / sizeof(struct api_struct));
|
---|
5318 | }
|
---|