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.version = talloc_zero(mem_ctx, enum dfs_ManagerVersion);
41 if (r.out.version == 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);
697 r.out.unknown2 = r.in.unknown2;
698 r.out.result = _dfs_AddFtRoot(p, &r);
700 if (p->rng_fault_state) {
701 talloc_free(mem_ctx);
702 /* Return True here, srv_pipe_hnd.c will take care */
706 if (DEBUGLEVEL >= 10)
707 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r);
709 push = ndr_push_init_ctx(mem_ctx);
711 talloc_free(mem_ctx);
715 status = ndr_push_dfs_AddFtRoot(push, NDR_OUT, &r);
716 if (NT_STATUS_IS_ERR(status)) {
717 talloc_free(mem_ctx);
721 blob = ndr_push_blob(push);
722 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
723 talloc_free(mem_ctx);
727 talloc_free(mem_ctx);
732 static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
734 struct ndr_pull *pull;
735 struct ndr_push *push;
738 struct dfs_RemoveFtRoot r;
739 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveFtRoot");
741 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
742 talloc_free(mem_ctx);
746 pull = ndr_pull_init_blob(&blob, mem_ctx);
748 talloc_free(mem_ctx);
752 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
753 status = ndr_pull_dfs_RemoveFtRoot(pull, NDR_IN, &r);
754 if (NT_STATUS_IS_ERR(status)) {
755 talloc_free(mem_ctx);
759 if (DEBUGLEVEL >= 10)
760 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r);
763 r.out.unknown = r.in.unknown;
764 r.out.result = _dfs_RemoveFtRoot(p, &r);
766 if (p->rng_fault_state) {
767 talloc_free(mem_ctx);
768 /* Return True here, srv_pipe_hnd.c will take care */
772 if (DEBUGLEVEL >= 10)
773 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r);
775 push = ndr_push_init_ctx(mem_ctx);
777 talloc_free(mem_ctx);
781 status = ndr_push_dfs_RemoveFtRoot(push, NDR_OUT, &r);
782 if (NT_STATUS_IS_ERR(status)) {
783 talloc_free(mem_ctx);
787 blob = ndr_push_blob(push);
788 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
789 talloc_free(mem_ctx);
793 talloc_free(mem_ctx);
798 static BOOL api_dfs_AddStdRoot(pipes_struct *p)
800 struct ndr_pull *pull;
801 struct ndr_push *push;
804 struct dfs_AddStdRoot r;
805 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRoot");
807 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
808 talloc_free(mem_ctx);
812 pull = ndr_pull_init_blob(&blob, mem_ctx);
814 talloc_free(mem_ctx);
818 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
819 status = ndr_pull_dfs_AddStdRoot(pull, NDR_IN, &r);
820 if (NT_STATUS_IS_ERR(status)) {
821 talloc_free(mem_ctx);
825 if (DEBUGLEVEL >= 10)
826 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r);
828 r.out.result = _dfs_AddStdRoot(p, &r);
830 if (p->rng_fault_state) {
831 talloc_free(mem_ctx);
832 /* Return True here, srv_pipe_hnd.c will take care */
836 if (DEBUGLEVEL >= 10)
837 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r);
839 push = ndr_push_init_ctx(mem_ctx);
841 talloc_free(mem_ctx);
845 status = ndr_push_dfs_AddStdRoot(push, NDR_OUT, &r);
846 if (NT_STATUS_IS_ERR(status)) {
847 talloc_free(mem_ctx);
851 blob = ndr_push_blob(push);
852 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
853 talloc_free(mem_ctx);
857 talloc_free(mem_ctx);
862 static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
864 struct ndr_pull *pull;
865 struct ndr_push *push;
868 struct dfs_RemoveStdRoot r;
869 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveStdRoot");
871 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
872 talloc_free(mem_ctx);
876 pull = ndr_pull_init_blob(&blob, mem_ctx);
878 talloc_free(mem_ctx);
882 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
883 status = ndr_pull_dfs_RemoveStdRoot(pull, NDR_IN, &r);
884 if (NT_STATUS_IS_ERR(status)) {
885 talloc_free(mem_ctx);
889 if (DEBUGLEVEL >= 10)
890 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r);
892 r.out.result = _dfs_RemoveStdRoot(p, &r);
894 if (p->rng_fault_state) {
895 talloc_free(mem_ctx);
896 /* Return True here, srv_pipe_hnd.c will take care */
900 if (DEBUGLEVEL >= 10)
901 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r);
903 push = ndr_push_init_ctx(mem_ctx);
905 talloc_free(mem_ctx);
909 status = ndr_push_dfs_RemoveStdRoot(push, NDR_OUT, &r);
910 if (NT_STATUS_IS_ERR(status)) {
911 talloc_free(mem_ctx);
915 blob = ndr_push_blob(push);
916 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
917 talloc_free(mem_ctx);
921 talloc_free(mem_ctx);
926 static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
928 struct ndr_pull *pull;
929 struct ndr_push *push;
932 struct dfs_ManagerInitialize r;
933 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerInitialize");
935 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
936 talloc_free(mem_ctx);
940 pull = ndr_pull_init_blob(&blob, mem_ctx);
942 talloc_free(mem_ctx);
946 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
947 status = ndr_pull_dfs_ManagerInitialize(pull, NDR_IN, &r);
948 if (NT_STATUS_IS_ERR(status)) {
949 talloc_free(mem_ctx);
953 if (DEBUGLEVEL >= 10)
954 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r);
956 r.out.result = _dfs_ManagerInitialize(p, &r);
958 if (p->rng_fault_state) {
959 talloc_free(mem_ctx);
960 /* Return True here, srv_pipe_hnd.c will take care */
964 if (DEBUGLEVEL >= 10)
965 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r);
967 push = ndr_push_init_ctx(mem_ctx);
969 talloc_free(mem_ctx);
973 status = ndr_push_dfs_ManagerInitialize(push, NDR_OUT, &r);
974 if (NT_STATUS_IS_ERR(status)) {
975 talloc_free(mem_ctx);
979 blob = ndr_push_blob(push);
980 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
981 talloc_free(mem_ctx);
985 talloc_free(mem_ctx);
990 static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
992 struct ndr_pull *pull;
993 struct ndr_push *push;
996 struct dfs_AddStdRootForced r;
997 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRootForced");
999 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1000 talloc_free(mem_ctx);
1004 pull = ndr_pull_init_blob(&blob, mem_ctx);
1006 talloc_free(mem_ctx);
1010 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1011 status = ndr_pull_dfs_AddStdRootForced(pull, NDR_IN, &r);
1012 if (NT_STATUS_IS_ERR(status)) {
1013 talloc_free(mem_ctx);
1017 if (DEBUGLEVEL >= 10)
1018 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r);
1020 r.out.result = _dfs_AddStdRootForced(p, &r);
1022 if (p->rng_fault_state) {
1023 talloc_free(mem_ctx);
1024 /* Return True here, srv_pipe_hnd.c will take care */
1028 if (DEBUGLEVEL >= 10)
1029 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r);
1031 push = ndr_push_init_ctx(mem_ctx);
1033 talloc_free(mem_ctx);
1037 status = ndr_push_dfs_AddStdRootForced(push, NDR_OUT, &r);
1038 if (NT_STATUS_IS_ERR(status)) {
1039 talloc_free(mem_ctx);
1043 blob = ndr_push_blob(push);
1044 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1045 talloc_free(mem_ctx);
1049 talloc_free(mem_ctx);
1054 static BOOL api_dfs_GetDcAddress(pipes_struct *p)
1056 struct ndr_pull *pull;
1057 struct ndr_push *push;
1060 struct dfs_GetDcAddress r;
1061 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetDcAddress");
1063 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1064 talloc_free(mem_ctx);
1068 pull = ndr_pull_init_blob(&blob, mem_ctx);
1070 talloc_free(mem_ctx);
1074 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1075 status = ndr_pull_dfs_GetDcAddress(pull, NDR_IN, &r);
1076 if (NT_STATUS_IS_ERR(status)) {
1077 talloc_free(mem_ctx);
1081 if (DEBUGLEVEL >= 10)
1082 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r);
1084 r.out.result = _dfs_GetDcAddress(p, &r);
1086 if (p->rng_fault_state) {
1087 talloc_free(mem_ctx);
1088 /* Return True here, srv_pipe_hnd.c will take care */
1092 if (DEBUGLEVEL >= 10)
1093 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r);
1095 push = ndr_push_init_ctx(mem_ctx);
1097 talloc_free(mem_ctx);
1101 status = ndr_push_dfs_GetDcAddress(push, NDR_OUT, &r);
1102 if (NT_STATUS_IS_ERR(status)) {
1103 talloc_free(mem_ctx);
1107 blob = ndr_push_blob(push);
1108 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1109 talloc_free(mem_ctx);
1113 talloc_free(mem_ctx);
1118 static BOOL api_dfs_SetDcAddress(pipes_struct *p)
1120 struct ndr_pull *pull;
1121 struct ndr_push *push;
1124 struct dfs_SetDcAddress r;
1125 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetDcAddress");
1127 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1128 talloc_free(mem_ctx);
1132 pull = ndr_pull_init_blob(&blob, mem_ctx);
1134 talloc_free(mem_ctx);
1138 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1139 status = ndr_pull_dfs_SetDcAddress(pull, NDR_IN, &r);
1140 if (NT_STATUS_IS_ERR(status)) {
1141 talloc_free(mem_ctx);
1145 if (DEBUGLEVEL >= 10)
1146 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r);
1148 r.out.result = _dfs_SetDcAddress(p, &r);
1150 if (p->rng_fault_state) {
1151 talloc_free(mem_ctx);
1152 /* Return True here, srv_pipe_hnd.c will take care */
1156 if (DEBUGLEVEL >= 10)
1157 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r);
1159 push = ndr_push_init_ctx(mem_ctx);
1161 talloc_free(mem_ctx);
1165 status = ndr_push_dfs_SetDcAddress(push, NDR_OUT, &r);
1166 if (NT_STATUS_IS_ERR(status)) {
1167 talloc_free(mem_ctx);
1171 blob = ndr_push_blob(push);
1172 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1173 talloc_free(mem_ctx);
1177 talloc_free(mem_ctx);
1182 static BOOL api_dfs_FlushFtTable(pipes_struct *p)
1184 struct ndr_pull *pull;
1185 struct ndr_push *push;
1188 struct dfs_FlushFtTable r;
1189 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_FlushFtTable");
1191 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1192 talloc_free(mem_ctx);
1196 pull = ndr_pull_init_blob(&blob, mem_ctx);
1198 talloc_free(mem_ctx);
1202 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1203 status = ndr_pull_dfs_FlushFtTable(pull, NDR_IN, &r);
1204 if (NT_STATUS_IS_ERR(status)) {
1205 talloc_free(mem_ctx);
1209 if (DEBUGLEVEL >= 10)
1210 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r);
1212 r.out.result = _dfs_FlushFtTable(p, &r);
1214 if (p->rng_fault_state) {
1215 talloc_free(mem_ctx);
1216 /* Return True here, srv_pipe_hnd.c will take care */
1220 if (DEBUGLEVEL >= 10)
1221 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r);
1223 push = ndr_push_init_ctx(mem_ctx);
1225 talloc_free(mem_ctx);
1229 status = ndr_push_dfs_FlushFtTable(push, NDR_OUT, &r);
1230 if (NT_STATUS_IS_ERR(status)) {
1231 talloc_free(mem_ctx);
1235 blob = ndr_push_blob(push);
1236 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1237 talloc_free(mem_ctx);
1241 talloc_free(mem_ctx);
1246 static BOOL api_dfs_Add2(pipes_struct *p)
1248 struct ndr_pull *pull;
1249 struct ndr_push *push;
1253 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add2");
1255 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1256 talloc_free(mem_ctx);
1260 pull = ndr_pull_init_blob(&blob, mem_ctx);
1262 talloc_free(mem_ctx);
1266 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1267 status = ndr_pull_dfs_Add2(pull, NDR_IN, &r);
1268 if (NT_STATUS_IS_ERR(status)) {
1269 talloc_free(mem_ctx);
1273 if (DEBUGLEVEL >= 10)
1274 NDR_PRINT_IN_DEBUG(dfs_Add2, &r);
1276 r.out.result = _dfs_Add2(p, &r);
1278 if (p->rng_fault_state) {
1279 talloc_free(mem_ctx);
1280 /* Return True here, srv_pipe_hnd.c will take care */
1284 if (DEBUGLEVEL >= 10)
1285 NDR_PRINT_OUT_DEBUG(dfs_Add2, &r);
1287 push = ndr_push_init_ctx(mem_ctx);
1289 talloc_free(mem_ctx);
1293 status = ndr_push_dfs_Add2(push, NDR_OUT, &r);
1294 if (NT_STATUS_IS_ERR(status)) {
1295 talloc_free(mem_ctx);
1299 blob = ndr_push_blob(push);
1300 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1301 talloc_free(mem_ctx);
1305 talloc_free(mem_ctx);
1310 static BOOL api_dfs_Remove2(pipes_struct *p)
1312 struct ndr_pull *pull;
1313 struct ndr_push *push;
1316 struct dfs_Remove2 r;
1317 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove2");
1319 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1320 talloc_free(mem_ctx);
1324 pull = ndr_pull_init_blob(&blob, mem_ctx);
1326 talloc_free(mem_ctx);
1330 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1331 status = ndr_pull_dfs_Remove2(pull, NDR_IN, &r);
1332 if (NT_STATUS_IS_ERR(status)) {
1333 talloc_free(mem_ctx);
1337 if (DEBUGLEVEL >= 10)
1338 NDR_PRINT_IN_DEBUG(dfs_Remove2, &r);
1340 r.out.result = _dfs_Remove2(p, &r);
1342 if (p->rng_fault_state) {
1343 talloc_free(mem_ctx);
1344 /* Return True here, srv_pipe_hnd.c will take care */
1348 if (DEBUGLEVEL >= 10)
1349 NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r);
1351 push = ndr_push_init_ctx(mem_ctx);
1353 talloc_free(mem_ctx);
1357 status = ndr_push_dfs_Remove2(push, NDR_OUT, &r);
1358 if (NT_STATUS_IS_ERR(status)) {
1359 talloc_free(mem_ctx);
1363 blob = ndr_push_blob(push);
1364 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1365 talloc_free(mem_ctx);
1369 talloc_free(mem_ctx);
1374 static BOOL api_dfs_EnumEx(pipes_struct *p)
1376 struct ndr_pull *pull;
1377 struct ndr_push *push;
1380 struct dfs_EnumEx r;
1381 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_EnumEx");
1383 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1384 talloc_free(mem_ctx);
1388 pull = ndr_pull_init_blob(&blob, mem_ctx);
1390 talloc_free(mem_ctx);
1394 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1395 status = ndr_pull_dfs_EnumEx(pull, NDR_IN, &r);
1396 if (NT_STATUS_IS_ERR(status)) {
1397 talloc_free(mem_ctx);
1401 if (DEBUGLEVEL >= 10)
1402 NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r);
1405 r.out.info = r.in.info;
1406 r.out.total = r.in.total;
1407 r.out.result = _dfs_EnumEx(p, &r);
1409 if (p->rng_fault_state) {
1410 talloc_free(mem_ctx);
1411 /* Return True here, srv_pipe_hnd.c will take care */
1415 if (DEBUGLEVEL >= 10)
1416 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r);
1418 push = ndr_push_init_ctx(mem_ctx);
1420 talloc_free(mem_ctx);
1424 status = ndr_push_dfs_EnumEx(push, NDR_OUT, &r);
1425 if (NT_STATUS_IS_ERR(status)) {
1426 talloc_free(mem_ctx);
1430 blob = ndr_push_blob(push);
1431 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1432 talloc_free(mem_ctx);
1436 talloc_free(mem_ctx);
1441 static BOOL api_dfs_SetInfo2(pipes_struct *p)
1443 struct ndr_pull *pull;
1444 struct ndr_push *push;
1447 struct dfs_SetInfo2 r;
1448 TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo2");
1450 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1451 talloc_free(mem_ctx);
1455 pull = ndr_pull_init_blob(&blob, mem_ctx);
1457 talloc_free(mem_ctx);
1461 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1462 status = ndr_pull_dfs_SetInfo2(pull, NDR_IN, &r);
1463 if (NT_STATUS_IS_ERR(status)) {
1464 talloc_free(mem_ctx);
1468 if (DEBUGLEVEL >= 10)
1469 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r);
1471 r.out.result = _dfs_SetInfo2(p, &r);
1473 if (p->rng_fault_state) {
1474 talloc_free(mem_ctx);
1475 /* Return True here, srv_pipe_hnd.c will take care */
1479 if (DEBUGLEVEL >= 10)
1480 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r);
1482 push = ndr_push_init_ctx(mem_ctx);
1484 talloc_free(mem_ctx);
1488 status = ndr_push_dfs_SetInfo2(push, NDR_OUT, &r);
1489 if (NT_STATUS_IS_ERR(status)) {
1490 talloc_free(mem_ctx);
1494 blob = ndr_push_blob(push);
1495 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1496 talloc_free(mem_ctx);
1500 talloc_free(mem_ctx);
1507 static struct api_struct api_netdfs_cmds[] =
1509 {"DFS_GETMANAGERVERSION", NDR_DFS_GETMANAGERVERSION, api_dfs_GetManagerVersion},
1510 {"DFS_ADD", NDR_DFS_ADD, api_dfs_Add},
1511 {"DFS_REMOVE", NDR_DFS_REMOVE, api_dfs_Remove},
1512 {"DFS_SETINFO", NDR_DFS_SETINFO, api_dfs_SetInfo},
1513 {"DFS_GETINFO", NDR_DFS_GETINFO, api_dfs_GetInfo},
1514 {"DFS_ENUM", NDR_DFS_ENUM, api_dfs_Enum},
1515 {"DFS_RENAME", NDR_DFS_RENAME, api_dfs_Rename},
1516 {"DFS_MOVE", NDR_DFS_MOVE, api_dfs_Move},
1517 {"DFS_MANAGERGETCONFIGINFO", NDR_DFS_MANAGERGETCONFIGINFO, api_dfs_ManagerGetConfigInfo},
1518 {"DFS_MANAGERSENDSITEINFO", NDR_DFS_MANAGERSENDSITEINFO, api_dfs_ManagerSendSiteInfo},
1519 {"DFS_ADDFTROOT", NDR_DFS_ADDFTROOT, api_dfs_AddFtRoot},
1520 {"DFS_REMOVEFTROOT", NDR_DFS_REMOVEFTROOT, api_dfs_RemoveFtRoot},
1521 {"DFS_ADDSTDROOT", NDR_DFS_ADDSTDROOT, api_dfs_AddStdRoot},
1522 {"DFS_REMOVESTDROOT", NDR_DFS_REMOVESTDROOT, api_dfs_RemoveStdRoot},
1523 {"DFS_MANAGERINITIALIZE", NDR_DFS_MANAGERINITIALIZE, api_dfs_ManagerInitialize},
1524 {"DFS_ADDSTDROOTFORCED", NDR_DFS_ADDSTDROOTFORCED, api_dfs_AddStdRootForced},
1525 {"DFS_GETDCADDRESS", NDR_DFS_GETDCADDRESS, api_dfs_GetDcAddress},
1526 {"DFS_SETDCADDRESS", NDR_DFS_SETDCADDRESS, api_dfs_SetDcAddress},
1527 {"DFS_FLUSHFTTABLE", NDR_DFS_FLUSHFTTABLE, api_dfs_FlushFtTable},
1528 {"DFS_ADD2", NDR_DFS_ADD2, api_dfs_Add2},
1529 {"DFS_REMOVE2", NDR_DFS_REMOVE2, api_dfs_Remove2},
1530 {"DFS_ENUMEX", NDR_DFS_ENUMEX, api_dfs_EnumEx},
1531 {"DFS_SETINFO2", NDR_DFS_SETINFO2, api_dfs_SetInfo2},
1534 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns)
1536 *fns = api_netdfs_cmds;
1537 *n_fns = sizeof(api_netdfs_cmds) / sizeof(struct api_struct);
1540 NTSTATUS rpc_netdfs_init(void)
1542 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct));