2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_dfs.h"
9 static BOOL api_dfs_GetManagerVersion(pipes_struct *p)
11 struct ndr_pull *pull;
12 struct ndr_push *push;
15 struct dfs_GetManagerVersion r;
16 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetManagerVersion");
18 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
23 pull = ndr_pull_init_blob(&blob, mem_ctx);
29 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
30 status = ndr_pull_dfs_GetManagerVersion(pull, NDR_IN, &r);
31 if (NT_STATUS_IS_ERR(status)) {
37 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r);
40 r.out.exist_flag = talloc_zero(mem_ctx, uint32_t);
41 if (r.out.exist_flag == NULL) {
46 _dfs_GetManagerVersion(p, &r);
48 if (p->rng_fault_state) {
50 /* Return True here, srv_pipe_hnd.c will take care */
55 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r);
57 push = ndr_push_init_ctx(mem_ctx);
63 status = ndr_push_dfs_GetManagerVersion(push, NDR_OUT, &r);
64 if (NT_STATUS_IS_ERR(status)) {
69 blob = ndr_push_blob(push);
70 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
80 static BOOL api_dfs_Add(pipes_struct *p)
82 struct ndr_pull *pull;
83 struct ndr_push *push;
87 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add");
89 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
94 pull = ndr_pull_init_blob(&blob, mem_ctx);
100 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
101 status = ndr_pull_dfs_Add(pull, NDR_IN, &r);
102 if (NT_STATUS_IS_ERR(status)) {
103 talloc_free(mem_ctx);
107 if (DEBUGLEVEL >= 10)
108 NDR_PRINT_IN_DEBUG(dfs_Add, &r);
110 r.out.result = _dfs_Add(p, &r);
112 if (p->rng_fault_state) {
113 talloc_free(mem_ctx);
114 /* Return True here, srv_pipe_hnd.c will take care */
118 if (DEBUGLEVEL >= 10)
119 NDR_PRINT_OUT_DEBUG(dfs_Add, &r);
121 push = ndr_push_init_ctx(mem_ctx);
123 talloc_free(mem_ctx);
127 status = ndr_push_dfs_Add(push, NDR_OUT, &r);
128 if (NT_STATUS_IS_ERR(status)) {
129 talloc_free(mem_ctx);
133 blob = ndr_push_blob(push);
134 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
135 talloc_free(mem_ctx);
139 talloc_free(mem_ctx);
144 static BOOL api_dfs_Remove(pipes_struct *p)
146 struct ndr_pull *pull;
147 struct ndr_push *push;
151 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove");
153 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
154 talloc_free(mem_ctx);
158 pull = ndr_pull_init_blob(&blob, mem_ctx);
160 talloc_free(mem_ctx);
164 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
165 status = ndr_pull_dfs_Remove(pull, NDR_IN, &r);
166 if (NT_STATUS_IS_ERR(status)) {
167 talloc_free(mem_ctx);
171 if (DEBUGLEVEL >= 10)
172 NDR_PRINT_IN_DEBUG(dfs_Remove, &r);
174 r.out.result = _dfs_Remove(p, &r);
176 if (p->rng_fault_state) {
177 talloc_free(mem_ctx);
178 /* Return True here, srv_pipe_hnd.c will take care */
182 if (DEBUGLEVEL >= 10)
183 NDR_PRINT_OUT_DEBUG(dfs_Remove, &r);
185 push = ndr_push_init_ctx(mem_ctx);
187 talloc_free(mem_ctx);
191 status = ndr_push_dfs_Remove(push, NDR_OUT, &r);
192 if (NT_STATUS_IS_ERR(status)) {
193 talloc_free(mem_ctx);
197 blob = ndr_push_blob(push);
198 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
199 talloc_free(mem_ctx);
203 talloc_free(mem_ctx);
208 static BOOL api_dfs_SetInfo(pipes_struct *p)
210 struct ndr_pull *pull;
211 struct ndr_push *push;
214 struct dfs_SetInfo r;
215 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo");
217 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
218 talloc_free(mem_ctx);
222 pull = ndr_pull_init_blob(&blob, mem_ctx);
224 talloc_free(mem_ctx);
228 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
229 status = ndr_pull_dfs_SetInfo(pull, NDR_IN, &r);
230 if (NT_STATUS_IS_ERR(status)) {
231 talloc_free(mem_ctx);
235 if (DEBUGLEVEL >= 10)
236 NDR_PRINT_IN_DEBUG(dfs_SetInfo, &r);
238 r.out.result = _dfs_SetInfo(p, &r);
240 if (p->rng_fault_state) {
241 talloc_free(mem_ctx);
242 /* Return True here, srv_pipe_hnd.c will take care */
246 if (DEBUGLEVEL >= 10)
247 NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r);
249 push = ndr_push_init_ctx(mem_ctx);
251 talloc_free(mem_ctx);
255 status = ndr_push_dfs_SetInfo(push, NDR_OUT, &r);
256 if (NT_STATUS_IS_ERR(status)) {
257 talloc_free(mem_ctx);
261 blob = ndr_push_blob(push);
262 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
263 talloc_free(mem_ctx);
267 talloc_free(mem_ctx);
272 static BOOL api_dfs_GetInfo(pipes_struct *p)
274 struct ndr_pull *pull;
275 struct ndr_push *push;
278 struct dfs_GetInfo r;
279 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetInfo");
281 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
282 talloc_free(mem_ctx);
286 pull = ndr_pull_init_blob(&blob, mem_ctx);
288 talloc_free(mem_ctx);
292 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
293 status = ndr_pull_dfs_GetInfo(pull, NDR_IN, &r);
294 if (NT_STATUS_IS_ERR(status)) {
295 talloc_free(mem_ctx);
299 if (DEBUGLEVEL >= 10)
300 NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r);
303 r.out.info = talloc_zero(mem_ctx, union dfs_Info);
304 if (r.out.info == NULL) {
305 talloc_free(mem_ctx);
309 r.out.result = _dfs_GetInfo(p, &r);
311 if (p->rng_fault_state) {
312 talloc_free(mem_ctx);
313 /* Return True here, srv_pipe_hnd.c will take care */
317 if (DEBUGLEVEL >= 10)
318 NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r);
320 push = ndr_push_init_ctx(mem_ctx);
322 talloc_free(mem_ctx);
326 status = ndr_push_dfs_GetInfo(push, NDR_OUT, &r);
327 if (NT_STATUS_IS_ERR(status)) {
328 talloc_free(mem_ctx);
332 blob = ndr_push_blob(push);
333 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
334 talloc_free(mem_ctx);
338 talloc_free(mem_ctx);
343 static BOOL api_dfs_Enum(pipes_struct *p)
345 struct ndr_pull *pull;
346 struct ndr_push *push;
350 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Enum");
352 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
353 talloc_free(mem_ctx);
357 pull = ndr_pull_init_blob(&blob, mem_ctx);
359 talloc_free(mem_ctx);
363 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
364 status = ndr_pull_dfs_Enum(pull, NDR_IN, &r);
365 if (NT_STATUS_IS_ERR(status)) {
366 talloc_free(mem_ctx);
370 if (DEBUGLEVEL >= 10)
371 NDR_PRINT_IN_DEBUG(dfs_Enum, &r);
374 r.out.info = r.in.info;
375 r.out.total = r.in.total;
376 r.out.result = _dfs_Enum(p, &r);
378 if (p->rng_fault_state) {
379 talloc_free(mem_ctx);
380 /* Return True here, srv_pipe_hnd.c will take care */
384 if (DEBUGLEVEL >= 10)
385 NDR_PRINT_OUT_DEBUG(dfs_Enum, &r);
387 push = ndr_push_init_ctx(mem_ctx);
389 talloc_free(mem_ctx);
393 status = ndr_push_dfs_Enum(push, NDR_OUT, &r);
394 if (NT_STATUS_IS_ERR(status)) {
395 talloc_free(mem_ctx);
399 blob = ndr_push_blob(push);
400 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
401 talloc_free(mem_ctx);
405 talloc_free(mem_ctx);
410 static BOOL api_dfs_Rename(pipes_struct *p)
412 struct ndr_pull *pull;
413 struct ndr_push *push;
417 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Rename");
419 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
420 talloc_free(mem_ctx);
424 pull = ndr_pull_init_blob(&blob, mem_ctx);
426 talloc_free(mem_ctx);
430 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
431 status = ndr_pull_dfs_Rename(pull, NDR_IN, &r);
432 if (NT_STATUS_IS_ERR(status)) {
433 talloc_free(mem_ctx);
437 if (DEBUGLEVEL >= 10)
438 NDR_PRINT_IN_DEBUG(dfs_Rename, &r);
440 r.out.result = _dfs_Rename(p, &r);
442 if (p->rng_fault_state) {
443 talloc_free(mem_ctx);
444 /* Return True here, srv_pipe_hnd.c will take care */
448 if (DEBUGLEVEL >= 10)
449 NDR_PRINT_OUT_DEBUG(dfs_Rename, &r);
451 push = ndr_push_init_ctx(mem_ctx);
453 talloc_free(mem_ctx);
457 status = ndr_push_dfs_Rename(push, NDR_OUT, &r);
458 if (NT_STATUS_IS_ERR(status)) {
459 talloc_free(mem_ctx);
463 blob = ndr_push_blob(push);
464 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
465 talloc_free(mem_ctx);
469 talloc_free(mem_ctx);
474 static BOOL api_dfs_Move(pipes_struct *p)
476 struct ndr_pull *pull;
477 struct ndr_push *push;
481 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Move");
483 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
484 talloc_free(mem_ctx);
488 pull = ndr_pull_init_blob(&blob, mem_ctx);
490 talloc_free(mem_ctx);
494 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
495 status = ndr_pull_dfs_Move(pull, NDR_IN, &r);
496 if (NT_STATUS_IS_ERR(status)) {
497 talloc_free(mem_ctx);
501 if (DEBUGLEVEL >= 10)
502 NDR_PRINT_IN_DEBUG(dfs_Move, &r);
504 r.out.result = _dfs_Move(p, &r);
506 if (p->rng_fault_state) {
507 talloc_free(mem_ctx);
508 /* Return True here, srv_pipe_hnd.c will take care */
512 if (DEBUGLEVEL >= 10)
513 NDR_PRINT_OUT_DEBUG(dfs_Move, &r);
515 push = ndr_push_init_ctx(mem_ctx);
517 talloc_free(mem_ctx);
521 status = ndr_push_dfs_Move(push, NDR_OUT, &r);
522 if (NT_STATUS_IS_ERR(status)) {
523 talloc_free(mem_ctx);
527 blob = ndr_push_blob(push);
528 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
529 talloc_free(mem_ctx);
533 talloc_free(mem_ctx);
538 static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p)
540 struct ndr_pull *pull;
541 struct ndr_push *push;
544 struct dfs_ManagerGetConfigInfo r;
545 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerGetConfigInfo");
547 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
548 talloc_free(mem_ctx);
552 pull = ndr_pull_init_blob(&blob, mem_ctx);
554 talloc_free(mem_ctx);
558 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
559 status = ndr_pull_dfs_ManagerGetConfigInfo(pull, NDR_IN, &r);
560 if (NT_STATUS_IS_ERR(status)) {
561 talloc_free(mem_ctx);
565 if (DEBUGLEVEL >= 10)
566 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &r);
568 r.out.result = _dfs_ManagerGetConfigInfo(p, &r);
570 if (p->rng_fault_state) {
571 talloc_free(mem_ctx);
572 /* Return True here, srv_pipe_hnd.c will take care */
576 if (DEBUGLEVEL >= 10)
577 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r);
579 push = ndr_push_init_ctx(mem_ctx);
581 talloc_free(mem_ctx);
585 status = ndr_push_dfs_ManagerGetConfigInfo(push, NDR_OUT, &r);
586 if (NT_STATUS_IS_ERR(status)) {
587 talloc_free(mem_ctx);
591 blob = ndr_push_blob(push);
592 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
593 talloc_free(mem_ctx);
597 talloc_free(mem_ctx);
602 static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p)
604 struct ndr_pull *pull;
605 struct ndr_push *push;
608 struct dfs_ManagerSendSiteInfo r;
609 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerSendSiteInfo");
611 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
612 talloc_free(mem_ctx);
616 pull = ndr_pull_init_blob(&blob, mem_ctx);
618 talloc_free(mem_ctx);
622 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
623 status = ndr_pull_dfs_ManagerSendSiteInfo(pull, NDR_IN, &r);
624 if (NT_STATUS_IS_ERR(status)) {
625 talloc_free(mem_ctx);
629 if (DEBUGLEVEL >= 10)
630 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &r);
632 r.out.result = _dfs_ManagerSendSiteInfo(p, &r);
634 if (p->rng_fault_state) {
635 talloc_free(mem_ctx);
636 /* Return True here, srv_pipe_hnd.c will take care */
640 if (DEBUGLEVEL >= 10)
641 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r);
643 push = ndr_push_init_ctx(mem_ctx);
645 talloc_free(mem_ctx);
649 status = ndr_push_dfs_ManagerSendSiteInfo(push, NDR_OUT, &r);
650 if (NT_STATUS_IS_ERR(status)) {
651 talloc_free(mem_ctx);
655 blob = ndr_push_blob(push);
656 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
657 talloc_free(mem_ctx);
661 talloc_free(mem_ctx);
666 static BOOL api_dfs_AddFtRoot(pipes_struct *p)
668 struct ndr_pull *pull;
669 struct ndr_push *push;
672 struct dfs_AddFtRoot r;
673 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddFtRoot");
675 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
676 talloc_free(mem_ctx);
680 pull = ndr_pull_init_blob(&blob, mem_ctx);
682 talloc_free(mem_ctx);
686 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
687 status = ndr_pull_dfs_AddFtRoot(pull, NDR_IN, &r);
688 if (NT_STATUS_IS_ERR(status)) {
689 talloc_free(mem_ctx);
693 if (DEBUGLEVEL >= 10)
694 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r);
696 r.out.result = _dfs_AddFtRoot(p, &r);
698 if (p->rng_fault_state) {
699 talloc_free(mem_ctx);
700 /* Return True here, srv_pipe_hnd.c will take care */
704 if (DEBUGLEVEL >= 10)
705 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r);
707 push = ndr_push_init_ctx(mem_ctx);
709 talloc_free(mem_ctx);
713 status = ndr_push_dfs_AddFtRoot(push, NDR_OUT, &r);
714 if (NT_STATUS_IS_ERR(status)) {
715 talloc_free(mem_ctx);
719 blob = ndr_push_blob(push);
720 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
721 talloc_free(mem_ctx);
725 talloc_free(mem_ctx);
730 static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
732 struct ndr_pull *pull;
733 struct ndr_push *push;
736 struct dfs_RemoveFtRoot r;
737 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveFtRoot");
739 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
740 talloc_free(mem_ctx);
744 pull = ndr_pull_init_blob(&blob, mem_ctx);
746 talloc_free(mem_ctx);
750 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
751 status = ndr_pull_dfs_RemoveFtRoot(pull, NDR_IN, &r);
752 if (NT_STATUS_IS_ERR(status)) {
753 talloc_free(mem_ctx);
757 if (DEBUGLEVEL >= 10)
758 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r);
760 r.out.result = _dfs_RemoveFtRoot(p, &r);
762 if (p->rng_fault_state) {
763 talloc_free(mem_ctx);
764 /* Return True here, srv_pipe_hnd.c will take care */
768 if (DEBUGLEVEL >= 10)
769 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r);
771 push = ndr_push_init_ctx(mem_ctx);
773 talloc_free(mem_ctx);
777 status = ndr_push_dfs_RemoveFtRoot(push, NDR_OUT, &r);
778 if (NT_STATUS_IS_ERR(status)) {
779 talloc_free(mem_ctx);
783 blob = ndr_push_blob(push);
784 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
785 talloc_free(mem_ctx);
789 talloc_free(mem_ctx);
794 static BOOL api_dfs_AddStdRoot(pipes_struct *p)
796 struct ndr_pull *pull;
797 struct ndr_push *push;
800 struct dfs_AddStdRoot r;
801 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRoot");
803 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
804 talloc_free(mem_ctx);
808 pull = ndr_pull_init_blob(&blob, mem_ctx);
810 talloc_free(mem_ctx);
814 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
815 status = ndr_pull_dfs_AddStdRoot(pull, NDR_IN, &r);
816 if (NT_STATUS_IS_ERR(status)) {
817 talloc_free(mem_ctx);
821 if (DEBUGLEVEL >= 10)
822 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r);
824 r.out.result = _dfs_AddStdRoot(p, &r);
826 if (p->rng_fault_state) {
827 talloc_free(mem_ctx);
828 /* Return True here, srv_pipe_hnd.c will take care */
832 if (DEBUGLEVEL >= 10)
833 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r);
835 push = ndr_push_init_ctx(mem_ctx);
837 talloc_free(mem_ctx);
841 status = ndr_push_dfs_AddStdRoot(push, NDR_OUT, &r);
842 if (NT_STATUS_IS_ERR(status)) {
843 talloc_free(mem_ctx);
847 blob = ndr_push_blob(push);
848 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
849 talloc_free(mem_ctx);
853 talloc_free(mem_ctx);
858 static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
860 struct ndr_pull *pull;
861 struct ndr_push *push;
864 struct dfs_RemoveStdRoot r;
865 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveStdRoot");
867 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
868 talloc_free(mem_ctx);
872 pull = ndr_pull_init_blob(&blob, mem_ctx);
874 talloc_free(mem_ctx);
878 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
879 status = ndr_pull_dfs_RemoveStdRoot(pull, NDR_IN, &r);
880 if (NT_STATUS_IS_ERR(status)) {
881 talloc_free(mem_ctx);
885 if (DEBUGLEVEL >= 10)
886 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r);
888 r.out.result = _dfs_RemoveStdRoot(p, &r);
890 if (p->rng_fault_state) {
891 talloc_free(mem_ctx);
892 /* Return True here, srv_pipe_hnd.c will take care */
896 if (DEBUGLEVEL >= 10)
897 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r);
899 push = ndr_push_init_ctx(mem_ctx);
901 talloc_free(mem_ctx);
905 status = ndr_push_dfs_RemoveStdRoot(push, NDR_OUT, &r);
906 if (NT_STATUS_IS_ERR(status)) {
907 talloc_free(mem_ctx);
911 blob = ndr_push_blob(push);
912 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
913 talloc_free(mem_ctx);
917 talloc_free(mem_ctx);
922 static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
924 struct ndr_pull *pull;
925 struct ndr_push *push;
928 struct dfs_ManagerInitialize r;
929 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerInitialize");
931 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
932 talloc_free(mem_ctx);
936 pull = ndr_pull_init_blob(&blob, mem_ctx);
938 talloc_free(mem_ctx);
942 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
943 status = ndr_pull_dfs_ManagerInitialize(pull, NDR_IN, &r);
944 if (NT_STATUS_IS_ERR(status)) {
945 talloc_free(mem_ctx);
949 if (DEBUGLEVEL >= 10)
950 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r);
952 r.out.result = _dfs_ManagerInitialize(p, &r);
954 if (p->rng_fault_state) {
955 talloc_free(mem_ctx);
956 /* Return True here, srv_pipe_hnd.c will take care */
960 if (DEBUGLEVEL >= 10)
961 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r);
963 push = ndr_push_init_ctx(mem_ctx);
965 talloc_free(mem_ctx);
969 status = ndr_push_dfs_ManagerInitialize(push, NDR_OUT, &r);
970 if (NT_STATUS_IS_ERR(status)) {
971 talloc_free(mem_ctx);
975 blob = ndr_push_blob(push);
976 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
977 talloc_free(mem_ctx);
981 talloc_free(mem_ctx);
986 static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
988 struct ndr_pull *pull;
989 struct ndr_push *push;
992 struct dfs_AddStdRootForced r;
993 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRootForced");
995 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
996 talloc_free(mem_ctx);
1000 pull = ndr_pull_init_blob(&blob, mem_ctx);
1002 talloc_free(mem_ctx);
1006 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1007 status = ndr_pull_dfs_AddStdRootForced(pull, NDR_IN, &r);
1008 if (NT_STATUS_IS_ERR(status)) {
1009 talloc_free(mem_ctx);
1013 if (DEBUGLEVEL >= 10)
1014 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r);
1016 r.out.result = _dfs_AddStdRootForced(p, &r);
1018 if (p->rng_fault_state) {
1019 talloc_free(mem_ctx);
1020 /* Return True here, srv_pipe_hnd.c will take care */
1024 if (DEBUGLEVEL >= 10)
1025 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r);
1027 push = ndr_push_init_ctx(mem_ctx);
1029 talloc_free(mem_ctx);
1033 status = ndr_push_dfs_AddStdRootForced(push, NDR_OUT, &r);
1034 if (NT_STATUS_IS_ERR(status)) {
1035 talloc_free(mem_ctx);
1039 blob = ndr_push_blob(push);
1040 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1041 talloc_free(mem_ctx);
1045 talloc_free(mem_ctx);
1050 static BOOL api_dfs_GetDcAddress(pipes_struct *p)
1052 struct ndr_pull *pull;
1053 struct ndr_push *push;
1056 struct dfs_GetDcAddress r;
1057 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetDcAddress");
1059 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1060 talloc_free(mem_ctx);
1064 pull = ndr_pull_init_blob(&blob, mem_ctx);
1066 talloc_free(mem_ctx);
1070 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1071 status = ndr_pull_dfs_GetDcAddress(pull, NDR_IN, &r);
1072 if (NT_STATUS_IS_ERR(status)) {
1073 talloc_free(mem_ctx);
1077 if (DEBUGLEVEL >= 10)
1078 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r);
1080 r.out.result = _dfs_GetDcAddress(p, &r);
1082 if (p->rng_fault_state) {
1083 talloc_free(mem_ctx);
1084 /* Return True here, srv_pipe_hnd.c will take care */
1088 if (DEBUGLEVEL >= 10)
1089 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r);
1091 push = ndr_push_init_ctx(mem_ctx);
1093 talloc_free(mem_ctx);
1097 status = ndr_push_dfs_GetDcAddress(push, NDR_OUT, &r);
1098 if (NT_STATUS_IS_ERR(status)) {
1099 talloc_free(mem_ctx);
1103 blob = ndr_push_blob(push);
1104 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1105 talloc_free(mem_ctx);
1109 talloc_free(mem_ctx);
1114 static BOOL api_dfs_SetDcAddress(pipes_struct *p)
1116 struct ndr_pull *pull;
1117 struct ndr_push *push;
1120 struct dfs_SetDcAddress r;
1121 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetDcAddress");
1123 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1124 talloc_free(mem_ctx);
1128 pull = ndr_pull_init_blob(&blob, mem_ctx);
1130 talloc_free(mem_ctx);
1134 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1135 status = ndr_pull_dfs_SetDcAddress(pull, NDR_IN, &r);
1136 if (NT_STATUS_IS_ERR(status)) {
1137 talloc_free(mem_ctx);
1141 if (DEBUGLEVEL >= 10)
1142 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r);
1144 r.out.result = _dfs_SetDcAddress(p, &r);
1146 if (p->rng_fault_state) {
1147 talloc_free(mem_ctx);
1148 /* Return True here, srv_pipe_hnd.c will take care */
1152 if (DEBUGLEVEL >= 10)
1153 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r);
1155 push = ndr_push_init_ctx(mem_ctx);
1157 talloc_free(mem_ctx);
1161 status = ndr_push_dfs_SetDcAddress(push, NDR_OUT, &r);
1162 if (NT_STATUS_IS_ERR(status)) {
1163 talloc_free(mem_ctx);
1167 blob = ndr_push_blob(push);
1168 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1169 talloc_free(mem_ctx);
1173 talloc_free(mem_ctx);
1178 static BOOL api_dfs_FlushFtTable(pipes_struct *p)
1180 struct ndr_pull *pull;
1181 struct ndr_push *push;
1184 struct dfs_FlushFtTable r;
1185 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_FlushFtTable");
1187 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1188 talloc_free(mem_ctx);
1192 pull = ndr_pull_init_blob(&blob, mem_ctx);
1194 talloc_free(mem_ctx);
1198 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1199 status = ndr_pull_dfs_FlushFtTable(pull, NDR_IN, &r);
1200 if (NT_STATUS_IS_ERR(status)) {
1201 talloc_free(mem_ctx);
1205 if (DEBUGLEVEL >= 10)
1206 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r);
1208 r.out.result = _dfs_FlushFtTable(p, &r);
1210 if (p->rng_fault_state) {
1211 talloc_free(mem_ctx);
1212 /* Return True here, srv_pipe_hnd.c will take care */
1216 if (DEBUGLEVEL >= 10)
1217 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r);
1219 push = ndr_push_init_ctx(mem_ctx);
1221 talloc_free(mem_ctx);
1225 status = ndr_push_dfs_FlushFtTable(push, NDR_OUT, &r);
1226 if (NT_STATUS_IS_ERR(status)) {
1227 talloc_free(mem_ctx);
1231 blob = ndr_push_blob(push);
1232 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1233 talloc_free(mem_ctx);
1237 talloc_free(mem_ctx);
1242 static BOOL api_dfs_Add2(pipes_struct *p)
1244 struct ndr_pull *pull;
1245 struct ndr_push *push;
1249 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add2");
1251 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1252 talloc_free(mem_ctx);
1256 pull = ndr_pull_init_blob(&blob, mem_ctx);
1258 talloc_free(mem_ctx);
1262 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1263 status = ndr_pull_dfs_Add2(pull, NDR_IN, &r);
1264 if (NT_STATUS_IS_ERR(status)) {
1265 talloc_free(mem_ctx);
1269 if (DEBUGLEVEL >= 10)
1270 NDR_PRINT_IN_DEBUG(dfs_Add2, &r);
1272 r.out.result = _dfs_Add2(p, &r);
1274 if (p->rng_fault_state) {
1275 talloc_free(mem_ctx);
1276 /* Return True here, srv_pipe_hnd.c will take care */
1280 if (DEBUGLEVEL >= 10)
1281 NDR_PRINT_OUT_DEBUG(dfs_Add2, &r);
1283 push = ndr_push_init_ctx(mem_ctx);
1285 talloc_free(mem_ctx);
1289 status = ndr_push_dfs_Add2(push, NDR_OUT, &r);
1290 if (NT_STATUS_IS_ERR(status)) {
1291 talloc_free(mem_ctx);
1295 blob = ndr_push_blob(push);
1296 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1297 talloc_free(mem_ctx);
1301 talloc_free(mem_ctx);
1306 static BOOL api_dfs_Remove2(pipes_struct *p)
1308 struct ndr_pull *pull;
1309 struct ndr_push *push;
1312 struct dfs_Remove2 r;
1313 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove2");
1315 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1316 talloc_free(mem_ctx);
1320 pull = ndr_pull_init_blob(&blob, mem_ctx);
1322 talloc_free(mem_ctx);
1326 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1327 status = ndr_pull_dfs_Remove2(pull, NDR_IN, &r);
1328 if (NT_STATUS_IS_ERR(status)) {
1329 talloc_free(mem_ctx);
1333 if (DEBUGLEVEL >= 10)
1334 NDR_PRINT_IN_DEBUG(dfs_Remove2, &r);
1336 r.out.result = _dfs_Remove2(p, &r);
1338 if (p->rng_fault_state) {
1339 talloc_free(mem_ctx);
1340 /* Return True here, srv_pipe_hnd.c will take care */
1344 if (DEBUGLEVEL >= 10)
1345 NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r);
1347 push = ndr_push_init_ctx(mem_ctx);
1349 talloc_free(mem_ctx);
1353 status = ndr_push_dfs_Remove2(push, NDR_OUT, &r);
1354 if (NT_STATUS_IS_ERR(status)) {
1355 talloc_free(mem_ctx);
1359 blob = ndr_push_blob(push);
1360 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1361 talloc_free(mem_ctx);
1365 talloc_free(mem_ctx);
1370 static BOOL api_dfs_EnumEx(pipes_struct *p)
1372 struct ndr_pull *pull;
1373 struct ndr_push *push;
1376 struct dfs_EnumEx r;
1377 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_EnumEx");
1379 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1380 talloc_free(mem_ctx);
1384 pull = ndr_pull_init_blob(&blob, mem_ctx);
1386 talloc_free(mem_ctx);
1390 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1391 status = ndr_pull_dfs_EnumEx(pull, NDR_IN, &r);
1392 if (NT_STATUS_IS_ERR(status)) {
1393 talloc_free(mem_ctx);
1397 if (DEBUGLEVEL >= 10)
1398 NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r);
1401 r.out.info = r.in.info;
1402 r.out.total = r.in.total;
1403 r.out.result = _dfs_EnumEx(p, &r);
1405 if (p->rng_fault_state) {
1406 talloc_free(mem_ctx);
1407 /* Return True here, srv_pipe_hnd.c will take care */
1411 if (DEBUGLEVEL >= 10)
1412 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r);
1414 push = ndr_push_init_ctx(mem_ctx);
1416 talloc_free(mem_ctx);
1420 status = ndr_push_dfs_EnumEx(push, NDR_OUT, &r);
1421 if (NT_STATUS_IS_ERR(status)) {
1422 talloc_free(mem_ctx);
1426 blob = ndr_push_blob(push);
1427 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1428 talloc_free(mem_ctx);
1432 talloc_free(mem_ctx);
1437 static BOOL api_dfs_SetInfo2(pipes_struct *p)
1439 struct ndr_pull *pull;
1440 struct ndr_push *push;
1443 struct dfs_SetInfo2 r;
1444 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo2");
1446 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1447 talloc_free(mem_ctx);
1451 pull = ndr_pull_init_blob(&blob, mem_ctx);
1453 talloc_free(mem_ctx);
1457 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1458 status = ndr_pull_dfs_SetInfo2(pull, NDR_IN, &r);
1459 if (NT_STATUS_IS_ERR(status)) {
1460 talloc_free(mem_ctx);
1464 if (DEBUGLEVEL >= 10)
1465 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r);
1467 r.out.result = _dfs_SetInfo2(p, &r);
1469 if (p->rng_fault_state) {
1470 talloc_free(mem_ctx);
1471 /* Return True here, srv_pipe_hnd.c will take care */
1475 if (DEBUGLEVEL >= 10)
1476 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r);
1478 push = ndr_push_init_ctx(mem_ctx);
1480 talloc_free(mem_ctx);
1484 status = ndr_push_dfs_SetInfo2(push, NDR_OUT, &r);
1485 if (NT_STATUS_IS_ERR(status)) {
1486 talloc_free(mem_ctx);
1490 blob = ndr_push_blob(push);
1491 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1492 talloc_free(mem_ctx);
1496 talloc_free(mem_ctx);
1503 static struct api_struct api_netdfs_cmds[] =
1505 {"DFS_GETMANAGERVERSION", DCERPC_DFS_GETMANAGERVERSION, api_dfs_GetManagerVersion},
1506 {"DFS_ADD", DCERPC_DFS_ADD, api_dfs_Add},
1507 {"DFS_REMOVE", DCERPC_DFS_REMOVE, api_dfs_Remove},
1508 {"DFS_SETINFO", DCERPC_DFS_SETINFO, api_dfs_SetInfo},
1509 {"DFS_GETINFO", DCERPC_DFS_GETINFO, api_dfs_GetInfo},
1510 {"DFS_ENUM", DCERPC_DFS_ENUM, api_dfs_Enum},
1511 {"DFS_RENAME", DCERPC_DFS_RENAME, api_dfs_Rename},
1512 {"DFS_MOVE", DCERPC_DFS_MOVE, api_dfs_Move},
1513 {"DFS_MANAGERGETCONFIGINFO", DCERPC_DFS_MANAGERGETCONFIGINFO, api_dfs_ManagerGetConfigInfo},
1514 {"DFS_MANAGERSENDSITEINFO", DCERPC_DFS_MANAGERSENDSITEINFO, api_dfs_ManagerSendSiteInfo},
1515 {"DFS_ADDFTROOT", DCERPC_DFS_ADDFTROOT, api_dfs_AddFtRoot},
1516 {"DFS_REMOVEFTROOT", DCERPC_DFS_REMOVEFTROOT, api_dfs_RemoveFtRoot},
1517 {"DFS_ADDSTDROOT", DCERPC_DFS_ADDSTDROOT, api_dfs_AddStdRoot},
1518 {"DFS_REMOVESTDROOT", DCERPC_DFS_REMOVESTDROOT, api_dfs_RemoveStdRoot},
1519 {"DFS_MANAGERINITIALIZE", DCERPC_DFS_MANAGERINITIALIZE, api_dfs_ManagerInitialize},
1520 {"DFS_ADDSTDROOTFORCED", DCERPC_DFS_ADDSTDROOTFORCED, api_dfs_AddStdRootForced},
1521 {"DFS_GETDCADDRESS", DCERPC_DFS_GETDCADDRESS, api_dfs_GetDcAddress},
1522 {"DFS_SETDCADDRESS", DCERPC_DFS_SETDCADDRESS, api_dfs_SetDcAddress},
1523 {"DFS_FLUSHFTTABLE", DCERPC_DFS_FLUSHFTTABLE, api_dfs_FlushFtTable},
1524 {"DFS_ADD2", DCERPC_DFS_ADD2, api_dfs_Add2},
1525 {"DFS_REMOVE2", DCERPC_DFS_REMOVE2, api_dfs_Remove2},
1526 {"DFS_ENUMEX", DCERPC_DFS_ENUMEX, api_dfs_EnumEx},
1527 {"DFS_SETINFO2", DCERPC_DFS_SETINFO2, api_dfs_SetInfo2},
1530 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns)
1532 *fns = api_netdfs_cmds;
1533 *n_fns = sizeof(api_netdfs_cmds) / sizeof(struct api_struct);
1536 NTSTATUS rpc_netdfs_init(void)
1538 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct));