s3:net: add a command "net registry setsd_sdd"
[Samba/ekacnet.git] / librpc / gen_ndr / srv_srvsvc.c
blobf024c177c4b2ed4f12ed5a9cc7115963bf778198
1 /*
2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/srv_srvsvc.h"
9 static bool api_srvsvc_NetCharDevEnum(pipes_struct *p)
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 srvsvc_NetCharDevEnum *r;
18 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVENUM];
20 r = talloc(talloc_tos(), struct srvsvc_NetCharDevEnum);
21 if (r == NULL) {
22 return false;
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26 talloc_free(r);
27 return false;
30 pull = ndr_pull_init_blob(&blob, r, NULL);
31 if (pull == NULL) {
32 talloc_free(r);
33 return false;
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;
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum, r);
47 ZERO_STRUCT(r->out);
48 r->out.info_ctr = r->in.info_ctr;
49 r->out.resume_handle = r->in.resume_handle;
50 r->out.totalentries = talloc_zero(r, uint32_t);
51 if (r->out.totalentries == NULL) {
52 talloc_free(r);
53 return false;
56 r->out.result = _srvsvc_NetCharDevEnum(p, r);
58 if (p->rng_fault_state) {
59 talloc_free(r);
60 /* Return true here, srv_pipe_hnd.c will take care */
61 return true;
64 if (DEBUGLEVEL >= 10) {
65 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, r);
68 push = ndr_push_init_ctx(r, NULL);
69 if (push == NULL) {
70 talloc_free(r);
71 return false;
74 ndr_err = call->ndr_push(push, NDR_OUT, r);
75 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
76 talloc_free(r);
77 return false;
80 blob = ndr_push_blob(push);
81 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
82 talloc_free(r);
83 return false;
86 talloc_free(r);
88 return true;
91 static bool api_srvsvc_NetCharDevGetInfo(pipes_struct *p)
93 const struct ndr_interface_call *call;
94 struct ndr_pull *pull;
95 struct ndr_push *push;
96 enum ndr_err_code ndr_err;
97 DATA_BLOB blob;
98 struct srvsvc_NetCharDevGetInfo *r;
100 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVGETINFO];
102 r = talloc(talloc_tos(), struct srvsvc_NetCharDevGetInfo);
103 if (r == NULL) {
104 return false;
107 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
108 talloc_free(r);
109 return false;
112 pull = ndr_pull_init_blob(&blob, r, NULL);
113 if (pull == NULL) {
114 talloc_free(r);
115 return false;
118 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
119 ndr_err = call->ndr_pull(pull, NDR_IN, r);
120 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
121 talloc_free(r);
122 return false;
125 if (DEBUGLEVEL >= 10) {
126 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo, r);
129 ZERO_STRUCT(r->out);
130 r->out.info = talloc_zero(r, union srvsvc_NetCharDevInfo);
131 if (r->out.info == NULL) {
132 talloc_free(r);
133 return false;
136 r->out.result = _srvsvc_NetCharDevGetInfo(p, r);
138 if (p->rng_fault_state) {
139 talloc_free(r);
140 /* Return true here, srv_pipe_hnd.c will take care */
141 return true;
144 if (DEBUGLEVEL >= 10) {
145 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, r);
148 push = ndr_push_init_ctx(r, NULL);
149 if (push == NULL) {
150 talloc_free(r);
151 return false;
154 ndr_err = call->ndr_push(push, NDR_OUT, r);
155 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
156 talloc_free(r);
157 return false;
160 blob = ndr_push_blob(push);
161 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
162 talloc_free(r);
163 return false;
166 talloc_free(r);
168 return true;
171 static bool api_srvsvc_NetCharDevControl(pipes_struct *p)
173 const struct ndr_interface_call *call;
174 struct ndr_pull *pull;
175 struct ndr_push *push;
176 enum ndr_err_code ndr_err;
177 DATA_BLOB blob;
178 struct srvsvc_NetCharDevControl *r;
180 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVCONTROL];
182 r = talloc(talloc_tos(), struct srvsvc_NetCharDevControl);
183 if (r == NULL) {
184 return false;
187 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
188 talloc_free(r);
189 return false;
192 pull = ndr_pull_init_blob(&blob, r, NULL);
193 if (pull == NULL) {
194 talloc_free(r);
195 return false;
198 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
199 ndr_err = call->ndr_pull(pull, NDR_IN, r);
200 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
201 talloc_free(r);
202 return false;
205 if (DEBUGLEVEL >= 10) {
206 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl, r);
209 r->out.result = _srvsvc_NetCharDevControl(p, r);
211 if (p->rng_fault_state) {
212 talloc_free(r);
213 /* Return true here, srv_pipe_hnd.c will take care */
214 return true;
217 if (DEBUGLEVEL >= 10) {
218 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, r);
221 push = ndr_push_init_ctx(r, NULL);
222 if (push == NULL) {
223 talloc_free(r);
224 return false;
227 ndr_err = call->ndr_push(push, NDR_OUT, r);
228 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
229 talloc_free(r);
230 return false;
233 blob = ndr_push_blob(push);
234 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
235 talloc_free(r);
236 return false;
239 talloc_free(r);
241 return true;
244 static bool api_srvsvc_NetCharDevQEnum(pipes_struct *p)
246 const struct ndr_interface_call *call;
247 struct ndr_pull *pull;
248 struct ndr_push *push;
249 enum ndr_err_code ndr_err;
250 DATA_BLOB blob;
251 struct srvsvc_NetCharDevQEnum *r;
253 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQENUM];
255 r = talloc(talloc_tos(), struct srvsvc_NetCharDevQEnum);
256 if (r == NULL) {
257 return false;
260 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
261 talloc_free(r);
262 return false;
265 pull = ndr_pull_init_blob(&blob, r, NULL);
266 if (pull == NULL) {
267 talloc_free(r);
268 return false;
271 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
272 ndr_err = call->ndr_pull(pull, NDR_IN, r);
273 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
274 talloc_free(r);
275 return false;
278 if (DEBUGLEVEL >= 10) {
279 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum, r);
282 ZERO_STRUCT(r->out);
283 r->out.info_ctr = r->in.info_ctr;
284 r->out.resume_handle = r->in.resume_handle;
285 r->out.totalentries = talloc_zero(r, uint32_t);
286 if (r->out.totalentries == NULL) {
287 talloc_free(r);
288 return false;
291 r->out.result = _srvsvc_NetCharDevQEnum(p, r);
293 if (p->rng_fault_state) {
294 talloc_free(r);
295 /* Return true here, srv_pipe_hnd.c will take care */
296 return true;
299 if (DEBUGLEVEL >= 10) {
300 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, r);
303 push = ndr_push_init_ctx(r, NULL);
304 if (push == NULL) {
305 talloc_free(r);
306 return false;
309 ndr_err = call->ndr_push(push, NDR_OUT, r);
310 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
311 talloc_free(r);
312 return false;
315 blob = ndr_push_blob(push);
316 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
317 talloc_free(r);
318 return false;
321 talloc_free(r);
323 return true;
326 static bool api_srvsvc_NetCharDevQGetInfo(pipes_struct *p)
328 const struct ndr_interface_call *call;
329 struct ndr_pull *pull;
330 struct ndr_push *push;
331 enum ndr_err_code ndr_err;
332 DATA_BLOB blob;
333 struct srvsvc_NetCharDevQGetInfo *r;
335 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQGETINFO];
337 r = talloc(talloc_tos(), struct srvsvc_NetCharDevQGetInfo);
338 if (r == NULL) {
339 return false;
342 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
343 talloc_free(r);
344 return false;
347 pull = ndr_pull_init_blob(&blob, r, NULL);
348 if (pull == NULL) {
349 talloc_free(r);
350 return false;
353 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
354 ndr_err = call->ndr_pull(pull, NDR_IN, r);
355 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
356 talloc_free(r);
357 return false;
360 if (DEBUGLEVEL >= 10) {
361 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo, r);
364 ZERO_STRUCT(r->out);
365 r->out.info = talloc_zero(r, union srvsvc_NetCharDevQInfo);
366 if (r->out.info == NULL) {
367 talloc_free(r);
368 return false;
371 r->out.result = _srvsvc_NetCharDevQGetInfo(p, r);
373 if (p->rng_fault_state) {
374 talloc_free(r);
375 /* Return true here, srv_pipe_hnd.c will take care */
376 return true;
379 if (DEBUGLEVEL >= 10) {
380 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, r);
383 push = ndr_push_init_ctx(r, NULL);
384 if (push == NULL) {
385 talloc_free(r);
386 return false;
389 ndr_err = call->ndr_push(push, NDR_OUT, r);
390 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
391 talloc_free(r);
392 return false;
395 blob = ndr_push_blob(push);
396 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
397 talloc_free(r);
398 return false;
401 talloc_free(r);
403 return true;
406 static bool api_srvsvc_NetCharDevQSetInfo(pipes_struct *p)
408 const struct ndr_interface_call *call;
409 struct ndr_pull *pull;
410 struct ndr_push *push;
411 enum ndr_err_code ndr_err;
412 DATA_BLOB blob;
413 struct srvsvc_NetCharDevQSetInfo *r;
415 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQSETINFO];
417 r = talloc(talloc_tos(), struct srvsvc_NetCharDevQSetInfo);
418 if (r == NULL) {
419 return false;
422 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
423 talloc_free(r);
424 return false;
427 pull = ndr_pull_init_blob(&blob, r, NULL);
428 if (pull == NULL) {
429 talloc_free(r);
430 return false;
433 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
434 ndr_err = call->ndr_pull(pull, NDR_IN, r);
435 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
436 talloc_free(r);
437 return false;
440 if (DEBUGLEVEL >= 10) {
441 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo, r);
444 ZERO_STRUCT(r->out);
445 r->out.parm_error = r->in.parm_error;
446 r->out.result = _srvsvc_NetCharDevQSetInfo(p, r);
448 if (p->rng_fault_state) {
449 talloc_free(r);
450 /* Return true here, srv_pipe_hnd.c will take care */
451 return true;
454 if (DEBUGLEVEL >= 10) {
455 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, r);
458 push = ndr_push_init_ctx(r, NULL);
459 if (push == NULL) {
460 talloc_free(r);
461 return false;
464 ndr_err = call->ndr_push(push, NDR_OUT, r);
465 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
466 talloc_free(r);
467 return false;
470 blob = ndr_push_blob(push);
471 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
472 talloc_free(r);
473 return false;
476 talloc_free(r);
478 return true;
481 static bool api_srvsvc_NetCharDevQPurge(pipes_struct *p)
483 const struct ndr_interface_call *call;
484 struct ndr_pull *pull;
485 struct ndr_push *push;
486 enum ndr_err_code ndr_err;
487 DATA_BLOB blob;
488 struct srvsvc_NetCharDevQPurge *r;
490 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQPURGE];
492 r = talloc(talloc_tos(), struct srvsvc_NetCharDevQPurge);
493 if (r == NULL) {
494 return false;
497 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
498 talloc_free(r);
499 return false;
502 pull = ndr_pull_init_blob(&blob, r, NULL);
503 if (pull == NULL) {
504 talloc_free(r);
505 return false;
508 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
509 ndr_err = call->ndr_pull(pull, NDR_IN, r);
510 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
511 talloc_free(r);
512 return false;
515 if (DEBUGLEVEL >= 10) {
516 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge, r);
519 r->out.result = _srvsvc_NetCharDevQPurge(p, r);
521 if (p->rng_fault_state) {
522 talloc_free(r);
523 /* Return true here, srv_pipe_hnd.c will take care */
524 return true;
527 if (DEBUGLEVEL >= 10) {
528 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, r);
531 push = ndr_push_init_ctx(r, NULL);
532 if (push == NULL) {
533 talloc_free(r);
534 return false;
537 ndr_err = call->ndr_push(push, NDR_OUT, r);
538 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
539 talloc_free(r);
540 return false;
543 blob = ndr_push_blob(push);
544 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
545 talloc_free(r);
546 return false;
549 talloc_free(r);
551 return true;
554 static bool api_srvsvc_NetCharDevQPurgeSelf(pipes_struct *p)
556 const struct ndr_interface_call *call;
557 struct ndr_pull *pull;
558 struct ndr_push *push;
559 enum ndr_err_code ndr_err;
560 DATA_BLOB blob;
561 struct srvsvc_NetCharDevQPurgeSelf *r;
563 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCHARDEVQPURGESELF];
565 r = talloc(talloc_tos(), struct srvsvc_NetCharDevQPurgeSelf);
566 if (r == NULL) {
567 return false;
570 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
571 talloc_free(r);
572 return false;
575 pull = ndr_pull_init_blob(&blob, r, NULL);
576 if (pull == NULL) {
577 talloc_free(r);
578 return false;
581 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
582 ndr_err = call->ndr_pull(pull, NDR_IN, r);
583 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
584 talloc_free(r);
585 return false;
588 if (DEBUGLEVEL >= 10) {
589 NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf, r);
592 r->out.result = _srvsvc_NetCharDevQPurgeSelf(p, r);
594 if (p->rng_fault_state) {
595 talloc_free(r);
596 /* Return true here, srv_pipe_hnd.c will take care */
597 return true;
600 if (DEBUGLEVEL >= 10) {
601 NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, r);
604 push = ndr_push_init_ctx(r, NULL);
605 if (push == NULL) {
606 talloc_free(r);
607 return false;
610 ndr_err = call->ndr_push(push, NDR_OUT, r);
611 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
612 talloc_free(r);
613 return false;
616 blob = ndr_push_blob(push);
617 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
618 talloc_free(r);
619 return false;
622 talloc_free(r);
624 return true;
627 static bool api_srvsvc_NetConnEnum(pipes_struct *p)
629 const struct ndr_interface_call *call;
630 struct ndr_pull *pull;
631 struct ndr_push *push;
632 enum ndr_err_code ndr_err;
633 DATA_BLOB blob;
634 struct srvsvc_NetConnEnum *r;
636 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETCONNENUM];
638 r = talloc(talloc_tos(), struct srvsvc_NetConnEnum);
639 if (r == NULL) {
640 return false;
643 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
644 talloc_free(r);
645 return false;
648 pull = ndr_pull_init_blob(&blob, r, NULL);
649 if (pull == NULL) {
650 talloc_free(r);
651 return false;
654 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
655 ndr_err = call->ndr_pull(pull, NDR_IN, r);
656 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
657 talloc_free(r);
658 return false;
661 if (DEBUGLEVEL >= 10) {
662 NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, r);
665 ZERO_STRUCT(r->out);
666 r->out.info_ctr = r->in.info_ctr;
667 r->out.resume_handle = r->in.resume_handle;
668 r->out.totalentries = talloc_zero(r, uint32_t);
669 if (r->out.totalentries == NULL) {
670 talloc_free(r);
671 return false;
674 r->out.result = _srvsvc_NetConnEnum(p, r);
676 if (p->rng_fault_state) {
677 talloc_free(r);
678 /* Return true here, srv_pipe_hnd.c will take care */
679 return true;
682 if (DEBUGLEVEL >= 10) {
683 NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, r);
686 push = ndr_push_init_ctx(r, NULL);
687 if (push == NULL) {
688 talloc_free(r);
689 return false;
692 ndr_err = call->ndr_push(push, NDR_OUT, r);
693 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
694 talloc_free(r);
695 return false;
698 blob = ndr_push_blob(push);
699 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
700 talloc_free(r);
701 return false;
704 talloc_free(r);
706 return true;
709 static bool api_srvsvc_NetFileEnum(pipes_struct *p)
711 const struct ndr_interface_call *call;
712 struct ndr_pull *pull;
713 struct ndr_push *push;
714 enum ndr_err_code ndr_err;
715 DATA_BLOB blob;
716 struct srvsvc_NetFileEnum *r;
718 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETFILEENUM];
720 r = talloc(talloc_tos(), struct srvsvc_NetFileEnum);
721 if (r == NULL) {
722 return false;
725 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
726 talloc_free(r);
727 return false;
730 pull = ndr_pull_init_blob(&blob, r, NULL);
731 if (pull == NULL) {
732 talloc_free(r);
733 return false;
736 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
737 ndr_err = call->ndr_pull(pull, NDR_IN, r);
738 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
739 talloc_free(r);
740 return false;
743 if (DEBUGLEVEL >= 10) {
744 NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, r);
747 ZERO_STRUCT(r->out);
748 r->out.info_ctr = r->in.info_ctr;
749 r->out.resume_handle = r->in.resume_handle;
750 r->out.totalentries = talloc_zero(r, uint32_t);
751 if (r->out.totalentries == NULL) {
752 talloc_free(r);
753 return false;
756 r->out.result = _srvsvc_NetFileEnum(p, r);
758 if (p->rng_fault_state) {
759 talloc_free(r);
760 /* Return true here, srv_pipe_hnd.c will take care */
761 return true;
764 if (DEBUGLEVEL >= 10) {
765 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, r);
768 push = ndr_push_init_ctx(r, NULL);
769 if (push == NULL) {
770 talloc_free(r);
771 return false;
774 ndr_err = call->ndr_push(push, NDR_OUT, r);
775 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
776 talloc_free(r);
777 return false;
780 blob = ndr_push_blob(push);
781 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
782 talloc_free(r);
783 return false;
786 talloc_free(r);
788 return true;
791 static bool api_srvsvc_NetFileGetInfo(pipes_struct *p)
793 const struct ndr_interface_call *call;
794 struct ndr_pull *pull;
795 struct ndr_push *push;
796 enum ndr_err_code ndr_err;
797 DATA_BLOB blob;
798 struct srvsvc_NetFileGetInfo *r;
800 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETFILEGETINFO];
802 r = talloc(talloc_tos(), struct srvsvc_NetFileGetInfo);
803 if (r == NULL) {
804 return false;
807 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
808 talloc_free(r);
809 return false;
812 pull = ndr_pull_init_blob(&blob, r, NULL);
813 if (pull == NULL) {
814 talloc_free(r);
815 return false;
818 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
819 ndr_err = call->ndr_pull(pull, NDR_IN, r);
820 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
821 talloc_free(r);
822 return false;
825 if (DEBUGLEVEL >= 10) {
826 NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo, r);
829 ZERO_STRUCT(r->out);
830 r->out.info = talloc_zero(r, union srvsvc_NetFileInfo);
831 if (r->out.info == NULL) {
832 talloc_free(r);
833 return false;
836 r->out.result = _srvsvc_NetFileGetInfo(p, r);
838 if (p->rng_fault_state) {
839 talloc_free(r);
840 /* Return true here, srv_pipe_hnd.c will take care */
841 return true;
844 if (DEBUGLEVEL >= 10) {
845 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, r);
848 push = ndr_push_init_ctx(r, NULL);
849 if (push == NULL) {
850 talloc_free(r);
851 return false;
854 ndr_err = call->ndr_push(push, NDR_OUT, r);
855 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
856 talloc_free(r);
857 return false;
860 blob = ndr_push_blob(push);
861 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
862 talloc_free(r);
863 return false;
866 talloc_free(r);
868 return true;
871 static bool api_srvsvc_NetFileClose(pipes_struct *p)
873 const struct ndr_interface_call *call;
874 struct ndr_pull *pull;
875 struct ndr_push *push;
876 enum ndr_err_code ndr_err;
877 DATA_BLOB blob;
878 struct srvsvc_NetFileClose *r;
880 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETFILECLOSE];
882 r = talloc(talloc_tos(), struct srvsvc_NetFileClose);
883 if (r == NULL) {
884 return false;
887 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
888 talloc_free(r);
889 return false;
892 pull = ndr_pull_init_blob(&blob, r, NULL);
893 if (pull == NULL) {
894 talloc_free(r);
895 return false;
898 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
899 ndr_err = call->ndr_pull(pull, NDR_IN, r);
900 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
901 talloc_free(r);
902 return false;
905 if (DEBUGLEVEL >= 10) {
906 NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose, r);
909 r->out.result = _srvsvc_NetFileClose(p, r);
911 if (p->rng_fault_state) {
912 talloc_free(r);
913 /* Return true here, srv_pipe_hnd.c will take care */
914 return true;
917 if (DEBUGLEVEL >= 10) {
918 NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, r);
921 push = ndr_push_init_ctx(r, NULL);
922 if (push == NULL) {
923 talloc_free(r);
924 return false;
927 ndr_err = call->ndr_push(push, NDR_OUT, r);
928 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
929 talloc_free(r);
930 return false;
933 blob = ndr_push_blob(push);
934 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
935 talloc_free(r);
936 return false;
939 talloc_free(r);
941 return true;
944 static bool api_srvsvc_NetSessEnum(pipes_struct *p)
946 const struct ndr_interface_call *call;
947 struct ndr_pull *pull;
948 struct ndr_push *push;
949 enum ndr_err_code ndr_err;
950 DATA_BLOB blob;
951 struct srvsvc_NetSessEnum *r;
953 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSESSENUM];
955 r = talloc(talloc_tos(), struct srvsvc_NetSessEnum);
956 if (r == NULL) {
957 return false;
960 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
961 talloc_free(r);
962 return false;
965 pull = ndr_pull_init_blob(&blob, r, NULL);
966 if (pull == NULL) {
967 talloc_free(r);
968 return false;
971 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
972 ndr_err = call->ndr_pull(pull, NDR_IN, r);
973 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
974 talloc_free(r);
975 return false;
978 if (DEBUGLEVEL >= 10) {
979 NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, r);
982 ZERO_STRUCT(r->out);
983 r->out.info_ctr = r->in.info_ctr;
984 r->out.resume_handle = r->in.resume_handle;
985 r->out.totalentries = talloc_zero(r, uint32_t);
986 if (r->out.totalentries == NULL) {
987 talloc_free(r);
988 return false;
991 r->out.result = _srvsvc_NetSessEnum(p, r);
993 if (p->rng_fault_state) {
994 talloc_free(r);
995 /* Return true here, srv_pipe_hnd.c will take care */
996 return true;
999 if (DEBUGLEVEL >= 10) {
1000 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, r);
1003 push = ndr_push_init_ctx(r, NULL);
1004 if (push == NULL) {
1005 talloc_free(r);
1006 return false;
1009 ndr_err = call->ndr_push(push, NDR_OUT, r);
1010 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1011 talloc_free(r);
1012 return false;
1015 blob = ndr_push_blob(push);
1016 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1017 talloc_free(r);
1018 return false;
1021 talloc_free(r);
1023 return true;
1026 static bool api_srvsvc_NetSessDel(pipes_struct *p)
1028 const struct ndr_interface_call *call;
1029 struct ndr_pull *pull;
1030 struct ndr_push *push;
1031 enum ndr_err_code ndr_err;
1032 DATA_BLOB blob;
1033 struct srvsvc_NetSessDel *r;
1035 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSESSDEL];
1037 r = talloc(talloc_tos(), struct srvsvc_NetSessDel);
1038 if (r == NULL) {
1039 return false;
1042 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1043 talloc_free(r);
1044 return false;
1047 pull = ndr_pull_init_blob(&blob, r, NULL);
1048 if (pull == NULL) {
1049 talloc_free(r);
1050 return false;
1053 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1054 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1055 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1056 talloc_free(r);
1057 return false;
1060 if (DEBUGLEVEL >= 10) {
1061 NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel, r);
1064 r->out.result = _srvsvc_NetSessDel(p, r);
1066 if (p->rng_fault_state) {
1067 talloc_free(r);
1068 /* Return true here, srv_pipe_hnd.c will take care */
1069 return true;
1072 if (DEBUGLEVEL >= 10) {
1073 NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, r);
1076 push = ndr_push_init_ctx(r, NULL);
1077 if (push == NULL) {
1078 talloc_free(r);
1079 return false;
1082 ndr_err = call->ndr_push(push, NDR_OUT, r);
1083 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1084 talloc_free(r);
1085 return false;
1088 blob = ndr_push_blob(push);
1089 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1090 talloc_free(r);
1091 return false;
1094 talloc_free(r);
1096 return true;
1099 static bool api_srvsvc_NetShareAdd(pipes_struct *p)
1101 const struct ndr_interface_call *call;
1102 struct ndr_pull *pull;
1103 struct ndr_push *push;
1104 enum ndr_err_code ndr_err;
1105 DATA_BLOB blob;
1106 struct srvsvc_NetShareAdd *r;
1108 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREADD];
1110 r = talloc(talloc_tos(), struct srvsvc_NetShareAdd);
1111 if (r == NULL) {
1112 return false;
1115 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1116 talloc_free(r);
1117 return false;
1120 pull = ndr_pull_init_blob(&blob, r, NULL);
1121 if (pull == NULL) {
1122 talloc_free(r);
1123 return false;
1126 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1127 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1128 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1129 talloc_free(r);
1130 return false;
1133 if (DEBUGLEVEL >= 10) {
1134 NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd, r);
1137 ZERO_STRUCT(r->out);
1138 r->out.parm_error = r->in.parm_error;
1139 r->out.result = _srvsvc_NetShareAdd(p, r);
1141 if (p->rng_fault_state) {
1142 talloc_free(r);
1143 /* Return true here, srv_pipe_hnd.c will take care */
1144 return true;
1147 if (DEBUGLEVEL >= 10) {
1148 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, r);
1151 push = ndr_push_init_ctx(r, NULL);
1152 if (push == NULL) {
1153 talloc_free(r);
1154 return false;
1157 ndr_err = call->ndr_push(push, NDR_OUT, r);
1158 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1159 talloc_free(r);
1160 return false;
1163 blob = ndr_push_blob(push);
1164 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1165 talloc_free(r);
1166 return false;
1169 talloc_free(r);
1171 return true;
1174 static bool api_srvsvc_NetShareEnumAll(pipes_struct *p)
1176 const struct ndr_interface_call *call;
1177 struct ndr_pull *pull;
1178 struct ndr_push *push;
1179 enum ndr_err_code ndr_err;
1180 DATA_BLOB blob;
1181 struct srvsvc_NetShareEnumAll *r;
1183 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREENUMALL];
1185 r = talloc(talloc_tos(), struct srvsvc_NetShareEnumAll);
1186 if (r == NULL) {
1187 return false;
1190 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1191 talloc_free(r);
1192 return false;
1195 pull = ndr_pull_init_blob(&blob, r, NULL);
1196 if (pull == NULL) {
1197 talloc_free(r);
1198 return false;
1201 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1202 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1203 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1204 talloc_free(r);
1205 return false;
1208 if (DEBUGLEVEL >= 10) {
1209 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, r);
1212 ZERO_STRUCT(r->out);
1213 r->out.info_ctr = r->in.info_ctr;
1214 r->out.resume_handle = r->in.resume_handle;
1215 r->out.totalentries = talloc_zero(r, uint32_t);
1216 if (r->out.totalentries == NULL) {
1217 talloc_free(r);
1218 return false;
1221 r->out.result = _srvsvc_NetShareEnumAll(p, r);
1223 if (p->rng_fault_state) {
1224 talloc_free(r);
1225 /* Return true here, srv_pipe_hnd.c will take care */
1226 return true;
1229 if (DEBUGLEVEL >= 10) {
1230 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, r);
1233 push = ndr_push_init_ctx(r, NULL);
1234 if (push == NULL) {
1235 talloc_free(r);
1236 return false;
1239 ndr_err = call->ndr_push(push, NDR_OUT, r);
1240 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1241 talloc_free(r);
1242 return false;
1245 blob = ndr_push_blob(push);
1246 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1247 talloc_free(r);
1248 return false;
1251 talloc_free(r);
1253 return true;
1256 static bool api_srvsvc_NetShareGetInfo(pipes_struct *p)
1258 const struct ndr_interface_call *call;
1259 struct ndr_pull *pull;
1260 struct ndr_push *push;
1261 enum ndr_err_code ndr_err;
1262 DATA_BLOB blob;
1263 struct srvsvc_NetShareGetInfo *r;
1265 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREGETINFO];
1267 r = talloc(talloc_tos(), struct srvsvc_NetShareGetInfo);
1268 if (r == NULL) {
1269 return false;
1272 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1273 talloc_free(r);
1274 return false;
1277 pull = ndr_pull_init_blob(&blob, r, NULL);
1278 if (pull == NULL) {
1279 talloc_free(r);
1280 return false;
1283 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1284 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1285 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1286 talloc_free(r);
1287 return false;
1290 if (DEBUGLEVEL >= 10) {
1291 NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo, r);
1294 ZERO_STRUCT(r->out);
1295 r->out.info = talloc_zero(r, union srvsvc_NetShareInfo);
1296 if (r->out.info == NULL) {
1297 talloc_free(r);
1298 return false;
1301 r->out.result = _srvsvc_NetShareGetInfo(p, r);
1303 if (p->rng_fault_state) {
1304 talloc_free(r);
1305 /* Return true here, srv_pipe_hnd.c will take care */
1306 return true;
1309 if (DEBUGLEVEL >= 10) {
1310 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, r);
1313 push = ndr_push_init_ctx(r, NULL);
1314 if (push == NULL) {
1315 talloc_free(r);
1316 return false;
1319 ndr_err = call->ndr_push(push, NDR_OUT, r);
1320 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1321 talloc_free(r);
1322 return false;
1325 blob = ndr_push_blob(push);
1326 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1327 talloc_free(r);
1328 return false;
1331 talloc_free(r);
1333 return true;
1336 static bool api_srvsvc_NetShareSetInfo(pipes_struct *p)
1338 const struct ndr_interface_call *call;
1339 struct ndr_pull *pull;
1340 struct ndr_push *push;
1341 enum ndr_err_code ndr_err;
1342 DATA_BLOB blob;
1343 struct srvsvc_NetShareSetInfo *r;
1345 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHARESETINFO];
1347 r = talloc(talloc_tos(), struct srvsvc_NetShareSetInfo);
1348 if (r == NULL) {
1349 return false;
1352 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1353 talloc_free(r);
1354 return false;
1357 pull = ndr_pull_init_blob(&blob, r, NULL);
1358 if (pull == NULL) {
1359 talloc_free(r);
1360 return false;
1363 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1364 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1366 talloc_free(r);
1367 return false;
1370 if (DEBUGLEVEL >= 10) {
1371 NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo, r);
1374 ZERO_STRUCT(r->out);
1375 r->out.parm_error = r->in.parm_error;
1376 r->out.result = _srvsvc_NetShareSetInfo(p, r);
1378 if (p->rng_fault_state) {
1379 talloc_free(r);
1380 /* Return true here, srv_pipe_hnd.c will take care */
1381 return true;
1384 if (DEBUGLEVEL >= 10) {
1385 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, r);
1388 push = ndr_push_init_ctx(r, NULL);
1389 if (push == NULL) {
1390 talloc_free(r);
1391 return false;
1394 ndr_err = call->ndr_push(push, NDR_OUT, r);
1395 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1396 talloc_free(r);
1397 return false;
1400 blob = ndr_push_blob(push);
1401 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1402 talloc_free(r);
1403 return false;
1406 talloc_free(r);
1408 return true;
1411 static bool api_srvsvc_NetShareDel(pipes_struct *p)
1413 const struct ndr_interface_call *call;
1414 struct ndr_pull *pull;
1415 struct ndr_push *push;
1416 enum ndr_err_code ndr_err;
1417 DATA_BLOB blob;
1418 struct srvsvc_NetShareDel *r;
1420 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDEL];
1422 r = talloc(talloc_tos(), struct srvsvc_NetShareDel);
1423 if (r == NULL) {
1424 return false;
1427 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1428 talloc_free(r);
1429 return false;
1432 pull = ndr_pull_init_blob(&blob, r, NULL);
1433 if (pull == NULL) {
1434 talloc_free(r);
1435 return false;
1438 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1439 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1440 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1441 talloc_free(r);
1442 return false;
1445 if (DEBUGLEVEL >= 10) {
1446 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel, r);
1449 r->out.result = _srvsvc_NetShareDel(p, r);
1451 if (p->rng_fault_state) {
1452 talloc_free(r);
1453 /* Return true here, srv_pipe_hnd.c will take care */
1454 return true;
1457 if (DEBUGLEVEL >= 10) {
1458 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, r);
1461 push = ndr_push_init_ctx(r, NULL);
1462 if (push == NULL) {
1463 talloc_free(r);
1464 return false;
1467 ndr_err = call->ndr_push(push, NDR_OUT, r);
1468 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1469 talloc_free(r);
1470 return false;
1473 blob = ndr_push_blob(push);
1474 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1475 talloc_free(r);
1476 return false;
1479 talloc_free(r);
1481 return true;
1484 static bool api_srvsvc_NetShareDelSticky(pipes_struct *p)
1486 const struct ndr_interface_call *call;
1487 struct ndr_pull *pull;
1488 struct ndr_push *push;
1489 enum ndr_err_code ndr_err;
1490 DATA_BLOB blob;
1491 struct srvsvc_NetShareDelSticky *r;
1493 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDELSTICKY];
1495 r = talloc(talloc_tos(), struct srvsvc_NetShareDelSticky);
1496 if (r == NULL) {
1497 return false;
1500 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1501 talloc_free(r);
1502 return false;
1505 pull = ndr_pull_init_blob(&blob, r, NULL);
1506 if (pull == NULL) {
1507 talloc_free(r);
1508 return false;
1511 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1512 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1513 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1514 talloc_free(r);
1515 return false;
1518 if (DEBUGLEVEL >= 10) {
1519 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky, r);
1522 r->out.result = _srvsvc_NetShareDelSticky(p, r);
1524 if (p->rng_fault_state) {
1525 talloc_free(r);
1526 /* Return true here, srv_pipe_hnd.c will take care */
1527 return true;
1530 if (DEBUGLEVEL >= 10) {
1531 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, r);
1534 push = ndr_push_init_ctx(r, NULL);
1535 if (push == NULL) {
1536 talloc_free(r);
1537 return false;
1540 ndr_err = call->ndr_push(push, NDR_OUT, r);
1541 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1542 talloc_free(r);
1543 return false;
1546 blob = ndr_push_blob(push);
1547 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1548 talloc_free(r);
1549 return false;
1552 talloc_free(r);
1554 return true;
1557 static bool api_srvsvc_NetShareCheck(pipes_struct *p)
1559 const struct ndr_interface_call *call;
1560 struct ndr_pull *pull;
1561 struct ndr_push *push;
1562 enum ndr_err_code ndr_err;
1563 DATA_BLOB blob;
1564 struct srvsvc_NetShareCheck *r;
1566 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHARECHECK];
1568 r = talloc(talloc_tos(), struct srvsvc_NetShareCheck);
1569 if (r == NULL) {
1570 return false;
1573 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1574 talloc_free(r);
1575 return false;
1578 pull = ndr_pull_init_blob(&blob, r, NULL);
1579 if (pull == NULL) {
1580 talloc_free(r);
1581 return false;
1584 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1585 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1586 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1587 talloc_free(r);
1588 return false;
1591 if (DEBUGLEVEL >= 10) {
1592 NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck, r);
1595 ZERO_STRUCT(r->out);
1596 r->out.type = talloc_zero(r, enum srvsvc_ShareType);
1597 if (r->out.type == NULL) {
1598 talloc_free(r);
1599 return false;
1602 r->out.result = _srvsvc_NetShareCheck(p, r);
1604 if (p->rng_fault_state) {
1605 talloc_free(r);
1606 /* Return true here, srv_pipe_hnd.c will take care */
1607 return true;
1610 if (DEBUGLEVEL >= 10) {
1611 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, r);
1614 push = ndr_push_init_ctx(r, NULL);
1615 if (push == NULL) {
1616 talloc_free(r);
1617 return false;
1620 ndr_err = call->ndr_push(push, NDR_OUT, r);
1621 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1622 talloc_free(r);
1623 return false;
1626 blob = ndr_push_blob(push);
1627 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1628 talloc_free(r);
1629 return false;
1632 talloc_free(r);
1634 return true;
1637 static bool api_srvsvc_NetSrvGetInfo(pipes_struct *p)
1639 const struct ndr_interface_call *call;
1640 struct ndr_pull *pull;
1641 struct ndr_push *push;
1642 enum ndr_err_code ndr_err;
1643 DATA_BLOB blob;
1644 struct srvsvc_NetSrvGetInfo *r;
1646 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSRVGETINFO];
1648 r = talloc(talloc_tos(), struct srvsvc_NetSrvGetInfo);
1649 if (r == NULL) {
1650 return false;
1653 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1654 talloc_free(r);
1655 return false;
1658 pull = ndr_pull_init_blob(&blob, r, NULL);
1659 if (pull == NULL) {
1660 talloc_free(r);
1661 return false;
1664 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1665 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1666 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1667 talloc_free(r);
1668 return false;
1671 if (DEBUGLEVEL >= 10) {
1672 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo, r);
1675 ZERO_STRUCT(r->out);
1676 r->out.info = talloc_zero(r, union srvsvc_NetSrvInfo);
1677 if (r->out.info == NULL) {
1678 talloc_free(r);
1679 return false;
1682 r->out.result = _srvsvc_NetSrvGetInfo(p, r);
1684 if (p->rng_fault_state) {
1685 talloc_free(r);
1686 /* Return true here, srv_pipe_hnd.c will take care */
1687 return true;
1690 if (DEBUGLEVEL >= 10) {
1691 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, r);
1694 push = ndr_push_init_ctx(r, NULL);
1695 if (push == NULL) {
1696 talloc_free(r);
1697 return false;
1700 ndr_err = call->ndr_push(push, NDR_OUT, r);
1701 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1702 talloc_free(r);
1703 return false;
1706 blob = ndr_push_blob(push);
1707 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1708 talloc_free(r);
1709 return false;
1712 talloc_free(r);
1714 return true;
1717 static bool api_srvsvc_NetSrvSetInfo(pipes_struct *p)
1719 const struct ndr_interface_call *call;
1720 struct ndr_pull *pull;
1721 struct ndr_push *push;
1722 enum ndr_err_code ndr_err;
1723 DATA_BLOB blob;
1724 struct srvsvc_NetSrvSetInfo *r;
1726 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSRVSETINFO];
1728 r = talloc(talloc_tos(), struct srvsvc_NetSrvSetInfo);
1729 if (r == NULL) {
1730 return false;
1733 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1734 talloc_free(r);
1735 return false;
1738 pull = ndr_pull_init_blob(&blob, r, NULL);
1739 if (pull == NULL) {
1740 talloc_free(r);
1741 return false;
1744 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1745 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1746 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1747 talloc_free(r);
1748 return false;
1751 if (DEBUGLEVEL >= 10) {
1752 NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo, r);
1755 ZERO_STRUCT(r->out);
1756 r->out.parm_error = r->in.parm_error;
1757 r->out.result = _srvsvc_NetSrvSetInfo(p, r);
1759 if (p->rng_fault_state) {
1760 talloc_free(r);
1761 /* Return true here, srv_pipe_hnd.c will take care */
1762 return true;
1765 if (DEBUGLEVEL >= 10) {
1766 NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, r);
1769 push = ndr_push_init_ctx(r, NULL);
1770 if (push == NULL) {
1771 talloc_free(r);
1772 return false;
1775 ndr_err = call->ndr_push(push, NDR_OUT, r);
1776 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1777 talloc_free(r);
1778 return false;
1781 blob = ndr_push_blob(push);
1782 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1783 talloc_free(r);
1784 return false;
1787 talloc_free(r);
1789 return true;
1792 static bool api_srvsvc_NetDiskEnum(pipes_struct *p)
1794 const struct ndr_interface_call *call;
1795 struct ndr_pull *pull;
1796 struct ndr_push *push;
1797 enum ndr_err_code ndr_err;
1798 DATA_BLOB blob;
1799 struct srvsvc_NetDiskEnum *r;
1801 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETDISKENUM];
1803 r = talloc(talloc_tos(), struct srvsvc_NetDiskEnum);
1804 if (r == NULL) {
1805 return false;
1808 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1809 talloc_free(r);
1810 return false;
1813 pull = ndr_pull_init_blob(&blob, r, NULL);
1814 if (pull == NULL) {
1815 talloc_free(r);
1816 return false;
1819 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1820 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1821 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1822 talloc_free(r);
1823 return false;
1826 if (DEBUGLEVEL >= 10) {
1827 NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, r);
1830 ZERO_STRUCT(r->out);
1831 r->out.info = r->in.info;
1832 r->out.resume_handle = r->in.resume_handle;
1833 r->out.totalentries = talloc_zero(r, uint32_t);
1834 if (r->out.totalentries == NULL) {
1835 talloc_free(r);
1836 return false;
1839 r->out.result = _srvsvc_NetDiskEnum(p, r);
1841 if (p->rng_fault_state) {
1842 talloc_free(r);
1843 /* Return true here, srv_pipe_hnd.c will take care */
1844 return true;
1847 if (DEBUGLEVEL >= 10) {
1848 NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, r);
1851 push = ndr_push_init_ctx(r, NULL);
1852 if (push == NULL) {
1853 talloc_free(r);
1854 return false;
1857 ndr_err = call->ndr_push(push, NDR_OUT, r);
1858 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1859 talloc_free(r);
1860 return false;
1863 blob = ndr_push_blob(push);
1864 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1865 talloc_free(r);
1866 return false;
1869 talloc_free(r);
1871 return true;
1874 static bool api_srvsvc_NetServerStatisticsGet(pipes_struct *p)
1876 const struct ndr_interface_call *call;
1877 struct ndr_pull *pull;
1878 struct ndr_push *push;
1879 enum ndr_err_code ndr_err;
1880 DATA_BLOB blob;
1881 struct srvsvc_NetServerStatisticsGet *r;
1883 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSERVERSTATISTICSGET];
1885 r = talloc(talloc_tos(), struct srvsvc_NetServerStatisticsGet);
1886 if (r == NULL) {
1887 return false;
1890 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1891 talloc_free(r);
1892 return false;
1895 pull = ndr_pull_init_blob(&blob, r, NULL);
1896 if (pull == NULL) {
1897 talloc_free(r);
1898 return false;
1901 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1902 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1903 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1904 talloc_free(r);
1905 return false;
1908 if (DEBUGLEVEL >= 10) {
1909 NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet, r);
1912 ZERO_STRUCT(r->out);
1913 r->out.stats = talloc_zero(r, struct srvsvc_Statistics *);
1914 if (r->out.stats == NULL) {
1915 talloc_free(r);
1916 return false;
1919 r->out.result = _srvsvc_NetServerStatisticsGet(p, r);
1921 if (p->rng_fault_state) {
1922 talloc_free(r);
1923 /* Return true here, srv_pipe_hnd.c will take care */
1924 return true;
1927 if (DEBUGLEVEL >= 10) {
1928 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, r);
1931 push = ndr_push_init_ctx(r, NULL);
1932 if (push == NULL) {
1933 talloc_free(r);
1934 return false;
1937 ndr_err = call->ndr_push(push, NDR_OUT, r);
1938 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1939 talloc_free(r);
1940 return false;
1943 blob = ndr_push_blob(push);
1944 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1945 talloc_free(r);
1946 return false;
1949 talloc_free(r);
1951 return true;
1954 static bool api_srvsvc_NetTransportAdd(pipes_struct *p)
1956 const struct ndr_interface_call *call;
1957 struct ndr_pull *pull;
1958 struct ndr_push *push;
1959 enum ndr_err_code ndr_err;
1960 DATA_BLOB blob;
1961 struct srvsvc_NetTransportAdd *r;
1963 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETTRANSPORTADD];
1965 r = talloc(talloc_tos(), struct srvsvc_NetTransportAdd);
1966 if (r == NULL) {
1967 return false;
1970 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1971 talloc_free(r);
1972 return false;
1975 pull = ndr_pull_init_blob(&blob, r, NULL);
1976 if (pull == NULL) {
1977 talloc_free(r);
1978 return false;
1981 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1982 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1983 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1984 talloc_free(r);
1985 return false;
1988 if (DEBUGLEVEL >= 10) {
1989 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd, r);
1992 r->out.result = _srvsvc_NetTransportAdd(p, r);
1994 if (p->rng_fault_state) {
1995 talloc_free(r);
1996 /* Return true here, srv_pipe_hnd.c will take care */
1997 return true;
2000 if (DEBUGLEVEL >= 10) {
2001 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, r);
2004 push = ndr_push_init_ctx(r, NULL);
2005 if (push == NULL) {
2006 talloc_free(r);
2007 return false;
2010 ndr_err = call->ndr_push(push, NDR_OUT, r);
2011 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2012 talloc_free(r);
2013 return false;
2016 blob = ndr_push_blob(push);
2017 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2018 talloc_free(r);
2019 return false;
2022 talloc_free(r);
2024 return true;
2027 static bool api_srvsvc_NetTransportEnum(pipes_struct *p)
2029 const struct ndr_interface_call *call;
2030 struct ndr_pull *pull;
2031 struct ndr_push *push;
2032 enum ndr_err_code ndr_err;
2033 DATA_BLOB blob;
2034 struct srvsvc_NetTransportEnum *r;
2036 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETTRANSPORTENUM];
2038 r = talloc(talloc_tos(), struct srvsvc_NetTransportEnum);
2039 if (r == NULL) {
2040 return false;
2043 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2044 talloc_free(r);
2045 return false;
2048 pull = ndr_pull_init_blob(&blob, r, NULL);
2049 if (pull == NULL) {
2050 talloc_free(r);
2051 return false;
2054 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2055 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2056 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2057 talloc_free(r);
2058 return false;
2061 if (DEBUGLEVEL >= 10) {
2062 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, r);
2065 ZERO_STRUCT(r->out);
2066 r->out.transports = r->in.transports;
2067 r->out.resume_handle = r->in.resume_handle;
2068 r->out.totalentries = talloc_zero(r, uint32_t);
2069 if (r->out.totalentries == NULL) {
2070 talloc_free(r);
2071 return false;
2074 r->out.result = _srvsvc_NetTransportEnum(p, r);
2076 if (p->rng_fault_state) {
2077 talloc_free(r);
2078 /* Return true here, srv_pipe_hnd.c will take care */
2079 return true;
2082 if (DEBUGLEVEL >= 10) {
2083 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, r);
2086 push = ndr_push_init_ctx(r, NULL);
2087 if (push == NULL) {
2088 talloc_free(r);
2089 return false;
2092 ndr_err = call->ndr_push(push, NDR_OUT, r);
2093 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2094 talloc_free(r);
2095 return false;
2098 blob = ndr_push_blob(push);
2099 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2100 talloc_free(r);
2101 return false;
2104 talloc_free(r);
2106 return true;
2109 static bool api_srvsvc_NetTransportDel(pipes_struct *p)
2111 const struct ndr_interface_call *call;
2112 struct ndr_pull *pull;
2113 struct ndr_push *push;
2114 enum ndr_err_code ndr_err;
2115 DATA_BLOB blob;
2116 struct srvsvc_NetTransportDel *r;
2118 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETTRANSPORTDEL];
2120 r = talloc(talloc_tos(), struct srvsvc_NetTransportDel);
2121 if (r == NULL) {
2122 return false;
2125 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2126 talloc_free(r);
2127 return false;
2130 pull = ndr_pull_init_blob(&blob, r, NULL);
2131 if (pull == NULL) {
2132 talloc_free(r);
2133 return false;
2136 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2137 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2138 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2139 talloc_free(r);
2140 return false;
2143 if (DEBUGLEVEL >= 10) {
2144 NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel, r);
2147 r->out.result = _srvsvc_NetTransportDel(p, r);
2149 if (p->rng_fault_state) {
2150 talloc_free(r);
2151 /* Return true here, srv_pipe_hnd.c will take care */
2152 return true;
2155 if (DEBUGLEVEL >= 10) {
2156 NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, r);
2159 push = ndr_push_init_ctx(r, NULL);
2160 if (push == NULL) {
2161 talloc_free(r);
2162 return false;
2165 ndr_err = call->ndr_push(push, NDR_OUT, r);
2166 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2167 talloc_free(r);
2168 return false;
2171 blob = ndr_push_blob(push);
2172 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2173 talloc_free(r);
2174 return false;
2177 talloc_free(r);
2179 return true;
2182 static bool api_srvsvc_NetRemoteTOD(pipes_struct *p)
2184 const struct ndr_interface_call *call;
2185 struct ndr_pull *pull;
2186 struct ndr_push *push;
2187 enum ndr_err_code ndr_err;
2188 DATA_BLOB blob;
2189 struct srvsvc_NetRemoteTOD *r;
2191 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETREMOTETOD];
2193 r = talloc(talloc_tos(), struct srvsvc_NetRemoteTOD);
2194 if (r == NULL) {
2195 return false;
2198 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2199 talloc_free(r);
2200 return false;
2203 pull = ndr_pull_init_blob(&blob, r, NULL);
2204 if (pull == NULL) {
2205 talloc_free(r);
2206 return false;
2209 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2210 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2211 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2212 talloc_free(r);
2213 return false;
2216 if (DEBUGLEVEL >= 10) {
2217 NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD, r);
2220 ZERO_STRUCT(r->out);
2221 r->out.info = talloc_zero(r, struct srvsvc_NetRemoteTODInfo *);
2222 if (r->out.info == NULL) {
2223 talloc_free(r);
2224 return false;
2227 r->out.result = _srvsvc_NetRemoteTOD(p, r);
2229 if (p->rng_fault_state) {
2230 talloc_free(r);
2231 /* Return true here, srv_pipe_hnd.c will take care */
2232 return true;
2235 if (DEBUGLEVEL >= 10) {
2236 NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, r);
2239 push = ndr_push_init_ctx(r, NULL);
2240 if (push == NULL) {
2241 talloc_free(r);
2242 return false;
2245 ndr_err = call->ndr_push(push, NDR_OUT, r);
2246 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2247 talloc_free(r);
2248 return false;
2251 blob = ndr_push_blob(push);
2252 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2253 talloc_free(r);
2254 return false;
2257 talloc_free(r);
2259 return true;
2262 static bool api_srvsvc_NetSetServiceBits(pipes_struct *p)
2264 const struct ndr_interface_call *call;
2265 struct ndr_pull *pull;
2266 struct ndr_push *push;
2267 enum ndr_err_code ndr_err;
2268 DATA_BLOB blob;
2269 struct srvsvc_NetSetServiceBits *r;
2271 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSETSERVICEBITS];
2273 r = talloc(talloc_tos(), struct srvsvc_NetSetServiceBits);
2274 if (r == NULL) {
2275 return false;
2278 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2279 talloc_free(r);
2280 return false;
2283 pull = ndr_pull_init_blob(&blob, r, NULL);
2284 if (pull == NULL) {
2285 talloc_free(r);
2286 return false;
2289 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2290 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2291 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2292 talloc_free(r);
2293 return false;
2296 if (DEBUGLEVEL >= 10) {
2297 NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits, r);
2300 r->out.result = _srvsvc_NetSetServiceBits(p, r);
2302 if (p->rng_fault_state) {
2303 talloc_free(r);
2304 /* Return true here, srv_pipe_hnd.c will take care */
2305 return true;
2308 if (DEBUGLEVEL >= 10) {
2309 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, r);
2312 push = ndr_push_init_ctx(r, NULL);
2313 if (push == NULL) {
2314 talloc_free(r);
2315 return false;
2318 ndr_err = call->ndr_push(push, NDR_OUT, r);
2319 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2320 talloc_free(r);
2321 return false;
2324 blob = ndr_push_blob(push);
2325 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2326 talloc_free(r);
2327 return false;
2330 talloc_free(r);
2332 return true;
2335 static bool api_srvsvc_NetPathType(pipes_struct *p)
2337 const struct ndr_interface_call *call;
2338 struct ndr_pull *pull;
2339 struct ndr_push *push;
2340 enum ndr_err_code ndr_err;
2341 DATA_BLOB blob;
2342 struct srvsvc_NetPathType *r;
2344 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPATHTYPE];
2346 r = talloc(talloc_tos(), struct srvsvc_NetPathType);
2347 if (r == NULL) {
2348 return false;
2351 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2352 talloc_free(r);
2353 return false;
2356 pull = ndr_pull_init_blob(&blob, r, NULL);
2357 if (pull == NULL) {
2358 talloc_free(r);
2359 return false;
2362 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2363 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2364 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2365 talloc_free(r);
2366 return false;
2369 if (DEBUGLEVEL >= 10) {
2370 NDR_PRINT_IN_DEBUG(srvsvc_NetPathType, r);
2373 ZERO_STRUCT(r->out);
2374 r->out.pathtype = talloc_zero(r, uint32_t);
2375 if (r->out.pathtype == NULL) {
2376 talloc_free(r);
2377 return false;
2380 r->out.result = _srvsvc_NetPathType(p, r);
2382 if (p->rng_fault_state) {
2383 talloc_free(r);
2384 /* Return true here, srv_pipe_hnd.c will take care */
2385 return true;
2388 if (DEBUGLEVEL >= 10) {
2389 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, r);
2392 push = ndr_push_init_ctx(r, NULL);
2393 if (push == NULL) {
2394 talloc_free(r);
2395 return false;
2398 ndr_err = call->ndr_push(push, NDR_OUT, r);
2399 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2400 talloc_free(r);
2401 return false;
2404 blob = ndr_push_blob(push);
2405 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2406 talloc_free(r);
2407 return false;
2410 talloc_free(r);
2412 return true;
2415 static bool api_srvsvc_NetPathCanonicalize(pipes_struct *p)
2417 const struct ndr_interface_call *call;
2418 struct ndr_pull *pull;
2419 struct ndr_push *push;
2420 enum ndr_err_code ndr_err;
2421 DATA_BLOB blob;
2422 struct srvsvc_NetPathCanonicalize *r;
2424 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPATHCANONICALIZE];
2426 r = talloc(talloc_tos(), struct srvsvc_NetPathCanonicalize);
2427 if (r == NULL) {
2428 return false;
2431 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2432 talloc_free(r);
2433 return false;
2436 pull = ndr_pull_init_blob(&blob, r, NULL);
2437 if (pull == NULL) {
2438 talloc_free(r);
2439 return false;
2442 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2443 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2444 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2445 talloc_free(r);
2446 return false;
2449 if (DEBUGLEVEL >= 10) {
2450 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize, r);
2453 ZERO_STRUCT(r->out);
2454 r->out.pathtype = r->in.pathtype;
2455 r->out.can_path = talloc_zero_array(r, uint8_t, r->in.maxbuf);
2456 if (r->out.can_path == NULL) {
2457 talloc_free(r);
2458 return false;
2461 r->out.result = _srvsvc_NetPathCanonicalize(p, r);
2463 if (p->rng_fault_state) {
2464 talloc_free(r);
2465 /* Return true here, srv_pipe_hnd.c will take care */
2466 return true;
2469 if (DEBUGLEVEL >= 10) {
2470 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, r);
2473 push = ndr_push_init_ctx(r, NULL);
2474 if (push == NULL) {
2475 talloc_free(r);
2476 return false;
2479 ndr_err = call->ndr_push(push, NDR_OUT, r);
2480 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2481 talloc_free(r);
2482 return false;
2485 blob = ndr_push_blob(push);
2486 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2487 talloc_free(r);
2488 return false;
2491 talloc_free(r);
2493 return true;
2496 static bool api_srvsvc_NetPathCompare(pipes_struct *p)
2498 const struct ndr_interface_call *call;
2499 struct ndr_pull *pull;
2500 struct ndr_push *push;
2501 enum ndr_err_code ndr_err;
2502 DATA_BLOB blob;
2503 struct srvsvc_NetPathCompare *r;
2505 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPATHCOMPARE];
2507 r = talloc(talloc_tos(), struct srvsvc_NetPathCompare);
2508 if (r == NULL) {
2509 return false;
2512 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2513 talloc_free(r);
2514 return false;
2517 pull = ndr_pull_init_blob(&blob, r, NULL);
2518 if (pull == NULL) {
2519 talloc_free(r);
2520 return false;
2523 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2524 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2525 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2526 talloc_free(r);
2527 return false;
2530 if (DEBUGLEVEL >= 10) {
2531 NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare, r);
2534 r->out.result = _srvsvc_NetPathCompare(p, r);
2536 if (p->rng_fault_state) {
2537 talloc_free(r);
2538 /* Return true here, srv_pipe_hnd.c will take care */
2539 return true;
2542 if (DEBUGLEVEL >= 10) {
2543 NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, r);
2546 push = ndr_push_init_ctx(r, NULL);
2547 if (push == NULL) {
2548 talloc_free(r);
2549 return false;
2552 ndr_err = call->ndr_push(push, NDR_OUT, r);
2553 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2554 talloc_free(r);
2555 return false;
2558 blob = ndr_push_blob(push);
2559 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2560 talloc_free(r);
2561 return false;
2564 talloc_free(r);
2566 return true;
2569 static bool api_srvsvc_NetNameValidate(pipes_struct *p)
2571 const struct ndr_interface_call *call;
2572 struct ndr_pull *pull;
2573 struct ndr_push *push;
2574 enum ndr_err_code ndr_err;
2575 DATA_BLOB blob;
2576 struct srvsvc_NetNameValidate *r;
2578 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETNAMEVALIDATE];
2580 r = talloc(talloc_tos(), struct srvsvc_NetNameValidate);
2581 if (r == NULL) {
2582 return false;
2585 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2586 talloc_free(r);
2587 return false;
2590 pull = ndr_pull_init_blob(&blob, r, NULL);
2591 if (pull == NULL) {
2592 talloc_free(r);
2593 return false;
2596 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2597 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2598 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2599 talloc_free(r);
2600 return false;
2603 if (DEBUGLEVEL >= 10) {
2604 NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate, r);
2607 r->out.result = _srvsvc_NetNameValidate(p, r);
2609 if (p->rng_fault_state) {
2610 talloc_free(r);
2611 /* Return true here, srv_pipe_hnd.c will take care */
2612 return true;
2615 if (DEBUGLEVEL >= 10) {
2616 NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, r);
2619 push = ndr_push_init_ctx(r, NULL);
2620 if (push == NULL) {
2621 talloc_free(r);
2622 return false;
2625 ndr_err = call->ndr_push(push, NDR_OUT, r);
2626 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2627 talloc_free(r);
2628 return false;
2631 blob = ndr_push_blob(push);
2632 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2633 talloc_free(r);
2634 return false;
2637 talloc_free(r);
2639 return true;
2642 static bool api_srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p)
2644 const struct ndr_interface_call *call;
2645 struct ndr_pull *pull;
2646 struct ndr_push *push;
2647 enum ndr_err_code ndr_err;
2648 DATA_BLOB blob;
2649 struct srvsvc_NETRPRNAMECANONICALIZE *r;
2651 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRPRNAMECANONICALIZE];
2653 r = talloc(talloc_tos(), struct srvsvc_NETRPRNAMECANONICALIZE);
2654 if (r == NULL) {
2655 return false;
2658 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2659 talloc_free(r);
2660 return false;
2663 pull = ndr_pull_init_blob(&blob, r, NULL);
2664 if (pull == NULL) {
2665 talloc_free(r);
2666 return false;
2669 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2670 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2671 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2672 talloc_free(r);
2673 return false;
2676 if (DEBUGLEVEL >= 10) {
2677 NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, r);
2680 r->out.result = _srvsvc_NETRPRNAMECANONICALIZE(p, r);
2682 if (p->rng_fault_state) {
2683 talloc_free(r);
2684 /* Return true here, srv_pipe_hnd.c will take care */
2685 return true;
2688 if (DEBUGLEVEL >= 10) {
2689 NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, r);
2692 push = ndr_push_init_ctx(r, NULL);
2693 if (push == NULL) {
2694 talloc_free(r);
2695 return false;
2698 ndr_err = call->ndr_push(push, NDR_OUT, r);
2699 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2700 talloc_free(r);
2701 return false;
2704 blob = ndr_push_blob(push);
2705 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2706 talloc_free(r);
2707 return false;
2710 talloc_free(r);
2712 return true;
2715 static bool api_srvsvc_NetPRNameCompare(pipes_struct *p)
2717 const struct ndr_interface_call *call;
2718 struct ndr_pull *pull;
2719 struct ndr_push *push;
2720 enum ndr_err_code ndr_err;
2721 DATA_BLOB blob;
2722 struct srvsvc_NetPRNameCompare *r;
2724 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETPRNAMECOMPARE];
2726 r = talloc(talloc_tos(), struct srvsvc_NetPRNameCompare);
2727 if (r == NULL) {
2728 return false;
2731 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2732 talloc_free(r);
2733 return false;
2736 pull = ndr_pull_init_blob(&blob, r, NULL);
2737 if (pull == NULL) {
2738 talloc_free(r);
2739 return false;
2742 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2743 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2744 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2745 talloc_free(r);
2746 return false;
2749 if (DEBUGLEVEL >= 10) {
2750 NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare, r);
2753 r->out.result = _srvsvc_NetPRNameCompare(p, r);
2755 if (p->rng_fault_state) {
2756 talloc_free(r);
2757 /* Return true here, srv_pipe_hnd.c will take care */
2758 return true;
2761 if (DEBUGLEVEL >= 10) {
2762 NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, r);
2765 push = ndr_push_init_ctx(r, NULL);
2766 if (push == NULL) {
2767 talloc_free(r);
2768 return false;
2771 ndr_err = call->ndr_push(push, NDR_OUT, r);
2772 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2773 talloc_free(r);
2774 return false;
2777 blob = ndr_push_blob(push);
2778 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2779 talloc_free(r);
2780 return false;
2783 talloc_free(r);
2785 return true;
2788 static bool api_srvsvc_NetShareEnum(pipes_struct *p)
2790 const struct ndr_interface_call *call;
2791 struct ndr_pull *pull;
2792 struct ndr_push *push;
2793 enum ndr_err_code ndr_err;
2794 DATA_BLOB blob;
2795 struct srvsvc_NetShareEnum *r;
2797 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREENUM];
2799 r = talloc(talloc_tos(), struct srvsvc_NetShareEnum);
2800 if (r == NULL) {
2801 return false;
2804 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2805 talloc_free(r);
2806 return false;
2809 pull = ndr_pull_init_blob(&blob, r, NULL);
2810 if (pull == NULL) {
2811 talloc_free(r);
2812 return false;
2815 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2816 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2817 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2818 talloc_free(r);
2819 return false;
2822 if (DEBUGLEVEL >= 10) {
2823 NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, r);
2826 ZERO_STRUCT(r->out);
2827 r->out.info_ctr = r->in.info_ctr;
2828 r->out.resume_handle = r->in.resume_handle;
2829 r->out.totalentries = talloc_zero(r, uint32_t);
2830 if (r->out.totalentries == NULL) {
2831 talloc_free(r);
2832 return false;
2835 r->out.result = _srvsvc_NetShareEnum(p, r);
2837 if (p->rng_fault_state) {
2838 talloc_free(r);
2839 /* Return true here, srv_pipe_hnd.c will take care */
2840 return true;
2843 if (DEBUGLEVEL >= 10) {
2844 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, r);
2847 push = ndr_push_init_ctx(r, NULL);
2848 if (push == NULL) {
2849 talloc_free(r);
2850 return false;
2853 ndr_err = call->ndr_push(push, NDR_OUT, r);
2854 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2855 talloc_free(r);
2856 return false;
2859 blob = ndr_push_blob(push);
2860 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2861 talloc_free(r);
2862 return false;
2865 talloc_free(r);
2867 return true;
2870 static bool api_srvsvc_NetShareDelStart(pipes_struct *p)
2872 const struct ndr_interface_call *call;
2873 struct ndr_pull *pull;
2874 struct ndr_push *push;
2875 enum ndr_err_code ndr_err;
2876 DATA_BLOB blob;
2877 struct srvsvc_NetShareDelStart *r;
2879 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDELSTART];
2881 r = talloc(talloc_tos(), struct srvsvc_NetShareDelStart);
2882 if (r == NULL) {
2883 return false;
2886 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2887 talloc_free(r);
2888 return false;
2891 pull = ndr_pull_init_blob(&blob, r, NULL);
2892 if (pull == NULL) {
2893 talloc_free(r);
2894 return false;
2897 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2898 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2899 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2900 talloc_free(r);
2901 return false;
2904 if (DEBUGLEVEL >= 10) {
2905 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart, r);
2908 ZERO_STRUCT(r->out);
2909 r->out.hnd = talloc_zero(r, struct policy_handle);
2910 if (r->out.hnd == NULL) {
2911 talloc_free(r);
2912 return false;
2915 r->out.result = _srvsvc_NetShareDelStart(p, r);
2917 if (p->rng_fault_state) {
2918 talloc_free(r);
2919 /* Return true here, srv_pipe_hnd.c will take care */
2920 return true;
2923 if (DEBUGLEVEL >= 10) {
2924 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, r);
2927 push = ndr_push_init_ctx(r, NULL);
2928 if (push == NULL) {
2929 talloc_free(r);
2930 return false;
2933 ndr_err = call->ndr_push(push, NDR_OUT, r);
2934 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2935 talloc_free(r);
2936 return false;
2939 blob = ndr_push_blob(push);
2940 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2941 talloc_free(r);
2942 return false;
2945 talloc_free(r);
2947 return true;
2950 static bool api_srvsvc_NetShareDelCommit(pipes_struct *p)
2952 const struct ndr_interface_call *call;
2953 struct ndr_pull *pull;
2954 struct ndr_push *push;
2955 enum ndr_err_code ndr_err;
2956 DATA_BLOB blob;
2957 struct srvsvc_NetShareDelCommit *r;
2959 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSHAREDELCOMMIT];
2961 r = talloc(talloc_tos(), struct srvsvc_NetShareDelCommit);
2962 if (r == NULL) {
2963 return false;
2966 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2967 talloc_free(r);
2968 return false;
2971 pull = ndr_pull_init_blob(&blob, r, NULL);
2972 if (pull == NULL) {
2973 talloc_free(r);
2974 return false;
2977 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2978 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2979 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2980 talloc_free(r);
2981 return false;
2984 if (DEBUGLEVEL >= 10) {
2985 NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit, r);
2988 ZERO_STRUCT(r->out);
2989 r->out.hnd = r->in.hnd;
2990 r->out.result = _srvsvc_NetShareDelCommit(p, r);
2992 if (p->rng_fault_state) {
2993 talloc_free(r);
2994 /* Return true here, srv_pipe_hnd.c will take care */
2995 return true;
2998 if (DEBUGLEVEL >= 10) {
2999 NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, r);
3002 push = ndr_push_init_ctx(r, NULL);
3003 if (push == NULL) {
3004 talloc_free(r);
3005 return false;
3008 ndr_err = call->ndr_push(push, NDR_OUT, r);
3009 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3010 talloc_free(r);
3011 return false;
3014 blob = ndr_push_blob(push);
3015 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3016 talloc_free(r);
3017 return false;
3020 talloc_free(r);
3022 return true;
3025 static bool api_srvsvc_NetGetFileSecurity(pipes_struct *p)
3027 const struct ndr_interface_call *call;
3028 struct ndr_pull *pull;
3029 struct ndr_push *push;
3030 enum ndr_err_code ndr_err;
3031 DATA_BLOB blob;
3032 struct srvsvc_NetGetFileSecurity *r;
3034 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETGETFILESECURITY];
3036 r = talloc(talloc_tos(), struct srvsvc_NetGetFileSecurity);
3037 if (r == NULL) {
3038 return false;
3041 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3042 talloc_free(r);
3043 return false;
3046 pull = ndr_pull_init_blob(&blob, r, NULL);
3047 if (pull == NULL) {
3048 talloc_free(r);
3049 return false;
3052 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3053 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3054 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3055 talloc_free(r);
3056 return false;
3059 if (DEBUGLEVEL >= 10) {
3060 NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity, r);
3063 ZERO_STRUCT(r->out);
3064 r->out.sd_buf = talloc_zero(r, struct sec_desc_buf *);
3065 if (r->out.sd_buf == NULL) {
3066 talloc_free(r);
3067 return false;
3070 r->out.result = _srvsvc_NetGetFileSecurity(p, r);
3072 if (p->rng_fault_state) {
3073 talloc_free(r);
3074 /* Return true here, srv_pipe_hnd.c will take care */
3075 return true;
3078 if (DEBUGLEVEL >= 10) {
3079 NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, r);
3082 push = ndr_push_init_ctx(r, NULL);
3083 if (push == NULL) {
3084 talloc_free(r);
3085 return false;
3088 ndr_err = call->ndr_push(push, NDR_OUT, r);
3089 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3090 talloc_free(r);
3091 return false;
3094 blob = ndr_push_blob(push);
3095 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3096 talloc_free(r);
3097 return false;
3100 talloc_free(r);
3102 return true;
3105 static bool api_srvsvc_NetSetFileSecurity(pipes_struct *p)
3107 const struct ndr_interface_call *call;
3108 struct ndr_pull *pull;
3109 struct ndr_push *push;
3110 enum ndr_err_code ndr_err;
3111 DATA_BLOB blob;
3112 struct srvsvc_NetSetFileSecurity *r;
3114 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSETFILESECURITY];
3116 r = talloc(talloc_tos(), struct srvsvc_NetSetFileSecurity);
3117 if (r == NULL) {
3118 return false;
3121 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3122 talloc_free(r);
3123 return false;
3126 pull = ndr_pull_init_blob(&blob, r, NULL);
3127 if (pull == NULL) {
3128 talloc_free(r);
3129 return false;
3132 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3133 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3134 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3135 talloc_free(r);
3136 return false;
3139 if (DEBUGLEVEL >= 10) {
3140 NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity, r);
3143 r->out.result = _srvsvc_NetSetFileSecurity(p, r);
3145 if (p->rng_fault_state) {
3146 talloc_free(r);
3147 /* Return true here, srv_pipe_hnd.c will take care */
3148 return true;
3151 if (DEBUGLEVEL >= 10) {
3152 NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, r);
3155 push = ndr_push_init_ctx(r, NULL);
3156 if (push == NULL) {
3157 talloc_free(r);
3158 return false;
3161 ndr_err = call->ndr_push(push, NDR_OUT, r);
3162 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3163 talloc_free(r);
3164 return false;
3167 blob = ndr_push_blob(push);
3168 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3169 talloc_free(r);
3170 return false;
3173 talloc_free(r);
3175 return true;
3178 static bool api_srvsvc_NetServerTransportAddEx(pipes_struct *p)
3180 const struct ndr_interface_call *call;
3181 struct ndr_pull *pull;
3182 struct ndr_push *push;
3183 enum ndr_err_code ndr_err;
3184 DATA_BLOB blob;
3185 struct srvsvc_NetServerTransportAddEx *r;
3187 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSERVERTRANSPORTADDEX];
3189 r = talloc(talloc_tos(), struct srvsvc_NetServerTransportAddEx);
3190 if (r == NULL) {
3191 return false;
3194 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3195 talloc_free(r);
3196 return false;
3199 pull = ndr_pull_init_blob(&blob, r, NULL);
3200 if (pull == NULL) {
3201 talloc_free(r);
3202 return false;
3205 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3206 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3207 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3208 talloc_free(r);
3209 return false;
3212 if (DEBUGLEVEL >= 10) {
3213 NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx, r);
3216 r->out.result = _srvsvc_NetServerTransportAddEx(p, r);
3218 if (p->rng_fault_state) {
3219 talloc_free(r);
3220 /* Return true here, srv_pipe_hnd.c will take care */
3221 return true;
3224 if (DEBUGLEVEL >= 10) {
3225 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, r);
3228 push = ndr_push_init_ctx(r, NULL);
3229 if (push == NULL) {
3230 talloc_free(r);
3231 return false;
3234 ndr_err = call->ndr_push(push, NDR_OUT, r);
3235 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3236 talloc_free(r);
3237 return false;
3240 blob = ndr_push_blob(push);
3241 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3242 talloc_free(r);
3243 return false;
3246 talloc_free(r);
3248 return true;
3251 static bool api_srvsvc_NetServerSetServiceBitsEx(pipes_struct *p)
3253 const struct ndr_interface_call *call;
3254 struct ndr_pull *pull;
3255 struct ndr_push *push;
3256 enum ndr_err_code ndr_err;
3257 DATA_BLOB blob;
3258 struct srvsvc_NetServerSetServiceBitsEx *r;
3260 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETSERVERSETSERVICEBITSEX];
3262 r = talloc(talloc_tos(), struct srvsvc_NetServerSetServiceBitsEx);
3263 if (r == NULL) {
3264 return false;
3267 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3268 talloc_free(r);
3269 return false;
3272 pull = ndr_pull_init_blob(&blob, r, NULL);
3273 if (pull == NULL) {
3274 talloc_free(r);
3275 return false;
3278 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3279 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3280 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3281 talloc_free(r);
3282 return false;
3285 if (DEBUGLEVEL >= 10) {
3286 NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx, r);
3289 r->out.result = _srvsvc_NetServerSetServiceBitsEx(p, r);
3291 if (p->rng_fault_state) {
3292 talloc_free(r);
3293 /* Return true here, srv_pipe_hnd.c will take care */
3294 return true;
3297 if (DEBUGLEVEL >= 10) {
3298 NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, r);
3301 push = ndr_push_init_ctx(r, NULL);
3302 if (push == NULL) {
3303 talloc_free(r);
3304 return false;
3307 ndr_err = call->ndr_push(push, NDR_OUT, r);
3308 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3309 talloc_free(r);
3310 return false;
3313 blob = ndr_push_blob(push);
3314 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3315 talloc_free(r);
3316 return false;
3319 talloc_free(r);
3321 return true;
3324 static bool api_srvsvc_NETRDFSGETVERSION(pipes_struct *p)
3326 const struct ndr_interface_call *call;
3327 struct ndr_pull *pull;
3328 struct ndr_push *push;
3329 enum ndr_err_code ndr_err;
3330 DATA_BLOB blob;
3331 struct srvsvc_NETRDFSGETVERSION *r;
3333 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSGETVERSION];
3335 r = talloc(talloc_tos(), struct srvsvc_NETRDFSGETVERSION);
3336 if (r == NULL) {
3337 return false;
3340 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3341 talloc_free(r);
3342 return false;
3345 pull = ndr_pull_init_blob(&blob, r, NULL);
3346 if (pull == NULL) {
3347 talloc_free(r);
3348 return false;
3351 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3352 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3353 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3354 talloc_free(r);
3355 return false;
3358 if (DEBUGLEVEL >= 10) {
3359 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION, r);
3362 r->out.result = _srvsvc_NETRDFSGETVERSION(p, r);
3364 if (p->rng_fault_state) {
3365 talloc_free(r);
3366 /* Return true here, srv_pipe_hnd.c will take care */
3367 return true;
3370 if (DEBUGLEVEL >= 10) {
3371 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, r);
3374 push = ndr_push_init_ctx(r, NULL);
3375 if (push == NULL) {
3376 talloc_free(r);
3377 return false;
3380 ndr_err = call->ndr_push(push, NDR_OUT, r);
3381 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3382 talloc_free(r);
3383 return false;
3386 blob = ndr_push_blob(push);
3387 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3388 talloc_free(r);
3389 return false;
3392 talloc_free(r);
3394 return true;
3397 static bool api_srvsvc_NETRDFSCREATELOCALPARTITION(pipes_struct *p)
3399 const struct ndr_interface_call *call;
3400 struct ndr_pull *pull;
3401 struct ndr_push *push;
3402 enum ndr_err_code ndr_err;
3403 DATA_BLOB blob;
3404 struct srvsvc_NETRDFSCREATELOCALPARTITION *r;
3406 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSCREATELOCALPARTITION];
3408 r = talloc(talloc_tos(), struct srvsvc_NETRDFSCREATELOCALPARTITION);
3409 if (r == NULL) {
3410 return false;
3413 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3414 talloc_free(r);
3415 return false;
3418 pull = ndr_pull_init_blob(&blob, r, NULL);
3419 if (pull == NULL) {
3420 talloc_free(r);
3421 return false;
3424 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3425 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3426 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3427 talloc_free(r);
3428 return false;
3431 if (DEBUGLEVEL >= 10) {
3432 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, r);
3435 r->out.result = _srvsvc_NETRDFSCREATELOCALPARTITION(p, r);
3437 if (p->rng_fault_state) {
3438 talloc_free(r);
3439 /* Return true here, srv_pipe_hnd.c will take care */
3440 return true;
3443 if (DEBUGLEVEL >= 10) {
3444 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, r);
3447 push = ndr_push_init_ctx(r, NULL);
3448 if (push == NULL) {
3449 talloc_free(r);
3450 return false;
3453 ndr_err = call->ndr_push(push, NDR_OUT, r);
3454 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3455 talloc_free(r);
3456 return false;
3459 blob = ndr_push_blob(push);
3460 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3461 talloc_free(r);
3462 return false;
3465 talloc_free(r);
3467 return true;
3470 static bool api_srvsvc_NETRDFSDELETELOCALPARTITION(pipes_struct *p)
3472 const struct ndr_interface_call *call;
3473 struct ndr_pull *pull;
3474 struct ndr_push *push;
3475 enum ndr_err_code ndr_err;
3476 DATA_BLOB blob;
3477 struct srvsvc_NETRDFSDELETELOCALPARTITION *r;
3479 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSDELETELOCALPARTITION];
3481 r = talloc(talloc_tos(), struct srvsvc_NETRDFSDELETELOCALPARTITION);
3482 if (r == NULL) {
3483 return false;
3486 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3487 talloc_free(r);
3488 return false;
3491 pull = ndr_pull_init_blob(&blob, r, NULL);
3492 if (pull == NULL) {
3493 talloc_free(r);
3494 return false;
3497 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3498 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3499 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3500 talloc_free(r);
3501 return false;
3504 if (DEBUGLEVEL >= 10) {
3505 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, r);
3508 r->out.result = _srvsvc_NETRDFSDELETELOCALPARTITION(p, r);
3510 if (p->rng_fault_state) {
3511 talloc_free(r);
3512 /* Return true here, srv_pipe_hnd.c will take care */
3513 return true;
3516 if (DEBUGLEVEL >= 10) {
3517 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, r);
3520 push = ndr_push_init_ctx(r, NULL);
3521 if (push == NULL) {
3522 talloc_free(r);
3523 return false;
3526 ndr_err = call->ndr_push(push, NDR_OUT, r);
3527 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3528 talloc_free(r);
3529 return false;
3532 blob = ndr_push_blob(push);
3533 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3534 talloc_free(r);
3535 return false;
3538 talloc_free(r);
3540 return true;
3543 static bool api_srvsvc_NETRDFSSETLOCALVOLUMESTATE(pipes_struct *p)
3545 const struct ndr_interface_call *call;
3546 struct ndr_pull *pull;
3547 struct ndr_push *push;
3548 enum ndr_err_code ndr_err;
3549 DATA_BLOB blob;
3550 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r;
3552 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE];
3554 r = talloc(talloc_tos(), struct srvsvc_NETRDFSSETLOCALVOLUMESTATE);
3555 if (r == NULL) {
3556 return false;
3559 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3560 talloc_free(r);
3561 return false;
3564 pull = ndr_pull_init_blob(&blob, r, NULL);
3565 if (pull == NULL) {
3566 talloc_free(r);
3567 return false;
3570 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3571 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3572 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3573 talloc_free(r);
3574 return false;
3577 if (DEBUGLEVEL >= 10) {
3578 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, r);
3581 r->out.result = _srvsvc_NETRDFSSETLOCALVOLUMESTATE(p, r);
3583 if (p->rng_fault_state) {
3584 talloc_free(r);
3585 /* Return true here, srv_pipe_hnd.c will take care */
3586 return true;
3589 if (DEBUGLEVEL >= 10) {
3590 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, r);
3593 push = ndr_push_init_ctx(r, NULL);
3594 if (push == NULL) {
3595 talloc_free(r);
3596 return false;
3599 ndr_err = call->ndr_push(push, NDR_OUT, r);
3600 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3601 talloc_free(r);
3602 return false;
3605 blob = ndr_push_blob(push);
3606 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3607 talloc_free(r);
3608 return false;
3611 talloc_free(r);
3613 return true;
3616 static bool api_srvsvc_NETRDFSSETSERVERINFO(pipes_struct *p)
3618 const struct ndr_interface_call *call;
3619 struct ndr_pull *pull;
3620 struct ndr_push *push;
3621 enum ndr_err_code ndr_err;
3622 DATA_BLOB blob;
3623 struct srvsvc_NETRDFSSETSERVERINFO *r;
3625 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSSETSERVERINFO];
3627 r = talloc(talloc_tos(), struct srvsvc_NETRDFSSETSERVERINFO);
3628 if (r == NULL) {
3629 return false;
3632 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3633 talloc_free(r);
3634 return false;
3637 pull = ndr_pull_init_blob(&blob, r, NULL);
3638 if (pull == NULL) {
3639 talloc_free(r);
3640 return false;
3643 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3644 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3645 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3646 talloc_free(r);
3647 return false;
3650 if (DEBUGLEVEL >= 10) {
3651 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO, r);
3654 r->out.result = _srvsvc_NETRDFSSETSERVERINFO(p, r);
3656 if (p->rng_fault_state) {
3657 talloc_free(r);
3658 /* Return true here, srv_pipe_hnd.c will take care */
3659 return true;
3662 if (DEBUGLEVEL >= 10) {
3663 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, r);
3666 push = ndr_push_init_ctx(r, NULL);
3667 if (push == NULL) {
3668 talloc_free(r);
3669 return false;
3672 ndr_err = call->ndr_push(push, NDR_OUT, r);
3673 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3674 talloc_free(r);
3675 return false;
3678 blob = ndr_push_blob(push);
3679 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3680 talloc_free(r);
3681 return false;
3684 talloc_free(r);
3686 return true;
3689 static bool api_srvsvc_NETRDFSCREATEEXITPOINT(pipes_struct *p)
3691 const struct ndr_interface_call *call;
3692 struct ndr_pull *pull;
3693 struct ndr_push *push;
3694 enum ndr_err_code ndr_err;
3695 DATA_BLOB blob;
3696 struct srvsvc_NETRDFSCREATEEXITPOINT *r;
3698 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSCREATEEXITPOINT];
3700 r = talloc(talloc_tos(), struct srvsvc_NETRDFSCREATEEXITPOINT);
3701 if (r == NULL) {
3702 return false;
3705 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3706 talloc_free(r);
3707 return false;
3710 pull = ndr_pull_init_blob(&blob, r, NULL);
3711 if (pull == NULL) {
3712 talloc_free(r);
3713 return false;
3716 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3717 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3718 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3719 talloc_free(r);
3720 return false;
3723 if (DEBUGLEVEL >= 10) {
3724 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, r);
3727 r->out.result = _srvsvc_NETRDFSCREATEEXITPOINT(p, r);
3729 if (p->rng_fault_state) {
3730 talloc_free(r);
3731 /* Return true here, srv_pipe_hnd.c will take care */
3732 return true;
3735 if (DEBUGLEVEL >= 10) {
3736 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, r);
3739 push = ndr_push_init_ctx(r, NULL);
3740 if (push == NULL) {
3741 talloc_free(r);
3742 return false;
3745 ndr_err = call->ndr_push(push, NDR_OUT, r);
3746 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3747 talloc_free(r);
3748 return false;
3751 blob = ndr_push_blob(push);
3752 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3753 talloc_free(r);
3754 return false;
3757 talloc_free(r);
3759 return true;
3762 static bool api_srvsvc_NETRDFSDELETEEXITPOINT(pipes_struct *p)
3764 const struct ndr_interface_call *call;
3765 struct ndr_pull *pull;
3766 struct ndr_push *push;
3767 enum ndr_err_code ndr_err;
3768 DATA_BLOB blob;
3769 struct srvsvc_NETRDFSDELETEEXITPOINT *r;
3771 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSDELETEEXITPOINT];
3773 r = talloc(talloc_tos(), struct srvsvc_NETRDFSDELETEEXITPOINT);
3774 if (r == NULL) {
3775 return false;
3778 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3779 talloc_free(r);
3780 return false;
3783 pull = ndr_pull_init_blob(&blob, r, NULL);
3784 if (pull == NULL) {
3785 talloc_free(r);
3786 return false;
3789 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3790 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3791 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3792 talloc_free(r);
3793 return false;
3796 if (DEBUGLEVEL >= 10) {
3797 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, r);
3800 r->out.result = _srvsvc_NETRDFSDELETEEXITPOINT(p, r);
3802 if (p->rng_fault_state) {
3803 talloc_free(r);
3804 /* Return true here, srv_pipe_hnd.c will take care */
3805 return true;
3808 if (DEBUGLEVEL >= 10) {
3809 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, r);
3812 push = ndr_push_init_ctx(r, NULL);
3813 if (push == NULL) {
3814 talloc_free(r);
3815 return false;
3818 ndr_err = call->ndr_push(push, NDR_OUT, r);
3819 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3820 talloc_free(r);
3821 return false;
3824 blob = ndr_push_blob(push);
3825 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3826 talloc_free(r);
3827 return false;
3830 talloc_free(r);
3832 return true;
3835 static bool api_srvsvc_NETRDFSMODIFYPREFIX(pipes_struct *p)
3837 const struct ndr_interface_call *call;
3838 struct ndr_pull *pull;
3839 struct ndr_push *push;
3840 enum ndr_err_code ndr_err;
3841 DATA_BLOB blob;
3842 struct srvsvc_NETRDFSMODIFYPREFIX *r;
3844 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSMODIFYPREFIX];
3846 r = talloc(talloc_tos(), struct srvsvc_NETRDFSMODIFYPREFIX);
3847 if (r == NULL) {
3848 return false;
3851 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3852 talloc_free(r);
3853 return false;
3856 pull = ndr_pull_init_blob(&blob, r, NULL);
3857 if (pull == NULL) {
3858 talloc_free(r);
3859 return false;
3862 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3863 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3864 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3865 talloc_free(r);
3866 return false;
3869 if (DEBUGLEVEL >= 10) {
3870 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, r);
3873 r->out.result = _srvsvc_NETRDFSMODIFYPREFIX(p, r);
3875 if (p->rng_fault_state) {
3876 talloc_free(r);
3877 /* Return true here, srv_pipe_hnd.c will take care */
3878 return true;
3881 if (DEBUGLEVEL >= 10) {
3882 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, r);
3885 push = ndr_push_init_ctx(r, NULL);
3886 if (push == NULL) {
3887 talloc_free(r);
3888 return false;
3891 ndr_err = call->ndr_push(push, NDR_OUT, r);
3892 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3893 talloc_free(r);
3894 return false;
3897 blob = ndr_push_blob(push);
3898 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3899 talloc_free(r);
3900 return false;
3903 talloc_free(r);
3905 return true;
3908 static bool api_srvsvc_NETRDFSFIXLOCALVOLUME(pipes_struct *p)
3910 const struct ndr_interface_call *call;
3911 struct ndr_pull *pull;
3912 struct ndr_push *push;
3913 enum ndr_err_code ndr_err;
3914 DATA_BLOB blob;
3915 struct srvsvc_NETRDFSFIXLOCALVOLUME *r;
3917 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSFIXLOCALVOLUME];
3919 r = talloc(talloc_tos(), struct srvsvc_NETRDFSFIXLOCALVOLUME);
3920 if (r == NULL) {
3921 return false;
3924 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3925 talloc_free(r);
3926 return false;
3929 pull = ndr_pull_init_blob(&blob, r, NULL);
3930 if (pull == NULL) {
3931 talloc_free(r);
3932 return false;
3935 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3936 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3937 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3938 talloc_free(r);
3939 return false;
3942 if (DEBUGLEVEL >= 10) {
3943 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, r);
3946 r->out.result = _srvsvc_NETRDFSFIXLOCALVOLUME(p, r);
3948 if (p->rng_fault_state) {
3949 talloc_free(r);
3950 /* Return true here, srv_pipe_hnd.c will take care */
3951 return true;
3954 if (DEBUGLEVEL >= 10) {
3955 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, r);
3958 push = ndr_push_init_ctx(r, NULL);
3959 if (push == NULL) {
3960 talloc_free(r);
3961 return false;
3964 ndr_err = call->ndr_push(push, NDR_OUT, r);
3965 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3966 talloc_free(r);
3967 return false;
3970 blob = ndr_push_blob(push);
3971 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3972 talloc_free(r);
3973 return false;
3976 talloc_free(r);
3978 return true;
3981 static bool api_srvsvc_NETRDFSMANAGERREPORTSITEINFO(pipes_struct *p)
3983 const struct ndr_interface_call *call;
3984 struct ndr_pull *pull;
3985 struct ndr_push *push;
3986 enum ndr_err_code ndr_err;
3987 DATA_BLOB blob;
3988 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r;
3990 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO];
3992 r = talloc(talloc_tos(), struct srvsvc_NETRDFSMANAGERREPORTSITEINFO);
3993 if (r == NULL) {
3994 return false;
3997 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3998 talloc_free(r);
3999 return false;
4002 pull = ndr_pull_init_blob(&blob, r, NULL);
4003 if (pull == NULL) {
4004 talloc_free(r);
4005 return false;
4008 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4009 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4010 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4011 talloc_free(r);
4012 return false;
4015 if (DEBUGLEVEL >= 10) {
4016 NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, r);
4019 r->out.result = _srvsvc_NETRDFSMANAGERREPORTSITEINFO(p, r);
4021 if (p->rng_fault_state) {
4022 talloc_free(r);
4023 /* Return true here, srv_pipe_hnd.c will take care */
4024 return true;
4027 if (DEBUGLEVEL >= 10) {
4028 NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, r);
4031 push = ndr_push_init_ctx(r, NULL);
4032 if (push == NULL) {
4033 talloc_free(r);
4034 return false;
4037 ndr_err = call->ndr_push(push, NDR_OUT, r);
4038 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4039 talloc_free(r);
4040 return false;
4043 blob = ndr_push_blob(push);
4044 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4045 talloc_free(r);
4046 return false;
4049 talloc_free(r);
4051 return true;
4054 static bool api_srvsvc_NETRSERVERTRANSPORTDELEX(pipes_struct *p)
4056 const struct ndr_interface_call *call;
4057 struct ndr_pull *pull;
4058 struct ndr_push *push;
4059 enum ndr_err_code ndr_err;
4060 DATA_BLOB blob;
4061 struct srvsvc_NETRSERVERTRANSPORTDELEX *r;
4063 call = &ndr_table_srvsvc.calls[NDR_SRVSVC_NETRSERVERTRANSPORTDELEX];
4065 r = talloc(talloc_tos(), struct srvsvc_NETRSERVERTRANSPORTDELEX);
4066 if (r == NULL) {
4067 return false;
4070 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4071 talloc_free(r);
4072 return false;
4075 pull = ndr_pull_init_blob(&blob, r, NULL);
4076 if (pull == NULL) {
4077 talloc_free(r);
4078 return false;
4081 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4082 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4083 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4084 talloc_free(r);
4085 return false;
4088 if (DEBUGLEVEL >= 10) {
4089 NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, r);
4092 r->out.result = _srvsvc_NETRSERVERTRANSPORTDELEX(p, r);
4094 if (p->rng_fault_state) {
4095 talloc_free(r);
4096 /* Return true here, srv_pipe_hnd.c will take care */
4097 return true;
4100 if (DEBUGLEVEL >= 10) {
4101 NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, r);
4104 push = ndr_push_init_ctx(r, NULL);
4105 if (push == NULL) {
4106 talloc_free(r);
4107 return false;
4110 ndr_err = call->ndr_push(push, NDR_OUT, r);
4111 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4112 talloc_free(r);
4113 return false;
4116 blob = ndr_push_blob(push);
4117 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4118 talloc_free(r);
4119 return false;
4122 talloc_free(r);
4124 return true;
4128 /* Tables */
4129 static struct api_struct api_srvsvc_cmds[] =
4131 {"SRVSVC_NETCHARDEVENUM", NDR_SRVSVC_NETCHARDEVENUM, api_srvsvc_NetCharDevEnum},
4132 {"SRVSVC_NETCHARDEVGETINFO", NDR_SRVSVC_NETCHARDEVGETINFO, api_srvsvc_NetCharDevGetInfo},
4133 {"SRVSVC_NETCHARDEVCONTROL", NDR_SRVSVC_NETCHARDEVCONTROL, api_srvsvc_NetCharDevControl},
4134 {"SRVSVC_NETCHARDEVQENUM", NDR_SRVSVC_NETCHARDEVQENUM, api_srvsvc_NetCharDevQEnum},
4135 {"SRVSVC_NETCHARDEVQGETINFO", NDR_SRVSVC_NETCHARDEVQGETINFO, api_srvsvc_NetCharDevQGetInfo},
4136 {"SRVSVC_NETCHARDEVQSETINFO", NDR_SRVSVC_NETCHARDEVQSETINFO, api_srvsvc_NetCharDevQSetInfo},
4137 {"SRVSVC_NETCHARDEVQPURGE", NDR_SRVSVC_NETCHARDEVQPURGE, api_srvsvc_NetCharDevQPurge},
4138 {"SRVSVC_NETCHARDEVQPURGESELF", NDR_SRVSVC_NETCHARDEVQPURGESELF, api_srvsvc_NetCharDevQPurgeSelf},
4139 {"SRVSVC_NETCONNENUM", NDR_SRVSVC_NETCONNENUM, api_srvsvc_NetConnEnum},
4140 {"SRVSVC_NETFILEENUM", NDR_SRVSVC_NETFILEENUM, api_srvsvc_NetFileEnum},
4141 {"SRVSVC_NETFILEGETINFO", NDR_SRVSVC_NETFILEGETINFO, api_srvsvc_NetFileGetInfo},
4142 {"SRVSVC_NETFILECLOSE", NDR_SRVSVC_NETFILECLOSE, api_srvsvc_NetFileClose},
4143 {"SRVSVC_NETSESSENUM", NDR_SRVSVC_NETSESSENUM, api_srvsvc_NetSessEnum},
4144 {"SRVSVC_NETSESSDEL", NDR_SRVSVC_NETSESSDEL, api_srvsvc_NetSessDel},
4145 {"SRVSVC_NETSHAREADD", NDR_SRVSVC_NETSHAREADD, api_srvsvc_NetShareAdd},
4146 {"SRVSVC_NETSHAREENUMALL", NDR_SRVSVC_NETSHAREENUMALL, api_srvsvc_NetShareEnumAll},
4147 {"SRVSVC_NETSHAREGETINFO", NDR_SRVSVC_NETSHAREGETINFO, api_srvsvc_NetShareGetInfo},
4148 {"SRVSVC_NETSHARESETINFO", NDR_SRVSVC_NETSHARESETINFO, api_srvsvc_NetShareSetInfo},
4149 {"SRVSVC_NETSHAREDEL", NDR_SRVSVC_NETSHAREDEL, api_srvsvc_NetShareDel},
4150 {"SRVSVC_NETSHAREDELSTICKY", NDR_SRVSVC_NETSHAREDELSTICKY, api_srvsvc_NetShareDelSticky},
4151 {"SRVSVC_NETSHARECHECK", NDR_SRVSVC_NETSHARECHECK, api_srvsvc_NetShareCheck},
4152 {"SRVSVC_NETSRVGETINFO", NDR_SRVSVC_NETSRVGETINFO, api_srvsvc_NetSrvGetInfo},
4153 {"SRVSVC_NETSRVSETINFO", NDR_SRVSVC_NETSRVSETINFO, api_srvsvc_NetSrvSetInfo},
4154 {"SRVSVC_NETDISKENUM", NDR_SRVSVC_NETDISKENUM, api_srvsvc_NetDiskEnum},
4155 {"SRVSVC_NETSERVERSTATISTICSGET", NDR_SRVSVC_NETSERVERSTATISTICSGET, api_srvsvc_NetServerStatisticsGet},
4156 {"SRVSVC_NETTRANSPORTADD", NDR_SRVSVC_NETTRANSPORTADD, api_srvsvc_NetTransportAdd},
4157 {"SRVSVC_NETTRANSPORTENUM", NDR_SRVSVC_NETTRANSPORTENUM, api_srvsvc_NetTransportEnum},
4158 {"SRVSVC_NETTRANSPORTDEL", NDR_SRVSVC_NETTRANSPORTDEL, api_srvsvc_NetTransportDel},
4159 {"SRVSVC_NETREMOTETOD", NDR_SRVSVC_NETREMOTETOD, api_srvsvc_NetRemoteTOD},
4160 {"SRVSVC_NETSETSERVICEBITS", NDR_SRVSVC_NETSETSERVICEBITS, api_srvsvc_NetSetServiceBits},
4161 {"SRVSVC_NETPATHTYPE", NDR_SRVSVC_NETPATHTYPE, api_srvsvc_NetPathType},
4162 {"SRVSVC_NETPATHCANONICALIZE", NDR_SRVSVC_NETPATHCANONICALIZE, api_srvsvc_NetPathCanonicalize},
4163 {"SRVSVC_NETPATHCOMPARE", NDR_SRVSVC_NETPATHCOMPARE, api_srvsvc_NetPathCompare},
4164 {"SRVSVC_NETNAMEVALIDATE", NDR_SRVSVC_NETNAMEVALIDATE, api_srvsvc_NetNameValidate},
4165 {"SRVSVC_NETRPRNAMECANONICALIZE", NDR_SRVSVC_NETRPRNAMECANONICALIZE, api_srvsvc_NETRPRNAMECANONICALIZE},
4166 {"SRVSVC_NETPRNAMECOMPARE", NDR_SRVSVC_NETPRNAMECOMPARE, api_srvsvc_NetPRNameCompare},
4167 {"SRVSVC_NETSHAREENUM", NDR_SRVSVC_NETSHAREENUM, api_srvsvc_NetShareEnum},
4168 {"SRVSVC_NETSHAREDELSTART", NDR_SRVSVC_NETSHAREDELSTART, api_srvsvc_NetShareDelStart},
4169 {"SRVSVC_NETSHAREDELCOMMIT", NDR_SRVSVC_NETSHAREDELCOMMIT, api_srvsvc_NetShareDelCommit},
4170 {"SRVSVC_NETGETFILESECURITY", NDR_SRVSVC_NETGETFILESECURITY, api_srvsvc_NetGetFileSecurity},
4171 {"SRVSVC_NETSETFILESECURITY", NDR_SRVSVC_NETSETFILESECURITY, api_srvsvc_NetSetFileSecurity},
4172 {"SRVSVC_NETSERVERTRANSPORTADDEX", NDR_SRVSVC_NETSERVERTRANSPORTADDEX, api_srvsvc_NetServerTransportAddEx},
4173 {"SRVSVC_NETSERVERSETSERVICEBITSEX", NDR_SRVSVC_NETSERVERSETSERVICEBITSEX, api_srvsvc_NetServerSetServiceBitsEx},
4174 {"SRVSVC_NETRDFSGETVERSION", NDR_SRVSVC_NETRDFSGETVERSION, api_srvsvc_NETRDFSGETVERSION},
4175 {"SRVSVC_NETRDFSCREATELOCALPARTITION", NDR_SRVSVC_NETRDFSCREATELOCALPARTITION, api_srvsvc_NETRDFSCREATELOCALPARTITION},
4176 {"SRVSVC_NETRDFSDELETELOCALPARTITION", NDR_SRVSVC_NETRDFSDELETELOCALPARTITION, api_srvsvc_NETRDFSDELETELOCALPARTITION},
4177 {"SRVSVC_NETRDFSSETLOCALVOLUMESTATE", NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE, api_srvsvc_NETRDFSSETLOCALVOLUMESTATE},
4178 {"SRVSVC_NETRDFSSETSERVERINFO", NDR_SRVSVC_NETRDFSSETSERVERINFO, api_srvsvc_NETRDFSSETSERVERINFO},
4179 {"SRVSVC_NETRDFSCREATEEXITPOINT", NDR_SRVSVC_NETRDFSCREATEEXITPOINT, api_srvsvc_NETRDFSCREATEEXITPOINT},
4180 {"SRVSVC_NETRDFSDELETEEXITPOINT", NDR_SRVSVC_NETRDFSDELETEEXITPOINT, api_srvsvc_NETRDFSDELETEEXITPOINT},
4181 {"SRVSVC_NETRDFSMODIFYPREFIX", NDR_SRVSVC_NETRDFSMODIFYPREFIX, api_srvsvc_NETRDFSMODIFYPREFIX},
4182 {"SRVSVC_NETRDFSFIXLOCALVOLUME", NDR_SRVSVC_NETRDFSFIXLOCALVOLUME, api_srvsvc_NETRDFSFIXLOCALVOLUME},
4183 {"SRVSVC_NETRDFSMANAGERREPORTSITEINFO", NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO, api_srvsvc_NETRDFSMANAGERREPORTSITEINFO},
4184 {"SRVSVC_NETRSERVERTRANSPORTDELEX", NDR_SRVSVC_NETRSERVERTRANSPORTDELEX, api_srvsvc_NETRSERVERTRANSPORTDELEX},
4187 void srvsvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
4189 *fns = api_srvsvc_cmds;
4190 *n_fns = sizeof(api_srvsvc_cmds) / sizeof(struct api_struct);
4193 NTSTATUS rpc_srvsvc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
4195 if (cli->pipes_struct == NULL) {
4196 return NT_STATUS_INVALID_PARAMETER;
4199 switch (opnum)
4201 case NDR_SRVSVC_NETCHARDEVENUM: {
4202 struct srvsvc_NetCharDevEnum *r = (struct srvsvc_NetCharDevEnum *)_r;
4203 ZERO_STRUCT(r->out);
4204 r->out.info_ctr = r->in.info_ctr;
4205 r->out.resume_handle = r->in.resume_handle;
4206 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4207 if (r->out.totalentries == NULL) {
4208 return NT_STATUS_NO_MEMORY;
4211 r->out.result = _srvsvc_NetCharDevEnum(cli->pipes_struct, r);
4212 return NT_STATUS_OK;
4215 case NDR_SRVSVC_NETCHARDEVGETINFO: {
4216 struct srvsvc_NetCharDevGetInfo *r = (struct srvsvc_NetCharDevGetInfo *)_r;
4217 ZERO_STRUCT(r->out);
4218 r->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo);
4219 if (r->out.info == NULL) {
4220 return NT_STATUS_NO_MEMORY;
4223 r->out.result = _srvsvc_NetCharDevGetInfo(cli->pipes_struct, r);
4224 return NT_STATUS_OK;
4227 case NDR_SRVSVC_NETCHARDEVCONTROL: {
4228 struct srvsvc_NetCharDevControl *r = (struct srvsvc_NetCharDevControl *)_r;
4229 r->out.result = _srvsvc_NetCharDevControl(cli->pipes_struct, r);
4230 return NT_STATUS_OK;
4233 case NDR_SRVSVC_NETCHARDEVQENUM: {
4234 struct srvsvc_NetCharDevQEnum *r = (struct srvsvc_NetCharDevQEnum *)_r;
4235 ZERO_STRUCT(r->out);
4236 r->out.info_ctr = r->in.info_ctr;
4237 r->out.resume_handle = r->in.resume_handle;
4238 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4239 if (r->out.totalentries == NULL) {
4240 return NT_STATUS_NO_MEMORY;
4243 r->out.result = _srvsvc_NetCharDevQEnum(cli->pipes_struct, r);
4244 return NT_STATUS_OK;
4247 case NDR_SRVSVC_NETCHARDEVQGETINFO: {
4248 struct srvsvc_NetCharDevQGetInfo *r = (struct srvsvc_NetCharDevQGetInfo *)_r;
4249 ZERO_STRUCT(r->out);
4250 r->out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo);
4251 if (r->out.info == NULL) {
4252 return NT_STATUS_NO_MEMORY;
4255 r->out.result = _srvsvc_NetCharDevQGetInfo(cli->pipes_struct, r);
4256 return NT_STATUS_OK;
4259 case NDR_SRVSVC_NETCHARDEVQSETINFO: {
4260 struct srvsvc_NetCharDevQSetInfo *r = (struct srvsvc_NetCharDevQSetInfo *)_r;
4261 ZERO_STRUCT(r->out);
4262 r->out.parm_error = r->in.parm_error;
4263 r->out.result = _srvsvc_NetCharDevQSetInfo(cli->pipes_struct, r);
4264 return NT_STATUS_OK;
4267 case NDR_SRVSVC_NETCHARDEVQPURGE: {
4268 struct srvsvc_NetCharDevQPurge *r = (struct srvsvc_NetCharDevQPurge *)_r;
4269 r->out.result = _srvsvc_NetCharDevQPurge(cli->pipes_struct, r);
4270 return NT_STATUS_OK;
4273 case NDR_SRVSVC_NETCHARDEVQPURGESELF: {
4274 struct srvsvc_NetCharDevQPurgeSelf *r = (struct srvsvc_NetCharDevQPurgeSelf *)_r;
4275 r->out.result = _srvsvc_NetCharDevQPurgeSelf(cli->pipes_struct, r);
4276 return NT_STATUS_OK;
4279 case NDR_SRVSVC_NETCONNENUM: {
4280 struct srvsvc_NetConnEnum *r = (struct srvsvc_NetConnEnum *)_r;
4281 ZERO_STRUCT(r->out);
4282 r->out.info_ctr = r->in.info_ctr;
4283 r->out.resume_handle = r->in.resume_handle;
4284 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4285 if (r->out.totalentries == NULL) {
4286 return NT_STATUS_NO_MEMORY;
4289 r->out.result = _srvsvc_NetConnEnum(cli->pipes_struct, r);
4290 return NT_STATUS_OK;
4293 case NDR_SRVSVC_NETFILEENUM: {
4294 struct srvsvc_NetFileEnum *r = (struct srvsvc_NetFileEnum *)_r;
4295 ZERO_STRUCT(r->out);
4296 r->out.info_ctr = r->in.info_ctr;
4297 r->out.resume_handle = r->in.resume_handle;
4298 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4299 if (r->out.totalentries == NULL) {
4300 return NT_STATUS_NO_MEMORY;
4303 r->out.result = _srvsvc_NetFileEnum(cli->pipes_struct, r);
4304 return NT_STATUS_OK;
4307 case NDR_SRVSVC_NETFILEGETINFO: {
4308 struct srvsvc_NetFileGetInfo *r = (struct srvsvc_NetFileGetInfo *)_r;
4309 ZERO_STRUCT(r->out);
4310 r->out.info = talloc_zero(mem_ctx, union srvsvc_NetFileInfo);
4311 if (r->out.info == NULL) {
4312 return NT_STATUS_NO_MEMORY;
4315 r->out.result = _srvsvc_NetFileGetInfo(cli->pipes_struct, r);
4316 return NT_STATUS_OK;
4319 case NDR_SRVSVC_NETFILECLOSE: {
4320 struct srvsvc_NetFileClose *r = (struct srvsvc_NetFileClose *)_r;
4321 r->out.result = _srvsvc_NetFileClose(cli->pipes_struct, r);
4322 return NT_STATUS_OK;
4325 case NDR_SRVSVC_NETSESSENUM: {
4326 struct srvsvc_NetSessEnum *r = (struct srvsvc_NetSessEnum *)_r;
4327 ZERO_STRUCT(r->out);
4328 r->out.info_ctr = r->in.info_ctr;
4329 r->out.resume_handle = r->in.resume_handle;
4330 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4331 if (r->out.totalentries == NULL) {
4332 return NT_STATUS_NO_MEMORY;
4335 r->out.result = _srvsvc_NetSessEnum(cli->pipes_struct, r);
4336 return NT_STATUS_OK;
4339 case NDR_SRVSVC_NETSESSDEL: {
4340 struct srvsvc_NetSessDel *r = (struct srvsvc_NetSessDel *)_r;
4341 r->out.result = _srvsvc_NetSessDel(cli->pipes_struct, r);
4342 return NT_STATUS_OK;
4345 case NDR_SRVSVC_NETSHAREADD: {
4346 struct srvsvc_NetShareAdd *r = (struct srvsvc_NetShareAdd *)_r;
4347 ZERO_STRUCT(r->out);
4348 r->out.parm_error = r->in.parm_error;
4349 r->out.result = _srvsvc_NetShareAdd(cli->pipes_struct, r);
4350 return NT_STATUS_OK;
4353 case NDR_SRVSVC_NETSHAREENUMALL: {
4354 struct srvsvc_NetShareEnumAll *r = (struct srvsvc_NetShareEnumAll *)_r;
4355 ZERO_STRUCT(r->out);
4356 r->out.info_ctr = r->in.info_ctr;
4357 r->out.resume_handle = r->in.resume_handle;
4358 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4359 if (r->out.totalentries == NULL) {
4360 return NT_STATUS_NO_MEMORY;
4363 r->out.result = _srvsvc_NetShareEnumAll(cli->pipes_struct, r);
4364 return NT_STATUS_OK;
4367 case NDR_SRVSVC_NETSHAREGETINFO: {
4368 struct srvsvc_NetShareGetInfo *r = (struct srvsvc_NetShareGetInfo *)_r;
4369 ZERO_STRUCT(r->out);
4370 r->out.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo);
4371 if (r->out.info == NULL) {
4372 return NT_STATUS_NO_MEMORY;
4375 r->out.result = _srvsvc_NetShareGetInfo(cli->pipes_struct, r);
4376 return NT_STATUS_OK;
4379 case NDR_SRVSVC_NETSHARESETINFO: {
4380 struct srvsvc_NetShareSetInfo *r = (struct srvsvc_NetShareSetInfo *)_r;
4381 ZERO_STRUCT(r->out);
4382 r->out.parm_error = r->in.parm_error;
4383 r->out.result = _srvsvc_NetShareSetInfo(cli->pipes_struct, r);
4384 return NT_STATUS_OK;
4387 case NDR_SRVSVC_NETSHAREDEL: {
4388 struct srvsvc_NetShareDel *r = (struct srvsvc_NetShareDel *)_r;
4389 r->out.result = _srvsvc_NetShareDel(cli->pipes_struct, r);
4390 return NT_STATUS_OK;
4393 case NDR_SRVSVC_NETSHAREDELSTICKY: {
4394 struct srvsvc_NetShareDelSticky *r = (struct srvsvc_NetShareDelSticky *)_r;
4395 r->out.result = _srvsvc_NetShareDelSticky(cli->pipes_struct, r);
4396 return NT_STATUS_OK;
4399 case NDR_SRVSVC_NETSHARECHECK: {
4400 struct srvsvc_NetShareCheck *r = (struct srvsvc_NetShareCheck *)_r;
4401 ZERO_STRUCT(r->out);
4402 r->out.type = talloc_zero(mem_ctx, enum srvsvc_ShareType);
4403 if (r->out.type == NULL) {
4404 return NT_STATUS_NO_MEMORY;
4407 r->out.result = _srvsvc_NetShareCheck(cli->pipes_struct, r);
4408 return NT_STATUS_OK;
4411 case NDR_SRVSVC_NETSRVGETINFO: {
4412 struct srvsvc_NetSrvGetInfo *r = (struct srvsvc_NetSrvGetInfo *)_r;
4413 ZERO_STRUCT(r->out);
4414 r->out.info = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo);
4415 if (r->out.info == NULL) {
4416 return NT_STATUS_NO_MEMORY;
4419 r->out.result = _srvsvc_NetSrvGetInfo(cli->pipes_struct, r);
4420 return NT_STATUS_OK;
4423 case NDR_SRVSVC_NETSRVSETINFO: {
4424 struct srvsvc_NetSrvSetInfo *r = (struct srvsvc_NetSrvSetInfo *)_r;
4425 ZERO_STRUCT(r->out);
4426 r->out.parm_error = r->in.parm_error;
4427 r->out.result = _srvsvc_NetSrvSetInfo(cli->pipes_struct, r);
4428 return NT_STATUS_OK;
4431 case NDR_SRVSVC_NETDISKENUM: {
4432 struct srvsvc_NetDiskEnum *r = (struct srvsvc_NetDiskEnum *)_r;
4433 ZERO_STRUCT(r->out);
4434 r->out.info = r->in.info;
4435 r->out.resume_handle = r->in.resume_handle;
4436 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4437 if (r->out.totalentries == NULL) {
4438 return NT_STATUS_NO_MEMORY;
4441 r->out.result = _srvsvc_NetDiskEnum(cli->pipes_struct, r);
4442 return NT_STATUS_OK;
4445 case NDR_SRVSVC_NETSERVERSTATISTICSGET: {
4446 struct srvsvc_NetServerStatisticsGet *r = (struct srvsvc_NetServerStatisticsGet *)_r;
4447 ZERO_STRUCT(r->out);
4448 r->out.stats = talloc_zero(mem_ctx, struct srvsvc_Statistics *);
4449 if (r->out.stats == NULL) {
4450 return NT_STATUS_NO_MEMORY;
4453 r->out.result = _srvsvc_NetServerStatisticsGet(cli->pipes_struct, r);
4454 return NT_STATUS_OK;
4457 case NDR_SRVSVC_NETTRANSPORTADD: {
4458 struct srvsvc_NetTransportAdd *r = (struct srvsvc_NetTransportAdd *)_r;
4459 r->out.result = _srvsvc_NetTransportAdd(cli->pipes_struct, r);
4460 return NT_STATUS_OK;
4463 case NDR_SRVSVC_NETTRANSPORTENUM: {
4464 struct srvsvc_NetTransportEnum *r = (struct srvsvc_NetTransportEnum *)_r;
4465 ZERO_STRUCT(r->out);
4466 r->out.transports = r->in.transports;
4467 r->out.resume_handle = r->in.resume_handle;
4468 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4469 if (r->out.totalentries == NULL) {
4470 return NT_STATUS_NO_MEMORY;
4473 r->out.result = _srvsvc_NetTransportEnum(cli->pipes_struct, r);
4474 return NT_STATUS_OK;
4477 case NDR_SRVSVC_NETTRANSPORTDEL: {
4478 struct srvsvc_NetTransportDel *r = (struct srvsvc_NetTransportDel *)_r;
4479 r->out.result = _srvsvc_NetTransportDel(cli->pipes_struct, r);
4480 return NT_STATUS_OK;
4483 case NDR_SRVSVC_NETREMOTETOD: {
4484 struct srvsvc_NetRemoteTOD *r = (struct srvsvc_NetRemoteTOD *)_r;
4485 ZERO_STRUCT(r->out);
4486 r->out.info = talloc_zero(mem_ctx, struct srvsvc_NetRemoteTODInfo *);
4487 if (r->out.info == NULL) {
4488 return NT_STATUS_NO_MEMORY;
4491 r->out.result = _srvsvc_NetRemoteTOD(cli->pipes_struct, r);
4492 return NT_STATUS_OK;
4495 case NDR_SRVSVC_NETSETSERVICEBITS: {
4496 struct srvsvc_NetSetServiceBits *r = (struct srvsvc_NetSetServiceBits *)_r;
4497 r->out.result = _srvsvc_NetSetServiceBits(cli->pipes_struct, r);
4498 return NT_STATUS_OK;
4501 case NDR_SRVSVC_NETPATHTYPE: {
4502 struct srvsvc_NetPathType *r = (struct srvsvc_NetPathType *)_r;
4503 ZERO_STRUCT(r->out);
4504 r->out.pathtype = talloc_zero(mem_ctx, uint32_t);
4505 if (r->out.pathtype == NULL) {
4506 return NT_STATUS_NO_MEMORY;
4509 r->out.result = _srvsvc_NetPathType(cli->pipes_struct, r);
4510 return NT_STATUS_OK;
4513 case NDR_SRVSVC_NETPATHCANONICALIZE: {
4514 struct srvsvc_NetPathCanonicalize *r = (struct srvsvc_NetPathCanonicalize *)_r;
4515 ZERO_STRUCT(r->out);
4516 r->out.pathtype = r->in.pathtype;
4517 r->out.can_path = talloc_zero_array(mem_ctx, uint8_t, r->in.maxbuf);
4518 if (r->out.can_path == NULL) {
4519 return NT_STATUS_NO_MEMORY;
4522 r->out.result = _srvsvc_NetPathCanonicalize(cli->pipes_struct, r);
4523 return NT_STATUS_OK;
4526 case NDR_SRVSVC_NETPATHCOMPARE: {
4527 struct srvsvc_NetPathCompare *r = (struct srvsvc_NetPathCompare *)_r;
4528 r->out.result = _srvsvc_NetPathCompare(cli->pipes_struct, r);
4529 return NT_STATUS_OK;
4532 case NDR_SRVSVC_NETNAMEVALIDATE: {
4533 struct srvsvc_NetNameValidate *r = (struct srvsvc_NetNameValidate *)_r;
4534 r->out.result = _srvsvc_NetNameValidate(cli->pipes_struct, r);
4535 return NT_STATUS_OK;
4538 case NDR_SRVSVC_NETRPRNAMECANONICALIZE: {
4539 struct srvsvc_NETRPRNAMECANONICALIZE *r = (struct srvsvc_NETRPRNAMECANONICALIZE *)_r;
4540 r->out.result = _srvsvc_NETRPRNAMECANONICALIZE(cli->pipes_struct, r);
4541 return NT_STATUS_OK;
4544 case NDR_SRVSVC_NETPRNAMECOMPARE: {
4545 struct srvsvc_NetPRNameCompare *r = (struct srvsvc_NetPRNameCompare *)_r;
4546 r->out.result = _srvsvc_NetPRNameCompare(cli->pipes_struct, r);
4547 return NT_STATUS_OK;
4550 case NDR_SRVSVC_NETSHAREENUM: {
4551 struct srvsvc_NetShareEnum *r = (struct srvsvc_NetShareEnum *)_r;
4552 ZERO_STRUCT(r->out);
4553 r->out.info_ctr = r->in.info_ctr;
4554 r->out.resume_handle = r->in.resume_handle;
4555 r->out.totalentries = talloc_zero(mem_ctx, uint32_t);
4556 if (r->out.totalentries == NULL) {
4557 return NT_STATUS_NO_MEMORY;
4560 r->out.result = _srvsvc_NetShareEnum(cli->pipes_struct, r);
4561 return NT_STATUS_OK;
4564 case NDR_SRVSVC_NETSHAREDELSTART: {
4565 struct srvsvc_NetShareDelStart *r = (struct srvsvc_NetShareDelStart *)_r;
4566 ZERO_STRUCT(r->out);
4567 r->out.hnd = talloc_zero(mem_ctx, struct policy_handle);
4568 if (r->out.hnd == NULL) {
4569 return NT_STATUS_NO_MEMORY;
4572 r->out.result = _srvsvc_NetShareDelStart(cli->pipes_struct, r);
4573 return NT_STATUS_OK;
4576 case NDR_SRVSVC_NETSHAREDELCOMMIT: {
4577 struct srvsvc_NetShareDelCommit *r = (struct srvsvc_NetShareDelCommit *)_r;
4578 ZERO_STRUCT(r->out);
4579 r->out.hnd = r->in.hnd;
4580 r->out.result = _srvsvc_NetShareDelCommit(cli->pipes_struct, r);
4581 return NT_STATUS_OK;
4584 case NDR_SRVSVC_NETGETFILESECURITY: {
4585 struct srvsvc_NetGetFileSecurity *r = (struct srvsvc_NetGetFileSecurity *)_r;
4586 ZERO_STRUCT(r->out);
4587 r->out.sd_buf = talloc_zero(mem_ctx, struct sec_desc_buf *);
4588 if (r->out.sd_buf == NULL) {
4589 return NT_STATUS_NO_MEMORY;
4592 r->out.result = _srvsvc_NetGetFileSecurity(cli->pipes_struct, r);
4593 return NT_STATUS_OK;
4596 case NDR_SRVSVC_NETSETFILESECURITY: {
4597 struct srvsvc_NetSetFileSecurity *r = (struct srvsvc_NetSetFileSecurity *)_r;
4598 r->out.result = _srvsvc_NetSetFileSecurity(cli->pipes_struct, r);
4599 return NT_STATUS_OK;
4602 case NDR_SRVSVC_NETSERVERTRANSPORTADDEX: {
4603 struct srvsvc_NetServerTransportAddEx *r = (struct srvsvc_NetServerTransportAddEx *)_r;
4604 r->out.result = _srvsvc_NetServerTransportAddEx(cli->pipes_struct, r);
4605 return NT_STATUS_OK;
4608 case NDR_SRVSVC_NETSERVERSETSERVICEBITSEX: {
4609 struct srvsvc_NetServerSetServiceBitsEx *r = (struct srvsvc_NetServerSetServiceBitsEx *)_r;
4610 r->out.result = _srvsvc_NetServerSetServiceBitsEx(cli->pipes_struct, r);
4611 return NT_STATUS_OK;
4614 case NDR_SRVSVC_NETRDFSGETVERSION: {
4615 struct srvsvc_NETRDFSGETVERSION *r = (struct srvsvc_NETRDFSGETVERSION *)_r;
4616 r->out.result = _srvsvc_NETRDFSGETVERSION(cli->pipes_struct, r);
4617 return NT_STATUS_OK;
4620 case NDR_SRVSVC_NETRDFSCREATELOCALPARTITION: {
4621 struct srvsvc_NETRDFSCREATELOCALPARTITION *r = (struct srvsvc_NETRDFSCREATELOCALPARTITION *)_r;
4622 r->out.result = _srvsvc_NETRDFSCREATELOCALPARTITION(cli->pipes_struct, r);
4623 return NT_STATUS_OK;
4626 case NDR_SRVSVC_NETRDFSDELETELOCALPARTITION: {
4627 struct srvsvc_NETRDFSDELETELOCALPARTITION *r = (struct srvsvc_NETRDFSDELETELOCALPARTITION *)_r;
4628 r->out.result = _srvsvc_NETRDFSDELETELOCALPARTITION(cli->pipes_struct, r);
4629 return NT_STATUS_OK;
4632 case NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE: {
4633 struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r = (struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *)_r;
4634 r->out.result = _srvsvc_NETRDFSSETLOCALVOLUMESTATE(cli->pipes_struct, r);
4635 return NT_STATUS_OK;
4638 case NDR_SRVSVC_NETRDFSSETSERVERINFO: {
4639 struct srvsvc_NETRDFSSETSERVERINFO *r = (struct srvsvc_NETRDFSSETSERVERINFO *)_r;
4640 r->out.result = _srvsvc_NETRDFSSETSERVERINFO(cli->pipes_struct, r);
4641 return NT_STATUS_OK;
4644 case NDR_SRVSVC_NETRDFSCREATEEXITPOINT: {
4645 struct srvsvc_NETRDFSCREATEEXITPOINT *r = (struct srvsvc_NETRDFSCREATEEXITPOINT *)_r;
4646 r->out.result = _srvsvc_NETRDFSCREATEEXITPOINT(cli->pipes_struct, r);
4647 return NT_STATUS_OK;
4650 case NDR_SRVSVC_NETRDFSDELETEEXITPOINT: {
4651 struct srvsvc_NETRDFSDELETEEXITPOINT *r = (struct srvsvc_NETRDFSDELETEEXITPOINT *)_r;
4652 r->out.result = _srvsvc_NETRDFSDELETEEXITPOINT(cli->pipes_struct, r);
4653 return NT_STATUS_OK;
4656 case NDR_SRVSVC_NETRDFSMODIFYPREFIX: {
4657 struct srvsvc_NETRDFSMODIFYPREFIX *r = (struct srvsvc_NETRDFSMODIFYPREFIX *)_r;
4658 r->out.result = _srvsvc_NETRDFSMODIFYPREFIX(cli->pipes_struct, r);
4659 return NT_STATUS_OK;
4662 case NDR_SRVSVC_NETRDFSFIXLOCALVOLUME: {
4663 struct srvsvc_NETRDFSFIXLOCALVOLUME *r = (struct srvsvc_NETRDFSFIXLOCALVOLUME *)_r;
4664 r->out.result = _srvsvc_NETRDFSFIXLOCALVOLUME(cli->pipes_struct, r);
4665 return NT_STATUS_OK;
4668 case NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO: {
4669 struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r = (struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *)_r;
4670 r->out.result = _srvsvc_NETRDFSMANAGERREPORTSITEINFO(cli->pipes_struct, r);
4671 return NT_STATUS_OK;
4674 case NDR_SRVSVC_NETRSERVERTRANSPORTDELEX: {
4675 struct srvsvc_NETRSERVERTRANSPORTDELEX *r = (struct srvsvc_NETRSERVERTRANSPORTDELEX *)_r;
4676 r->out.result = _srvsvc_NETRSERVERTRANSPORTDELEX(cli->pipes_struct, r);
4677 return NT_STATUS_OK;
4680 default:
4681 return NT_STATUS_NOT_IMPLEMENTED;
4685 NTSTATUS rpc_srvsvc_init(void)
4687 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "srvsvc", "srvsvc", &ndr_table_srvsvc, api_srvsvc_cmds, sizeof(api_srvsvc_cmds) / sizeof(struct api_struct));