8fb5810c9ce8cc0ca047f93968c837725d1757a6
[ira/wip.git] / source3 / librpc / gen_ndr / srv_dfs.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * server auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/srv_dfs.h"
8
9 static BOOL api_dfs_GetManagerVersion(pipes_struct *p)
10 {
11         struct ndr_pull *pull;
12         struct ndr_push *push;
13         NTSTATUS status;
14         DATA_BLOB blob;
15         struct dfs_GetManagerVersion r;
16         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetManagerVersion");
17         
18         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
19                 talloc_free(mem_ctx);
20                 return False;
21         }
22         
23         pull = ndr_pull_init_blob(&blob, mem_ctx);
24         if (pull == NULL) {
25                 talloc_free(mem_ctx);
26                 return False;
27         }
28         
29         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
30         status = ndr_pull_dfs_GetManagerVersion(pull, NDR_IN, &r);
31         if (NT_STATUS_IS_ERR(status)) {
32                 talloc_free(mem_ctx);
33                 return False;
34         }
35         
36         if (DEBUGLEVEL >= 10)
37                 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r);
38         
39         ZERO_STRUCT(r.out);
40         r.out.exist_flag = talloc_zero(mem_ctx, uint32_t);
41         if (r.out.exist_flag == NULL) {
42                 talloc_free(mem_ctx);
43                 return False;
44         }
45         
46         _dfs_GetManagerVersion(p, &r);
47         
48         if (p->rng_fault_state) {
49                 talloc_free(mem_ctx);
50                 /* Return True here, srv_pipe_hnd.c will take care */
51                 return True;
52         }
53         
54         if (DEBUGLEVEL >= 10)
55                 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r);
56         
57         push = ndr_push_init_ctx(mem_ctx);
58         if (push == NULL) {
59                 talloc_free(mem_ctx);
60                 return False;
61         }
62         
63         status = ndr_push_dfs_GetManagerVersion(push, NDR_OUT, &r);
64         if (NT_STATUS_IS_ERR(status)) {
65                 talloc_free(mem_ctx);
66                 return False;
67         }
68         
69         blob = ndr_push_blob(push);
70         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
71                 talloc_free(mem_ctx);
72                 return False;
73         }
74         
75         talloc_free(mem_ctx);
76         
77         return True;
78 }
79
80 static BOOL api_dfs_Add(pipes_struct *p)
81 {
82         struct ndr_pull *pull;
83         struct ndr_push *push;
84         NTSTATUS status;
85         DATA_BLOB blob;
86         struct dfs_Add r;
87         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add");
88         
89         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
90                 talloc_free(mem_ctx);
91                 return False;
92         }
93         
94         pull = ndr_pull_init_blob(&blob, mem_ctx);
95         if (pull == NULL) {
96                 talloc_free(mem_ctx);
97                 return False;
98         }
99         
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);
104                 return False;
105         }
106         
107         if (DEBUGLEVEL >= 10)
108                 NDR_PRINT_IN_DEBUG(dfs_Add, &r);
109         
110         r.out.result = _dfs_Add(p, &r);
111         
112         if (p->rng_fault_state) {
113                 talloc_free(mem_ctx);
114                 /* Return True here, srv_pipe_hnd.c will take care */
115                 return True;
116         }
117         
118         if (DEBUGLEVEL >= 10)
119                 NDR_PRINT_OUT_DEBUG(dfs_Add, &r);
120         
121         push = ndr_push_init_ctx(mem_ctx);
122         if (push == NULL) {
123                 talloc_free(mem_ctx);
124                 return False;
125         }
126         
127         status = ndr_push_dfs_Add(push, NDR_OUT, &r);
128         if (NT_STATUS_IS_ERR(status)) {
129                 talloc_free(mem_ctx);
130                 return False;
131         }
132         
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);
136                 return False;
137         }
138         
139         talloc_free(mem_ctx);
140         
141         return True;
142 }
143
144 static BOOL api_dfs_Remove(pipes_struct *p)
145 {
146         struct ndr_pull *pull;
147         struct ndr_push *push;
148         NTSTATUS status;
149         DATA_BLOB blob;
150         struct dfs_Remove r;
151         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove");
152         
153         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
154                 talloc_free(mem_ctx);
155                 return False;
156         }
157         
158         pull = ndr_pull_init_blob(&blob, mem_ctx);
159         if (pull == NULL) {
160                 talloc_free(mem_ctx);
161                 return False;
162         }
163         
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);
168                 return False;
169         }
170         
171         if (DEBUGLEVEL >= 10)
172                 NDR_PRINT_IN_DEBUG(dfs_Remove, &r);
173         
174         r.out.result = _dfs_Remove(p, &r);
175         
176         if (p->rng_fault_state) {
177                 talloc_free(mem_ctx);
178                 /* Return True here, srv_pipe_hnd.c will take care */
179                 return True;
180         }
181         
182         if (DEBUGLEVEL >= 10)
183                 NDR_PRINT_OUT_DEBUG(dfs_Remove, &r);
184         
185         push = ndr_push_init_ctx(mem_ctx);
186         if (push == NULL) {
187                 talloc_free(mem_ctx);
188                 return False;
189         }
190         
191         status = ndr_push_dfs_Remove(push, NDR_OUT, &r);
192         if (NT_STATUS_IS_ERR(status)) {
193                 talloc_free(mem_ctx);
194                 return False;
195         }
196         
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);
200                 return False;
201         }
202         
203         talloc_free(mem_ctx);
204         
205         return True;
206 }
207
208 static BOOL api_dfs_SetInfo(pipes_struct *p)
209 {
210         struct ndr_pull *pull;
211         struct ndr_push *push;
212         NTSTATUS status;
213         DATA_BLOB blob;
214         struct dfs_SetInfo r;
215         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo");
216         
217         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
218                 talloc_free(mem_ctx);
219                 return False;
220         }
221         
222         pull = ndr_pull_init_blob(&blob, mem_ctx);
223         if (pull == NULL) {
224                 talloc_free(mem_ctx);
225                 return False;
226         }
227         
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);
232                 return False;
233         }
234         
235         if (DEBUGLEVEL >= 10)
236                 NDR_PRINT_IN_DEBUG(dfs_SetInfo, &r);
237         
238         r.out.result = _dfs_SetInfo(p, &r);
239         
240         if (p->rng_fault_state) {
241                 talloc_free(mem_ctx);
242                 /* Return True here, srv_pipe_hnd.c will take care */
243                 return True;
244         }
245         
246         if (DEBUGLEVEL >= 10)
247                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r);
248         
249         push = ndr_push_init_ctx(mem_ctx);
250         if (push == NULL) {
251                 talloc_free(mem_ctx);
252                 return False;
253         }
254         
255         status = ndr_push_dfs_SetInfo(push, NDR_OUT, &r);
256         if (NT_STATUS_IS_ERR(status)) {
257                 talloc_free(mem_ctx);
258                 return False;
259         }
260         
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);
264                 return False;
265         }
266         
267         talloc_free(mem_ctx);
268         
269         return True;
270 }
271
272 static BOOL api_dfs_GetInfo(pipes_struct *p)
273 {
274         struct ndr_pull *pull;
275         struct ndr_push *push;
276         NTSTATUS status;
277         DATA_BLOB blob;
278         struct dfs_GetInfo r;
279         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetInfo");
280         
281         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
282                 talloc_free(mem_ctx);
283                 return False;
284         }
285         
286         pull = ndr_pull_init_blob(&blob, mem_ctx);
287         if (pull == NULL) {
288                 talloc_free(mem_ctx);
289                 return False;
290         }
291         
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);
296                 return False;
297         }
298         
299         if (DEBUGLEVEL >= 10)
300                 NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r);
301         
302         ZERO_STRUCT(r.out);
303         r.out.info = talloc_zero(mem_ctx, union dfs_Info);
304         if (r.out.info == NULL) {
305                 talloc_free(mem_ctx);
306                 return False;
307         }
308         
309         r.out.result = _dfs_GetInfo(p, &r);
310         
311         if (p->rng_fault_state) {
312                 talloc_free(mem_ctx);
313                 /* Return True here, srv_pipe_hnd.c will take care */
314                 return True;
315         }
316         
317         if (DEBUGLEVEL >= 10)
318                 NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r);
319         
320         push = ndr_push_init_ctx(mem_ctx);
321         if (push == NULL) {
322                 talloc_free(mem_ctx);
323                 return False;
324         }
325         
326         status = ndr_push_dfs_GetInfo(push, NDR_OUT, &r);
327         if (NT_STATUS_IS_ERR(status)) {
328                 talloc_free(mem_ctx);
329                 return False;
330         }
331         
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);
335                 return False;
336         }
337         
338         talloc_free(mem_ctx);
339         
340         return True;
341 }
342
343 static BOOL api_dfs_Enum(pipes_struct *p)
344 {
345         struct ndr_pull *pull;
346         struct ndr_push *push;
347         NTSTATUS status;
348         DATA_BLOB blob;
349         struct dfs_Enum r;
350         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Enum");
351         
352         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
353                 talloc_free(mem_ctx);
354                 return False;
355         }
356         
357         pull = ndr_pull_init_blob(&blob, mem_ctx);
358         if (pull == NULL) {
359                 talloc_free(mem_ctx);
360                 return False;
361         }
362         
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);
367                 return False;
368         }
369         
370         if (DEBUGLEVEL >= 10)
371                 NDR_PRINT_IN_DEBUG(dfs_Enum, &r);
372         
373         ZERO_STRUCT(r.out);
374         r.out.info = r.in.info;
375         r.out.total = r.in.total;
376         r.out.result = _dfs_Enum(p, &r);
377         
378         if (p->rng_fault_state) {
379                 talloc_free(mem_ctx);
380                 /* Return True here, srv_pipe_hnd.c will take care */
381                 return True;
382         }
383         
384         if (DEBUGLEVEL >= 10)
385                 NDR_PRINT_OUT_DEBUG(dfs_Enum, &r);
386         
387         push = ndr_push_init_ctx(mem_ctx);
388         if (push == NULL) {
389                 talloc_free(mem_ctx);
390                 return False;
391         }
392         
393         status = ndr_push_dfs_Enum(push, NDR_OUT, &r);
394         if (NT_STATUS_IS_ERR(status)) {
395                 talloc_free(mem_ctx);
396                 return False;
397         }
398         
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);
402                 return False;
403         }
404         
405         talloc_free(mem_ctx);
406         
407         return True;
408 }
409
410 static BOOL api_dfs_Rename(pipes_struct *p)
411 {
412         struct ndr_pull *pull;
413         struct ndr_push *push;
414         NTSTATUS status;
415         DATA_BLOB blob;
416         struct dfs_Rename r;
417         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Rename");
418         
419         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
420                 talloc_free(mem_ctx);
421                 return False;
422         }
423         
424         pull = ndr_pull_init_blob(&blob, mem_ctx);
425         if (pull == NULL) {
426                 talloc_free(mem_ctx);
427                 return False;
428         }
429         
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);
434                 return False;
435         }
436         
437         if (DEBUGLEVEL >= 10)
438                 NDR_PRINT_IN_DEBUG(dfs_Rename, &r);
439         
440         r.out.result = _dfs_Rename(p, &r);
441         
442         if (p->rng_fault_state) {
443                 talloc_free(mem_ctx);
444                 /* Return True here, srv_pipe_hnd.c will take care */
445                 return True;
446         }
447         
448         if (DEBUGLEVEL >= 10)
449                 NDR_PRINT_OUT_DEBUG(dfs_Rename, &r);
450         
451         push = ndr_push_init_ctx(mem_ctx);
452         if (push == NULL) {
453                 talloc_free(mem_ctx);
454                 return False;
455         }
456         
457         status = ndr_push_dfs_Rename(push, NDR_OUT, &r);
458         if (NT_STATUS_IS_ERR(status)) {
459                 talloc_free(mem_ctx);
460                 return False;
461         }
462         
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);
466                 return False;
467         }
468         
469         talloc_free(mem_ctx);
470         
471         return True;
472 }
473
474 static BOOL api_dfs_Move(pipes_struct *p)
475 {
476         struct ndr_pull *pull;
477         struct ndr_push *push;
478         NTSTATUS status;
479         DATA_BLOB blob;
480         struct dfs_Move r;
481         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Move");
482         
483         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
484                 talloc_free(mem_ctx);
485                 return False;
486         }
487         
488         pull = ndr_pull_init_blob(&blob, mem_ctx);
489         if (pull == NULL) {
490                 talloc_free(mem_ctx);
491                 return False;
492         }
493         
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);
498                 return False;
499         }
500         
501         if (DEBUGLEVEL >= 10)
502                 NDR_PRINT_IN_DEBUG(dfs_Move, &r);
503         
504         r.out.result = _dfs_Move(p, &r);
505         
506         if (p->rng_fault_state) {
507                 talloc_free(mem_ctx);
508                 /* Return True here, srv_pipe_hnd.c will take care */
509                 return True;
510         }
511         
512         if (DEBUGLEVEL >= 10)
513                 NDR_PRINT_OUT_DEBUG(dfs_Move, &r);
514         
515         push = ndr_push_init_ctx(mem_ctx);
516         if (push == NULL) {
517                 talloc_free(mem_ctx);
518                 return False;
519         }
520         
521         status = ndr_push_dfs_Move(push, NDR_OUT, &r);
522         if (NT_STATUS_IS_ERR(status)) {
523                 talloc_free(mem_ctx);
524                 return False;
525         }
526         
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);
530                 return False;
531         }
532         
533         talloc_free(mem_ctx);
534         
535         return True;
536 }
537
538 static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p)
539 {
540         struct ndr_pull *pull;
541         struct ndr_push *push;
542         NTSTATUS status;
543         DATA_BLOB blob;
544         struct dfs_ManagerGetConfigInfo r;
545         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerGetConfigInfo");
546         
547         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
548                 talloc_free(mem_ctx);
549                 return False;
550         }
551         
552         pull = ndr_pull_init_blob(&blob, mem_ctx);
553         if (pull == NULL) {
554                 talloc_free(mem_ctx);
555                 return False;
556         }
557         
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);
562                 return False;
563         }
564         
565         if (DEBUGLEVEL >= 10)
566                 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &r);
567         
568         r.out.result = _dfs_ManagerGetConfigInfo(p, &r);
569         
570         if (p->rng_fault_state) {
571                 talloc_free(mem_ctx);
572                 /* Return True here, srv_pipe_hnd.c will take care */
573                 return True;
574         }
575         
576         if (DEBUGLEVEL >= 10)
577                 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r);
578         
579         push = ndr_push_init_ctx(mem_ctx);
580         if (push == NULL) {
581                 talloc_free(mem_ctx);
582                 return False;
583         }
584         
585         status = ndr_push_dfs_ManagerGetConfigInfo(push, NDR_OUT, &r);
586         if (NT_STATUS_IS_ERR(status)) {
587                 talloc_free(mem_ctx);
588                 return False;
589         }
590         
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);
594                 return False;
595         }
596         
597         talloc_free(mem_ctx);
598         
599         return True;
600 }
601
602 static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p)
603 {
604         struct ndr_pull *pull;
605         struct ndr_push *push;
606         NTSTATUS status;
607         DATA_BLOB blob;
608         struct dfs_ManagerSendSiteInfo r;
609         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerSendSiteInfo");
610         
611         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
612                 talloc_free(mem_ctx);
613                 return False;
614         }
615         
616         pull = ndr_pull_init_blob(&blob, mem_ctx);
617         if (pull == NULL) {
618                 talloc_free(mem_ctx);
619                 return False;
620         }
621         
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);
626                 return False;
627         }
628         
629         if (DEBUGLEVEL >= 10)
630                 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &r);
631         
632         r.out.result = _dfs_ManagerSendSiteInfo(p, &r);
633         
634         if (p->rng_fault_state) {
635                 talloc_free(mem_ctx);
636                 /* Return True here, srv_pipe_hnd.c will take care */
637                 return True;
638         }
639         
640         if (DEBUGLEVEL >= 10)
641                 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r);
642         
643         push = ndr_push_init_ctx(mem_ctx);
644         if (push == NULL) {
645                 talloc_free(mem_ctx);
646                 return False;
647         }
648         
649         status = ndr_push_dfs_ManagerSendSiteInfo(push, NDR_OUT, &r);
650         if (NT_STATUS_IS_ERR(status)) {
651                 talloc_free(mem_ctx);
652                 return False;
653         }
654         
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);
658                 return False;
659         }
660         
661         talloc_free(mem_ctx);
662         
663         return True;
664 }
665
666 static BOOL api_dfs_AddFtRoot(pipes_struct *p)
667 {
668         struct ndr_pull *pull;
669         struct ndr_push *push;
670         NTSTATUS status;
671         DATA_BLOB blob;
672         struct dfs_AddFtRoot r;
673         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddFtRoot");
674         
675         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
676                 talloc_free(mem_ctx);
677                 return False;
678         }
679         
680         pull = ndr_pull_init_blob(&blob, mem_ctx);
681         if (pull == NULL) {
682                 talloc_free(mem_ctx);
683                 return False;
684         }
685         
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);
690                 return False;
691         }
692         
693         if (DEBUGLEVEL >= 10)
694                 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r);
695         
696         r.out.result = _dfs_AddFtRoot(p, &r);
697         
698         if (p->rng_fault_state) {
699                 talloc_free(mem_ctx);
700                 /* Return True here, srv_pipe_hnd.c will take care */
701                 return True;
702         }
703         
704         if (DEBUGLEVEL >= 10)
705                 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r);
706         
707         push = ndr_push_init_ctx(mem_ctx);
708         if (push == NULL) {
709                 talloc_free(mem_ctx);
710                 return False;
711         }
712         
713         status = ndr_push_dfs_AddFtRoot(push, NDR_OUT, &r);
714         if (NT_STATUS_IS_ERR(status)) {
715                 talloc_free(mem_ctx);
716                 return False;
717         }
718         
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);
722                 return False;
723         }
724         
725         talloc_free(mem_ctx);
726         
727         return True;
728 }
729
730 static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
731 {
732         struct ndr_pull *pull;
733         struct ndr_push *push;
734         NTSTATUS status;
735         DATA_BLOB blob;
736         struct dfs_RemoveFtRoot r;
737         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveFtRoot");
738         
739         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
740                 talloc_free(mem_ctx);
741                 return False;
742         }
743         
744         pull = ndr_pull_init_blob(&blob, mem_ctx);
745         if (pull == NULL) {
746                 talloc_free(mem_ctx);
747                 return False;
748         }
749         
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);
754                 return False;
755         }
756         
757         if (DEBUGLEVEL >= 10)
758                 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r);
759         
760         r.out.result = _dfs_RemoveFtRoot(p, &r);
761         
762         if (p->rng_fault_state) {
763                 talloc_free(mem_ctx);
764                 /* Return True here, srv_pipe_hnd.c will take care */
765                 return True;
766         }
767         
768         if (DEBUGLEVEL >= 10)
769                 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r);
770         
771         push = ndr_push_init_ctx(mem_ctx);
772         if (push == NULL) {
773                 talloc_free(mem_ctx);
774                 return False;
775         }
776         
777         status = ndr_push_dfs_RemoveFtRoot(push, NDR_OUT, &r);
778         if (NT_STATUS_IS_ERR(status)) {
779                 talloc_free(mem_ctx);
780                 return False;
781         }
782         
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);
786                 return False;
787         }
788         
789         talloc_free(mem_ctx);
790         
791         return True;
792 }
793
794 static BOOL api_dfs_AddStdRoot(pipes_struct *p)
795 {
796         struct ndr_pull *pull;
797         struct ndr_push *push;
798         NTSTATUS status;
799         DATA_BLOB blob;
800         struct dfs_AddStdRoot r;
801         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRoot");
802         
803         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
804                 talloc_free(mem_ctx);
805                 return False;
806         }
807         
808         pull = ndr_pull_init_blob(&blob, mem_ctx);
809         if (pull == NULL) {
810                 talloc_free(mem_ctx);
811                 return False;
812         }
813         
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);
818                 return False;
819         }
820         
821         if (DEBUGLEVEL >= 10)
822                 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r);
823         
824         r.out.result = _dfs_AddStdRoot(p, &r);
825         
826         if (p->rng_fault_state) {
827                 talloc_free(mem_ctx);
828                 /* Return True here, srv_pipe_hnd.c will take care */
829                 return True;
830         }
831         
832         if (DEBUGLEVEL >= 10)
833                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r);
834         
835         push = ndr_push_init_ctx(mem_ctx);
836         if (push == NULL) {
837                 talloc_free(mem_ctx);
838                 return False;
839         }
840         
841         status = ndr_push_dfs_AddStdRoot(push, NDR_OUT, &r);
842         if (NT_STATUS_IS_ERR(status)) {
843                 talloc_free(mem_ctx);
844                 return False;
845         }
846         
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);
850                 return False;
851         }
852         
853         talloc_free(mem_ctx);
854         
855         return True;
856 }
857
858 static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
859 {
860         struct ndr_pull *pull;
861         struct ndr_push *push;
862         NTSTATUS status;
863         DATA_BLOB blob;
864         struct dfs_RemoveStdRoot r;
865         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveStdRoot");
866         
867         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
868                 talloc_free(mem_ctx);
869                 return False;
870         }
871         
872         pull = ndr_pull_init_blob(&blob, mem_ctx);
873         if (pull == NULL) {
874                 talloc_free(mem_ctx);
875                 return False;
876         }
877         
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);
882                 return False;
883         }
884         
885         if (DEBUGLEVEL >= 10)
886                 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r);
887         
888         r.out.result = _dfs_RemoveStdRoot(p, &r);
889         
890         if (p->rng_fault_state) {
891                 talloc_free(mem_ctx);
892                 /* Return True here, srv_pipe_hnd.c will take care */
893                 return True;
894         }
895         
896         if (DEBUGLEVEL >= 10)
897                 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r);
898         
899         push = ndr_push_init_ctx(mem_ctx);
900         if (push == NULL) {
901                 talloc_free(mem_ctx);
902                 return False;
903         }
904         
905         status = ndr_push_dfs_RemoveStdRoot(push, NDR_OUT, &r);
906         if (NT_STATUS_IS_ERR(status)) {
907                 talloc_free(mem_ctx);
908                 return False;
909         }
910         
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);
914                 return False;
915         }
916         
917         talloc_free(mem_ctx);
918         
919         return True;
920 }
921
922 static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
923 {
924         struct ndr_pull *pull;
925         struct ndr_push *push;
926         NTSTATUS status;
927         DATA_BLOB blob;
928         struct dfs_ManagerInitialize r;
929         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerInitialize");
930         
931         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
932                 talloc_free(mem_ctx);
933                 return False;
934         }
935         
936         pull = ndr_pull_init_blob(&blob, mem_ctx);
937         if (pull == NULL) {
938                 talloc_free(mem_ctx);
939                 return False;
940         }
941         
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);
946                 return False;
947         }
948         
949         if (DEBUGLEVEL >= 10)
950                 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r);
951         
952         r.out.result = _dfs_ManagerInitialize(p, &r);
953         
954         if (p->rng_fault_state) {
955                 talloc_free(mem_ctx);
956                 /* Return True here, srv_pipe_hnd.c will take care */
957                 return True;
958         }
959         
960         if (DEBUGLEVEL >= 10)
961                 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r);
962         
963         push = ndr_push_init_ctx(mem_ctx);
964         if (push == NULL) {
965                 talloc_free(mem_ctx);
966                 return False;
967         }
968         
969         status = ndr_push_dfs_ManagerInitialize(push, NDR_OUT, &r);
970         if (NT_STATUS_IS_ERR(status)) {
971                 talloc_free(mem_ctx);
972                 return False;
973         }
974         
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);
978                 return False;
979         }
980         
981         talloc_free(mem_ctx);
982         
983         return True;
984 }
985
986 static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
987 {
988         struct ndr_pull *pull;
989         struct ndr_push *push;
990         NTSTATUS status;
991         DATA_BLOB blob;
992         struct dfs_AddStdRootForced r;
993         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRootForced");
994         
995         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
996                 talloc_free(mem_ctx);
997                 return False;
998         }
999         
1000         pull = ndr_pull_init_blob(&blob, mem_ctx);
1001         if (pull == NULL) {
1002                 talloc_free(mem_ctx);
1003                 return False;
1004         }
1005         
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);
1010                 return False;
1011         }
1012         
1013         if (DEBUGLEVEL >= 10)
1014                 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r);
1015         
1016         r.out.result = _dfs_AddStdRootForced(p, &r);
1017         
1018         if (p->rng_fault_state) {
1019                 talloc_free(mem_ctx);
1020                 /* Return True here, srv_pipe_hnd.c will take care */
1021                 return True;
1022         }
1023         
1024         if (DEBUGLEVEL >= 10)
1025                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r);
1026         
1027         push = ndr_push_init_ctx(mem_ctx);
1028         if (push == NULL) {
1029                 talloc_free(mem_ctx);
1030                 return False;
1031         }
1032         
1033         status = ndr_push_dfs_AddStdRootForced(push, NDR_OUT, &r);
1034         if (NT_STATUS_IS_ERR(status)) {
1035                 talloc_free(mem_ctx);
1036                 return False;
1037         }
1038         
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);
1042                 return False;
1043         }
1044         
1045         talloc_free(mem_ctx);
1046         
1047         return True;
1048 }
1049
1050 static BOOL api_dfs_GetDcAddress(pipes_struct *p)
1051 {
1052         struct ndr_pull *pull;
1053         struct ndr_push *push;
1054         NTSTATUS status;
1055         DATA_BLOB blob;
1056         struct dfs_GetDcAddress r;
1057         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetDcAddress");
1058         
1059         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1060                 talloc_free(mem_ctx);
1061                 return False;
1062         }
1063         
1064         pull = ndr_pull_init_blob(&blob, mem_ctx);
1065         if (pull == NULL) {
1066                 talloc_free(mem_ctx);
1067                 return False;
1068         }
1069         
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);
1074                 return False;
1075         }
1076         
1077         if (DEBUGLEVEL >= 10)
1078                 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r);
1079         
1080         r.out.result = _dfs_GetDcAddress(p, &r);
1081         
1082         if (p->rng_fault_state) {
1083                 talloc_free(mem_ctx);
1084                 /* Return True here, srv_pipe_hnd.c will take care */
1085                 return True;
1086         }
1087         
1088         if (DEBUGLEVEL >= 10)
1089                 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r);
1090         
1091         push = ndr_push_init_ctx(mem_ctx);
1092         if (push == NULL) {
1093                 talloc_free(mem_ctx);
1094                 return False;
1095         }
1096         
1097         status = ndr_push_dfs_GetDcAddress(push, NDR_OUT, &r);
1098         if (NT_STATUS_IS_ERR(status)) {
1099                 talloc_free(mem_ctx);
1100                 return False;
1101         }
1102         
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);
1106                 return False;
1107         }
1108         
1109         talloc_free(mem_ctx);
1110         
1111         return True;
1112 }
1113
1114 static BOOL api_dfs_SetDcAddress(pipes_struct *p)
1115 {
1116         struct ndr_pull *pull;
1117         struct ndr_push *push;
1118         NTSTATUS status;
1119         DATA_BLOB blob;
1120         struct dfs_SetDcAddress r;
1121         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetDcAddress");
1122         
1123         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1124                 talloc_free(mem_ctx);
1125                 return False;
1126         }
1127         
1128         pull = ndr_pull_init_blob(&blob, mem_ctx);
1129         if (pull == NULL) {
1130                 talloc_free(mem_ctx);
1131                 return False;
1132         }
1133         
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);
1138                 return False;
1139         }
1140         
1141         if (DEBUGLEVEL >= 10)
1142                 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r);
1143         
1144         r.out.result = _dfs_SetDcAddress(p, &r);
1145         
1146         if (p->rng_fault_state) {
1147                 talloc_free(mem_ctx);
1148                 /* Return True here, srv_pipe_hnd.c will take care */
1149                 return True;
1150         }
1151         
1152         if (DEBUGLEVEL >= 10)
1153                 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r);
1154         
1155         push = ndr_push_init_ctx(mem_ctx);
1156         if (push == NULL) {
1157                 talloc_free(mem_ctx);
1158                 return False;
1159         }
1160         
1161         status = ndr_push_dfs_SetDcAddress(push, NDR_OUT, &r);
1162         if (NT_STATUS_IS_ERR(status)) {
1163                 talloc_free(mem_ctx);
1164                 return False;
1165         }
1166         
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);
1170                 return False;
1171         }
1172         
1173         talloc_free(mem_ctx);
1174         
1175         return True;
1176 }
1177
1178 static BOOL api_dfs_FlushFtTable(pipes_struct *p)
1179 {
1180         struct ndr_pull *pull;
1181         struct ndr_push *push;
1182         NTSTATUS status;
1183         DATA_BLOB blob;
1184         struct dfs_FlushFtTable r;
1185         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_FlushFtTable");
1186         
1187         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1188                 talloc_free(mem_ctx);
1189                 return False;
1190         }
1191         
1192         pull = ndr_pull_init_blob(&blob, mem_ctx);
1193         if (pull == NULL) {
1194                 talloc_free(mem_ctx);
1195                 return False;
1196         }
1197         
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);
1202                 return False;
1203         }
1204         
1205         if (DEBUGLEVEL >= 10)
1206                 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r);
1207         
1208         r.out.result = _dfs_FlushFtTable(p, &r);
1209         
1210         if (p->rng_fault_state) {
1211                 talloc_free(mem_ctx);
1212                 /* Return True here, srv_pipe_hnd.c will take care */
1213                 return True;
1214         }
1215         
1216         if (DEBUGLEVEL >= 10)
1217                 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r);
1218         
1219         push = ndr_push_init_ctx(mem_ctx);
1220         if (push == NULL) {
1221                 talloc_free(mem_ctx);
1222                 return False;
1223         }
1224         
1225         status = ndr_push_dfs_FlushFtTable(push, NDR_OUT, &r);
1226         if (NT_STATUS_IS_ERR(status)) {
1227                 talloc_free(mem_ctx);
1228                 return False;
1229         }
1230         
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);
1234                 return False;
1235         }
1236         
1237         talloc_free(mem_ctx);
1238         
1239         return True;
1240 }
1241
1242 static BOOL api_dfs_Add2(pipes_struct *p)
1243 {
1244         struct ndr_pull *pull;
1245         struct ndr_push *push;
1246         NTSTATUS status;
1247         DATA_BLOB blob;
1248         struct dfs_Add2 r;
1249         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add2");
1250         
1251         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1252                 talloc_free(mem_ctx);
1253                 return False;
1254         }
1255         
1256         pull = ndr_pull_init_blob(&blob, mem_ctx);
1257         if (pull == NULL) {
1258                 talloc_free(mem_ctx);
1259                 return False;
1260         }
1261         
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);
1266                 return False;
1267         }
1268         
1269         if (DEBUGLEVEL >= 10)
1270                 NDR_PRINT_IN_DEBUG(dfs_Add2, &r);
1271         
1272         r.out.result = _dfs_Add2(p, &r);
1273         
1274         if (p->rng_fault_state) {
1275                 talloc_free(mem_ctx);
1276                 /* Return True here, srv_pipe_hnd.c will take care */
1277                 return True;
1278         }
1279         
1280         if (DEBUGLEVEL >= 10)
1281                 NDR_PRINT_OUT_DEBUG(dfs_Add2, &r);
1282         
1283         push = ndr_push_init_ctx(mem_ctx);
1284         if (push == NULL) {
1285                 talloc_free(mem_ctx);
1286                 return False;
1287         }
1288         
1289         status = ndr_push_dfs_Add2(push, NDR_OUT, &r);
1290         if (NT_STATUS_IS_ERR(status)) {
1291                 talloc_free(mem_ctx);
1292                 return False;
1293         }
1294         
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);
1298                 return False;
1299         }
1300         
1301         talloc_free(mem_ctx);
1302         
1303         return True;
1304 }
1305
1306 static BOOL api_dfs_Remove2(pipes_struct *p)
1307 {
1308         struct ndr_pull *pull;
1309         struct ndr_push *push;
1310         NTSTATUS status;
1311         DATA_BLOB blob;
1312         struct dfs_Remove2 r;
1313         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove2");
1314         
1315         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1316                 talloc_free(mem_ctx);
1317                 return False;
1318         }
1319         
1320         pull = ndr_pull_init_blob(&blob, mem_ctx);
1321         if (pull == NULL) {
1322                 talloc_free(mem_ctx);
1323                 return False;
1324         }
1325         
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);
1330                 return False;
1331         }
1332         
1333         if (DEBUGLEVEL >= 10)
1334                 NDR_PRINT_IN_DEBUG(dfs_Remove2, &r);
1335         
1336         r.out.result = _dfs_Remove2(p, &r);
1337         
1338         if (p->rng_fault_state) {
1339                 talloc_free(mem_ctx);
1340                 /* Return True here, srv_pipe_hnd.c will take care */
1341                 return True;
1342         }
1343         
1344         if (DEBUGLEVEL >= 10)
1345                 NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r);
1346         
1347         push = ndr_push_init_ctx(mem_ctx);
1348         if (push == NULL) {
1349                 talloc_free(mem_ctx);
1350                 return False;
1351         }
1352         
1353         status = ndr_push_dfs_Remove2(push, NDR_OUT, &r);
1354         if (NT_STATUS_IS_ERR(status)) {
1355                 talloc_free(mem_ctx);
1356                 return False;
1357         }
1358         
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);
1362                 return False;
1363         }
1364         
1365         talloc_free(mem_ctx);
1366         
1367         return True;
1368 }
1369
1370 static BOOL api_dfs_EnumEx(pipes_struct *p)
1371 {
1372         struct ndr_pull *pull;
1373         struct ndr_push *push;
1374         NTSTATUS status;
1375         DATA_BLOB blob;
1376         struct dfs_EnumEx r;
1377         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_EnumEx");
1378         
1379         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1380                 talloc_free(mem_ctx);
1381                 return False;
1382         }
1383         
1384         pull = ndr_pull_init_blob(&blob, mem_ctx);
1385         if (pull == NULL) {
1386                 talloc_free(mem_ctx);
1387                 return False;
1388         }
1389         
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);
1394                 return False;
1395         }
1396         
1397         if (DEBUGLEVEL >= 10)
1398                 NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r);
1399         
1400         ZERO_STRUCT(r.out);
1401         r.out.info = r.in.info;
1402         r.out.total = r.in.total;
1403         r.out.result = _dfs_EnumEx(p, &r);
1404         
1405         if (p->rng_fault_state) {
1406                 talloc_free(mem_ctx);
1407                 /* Return True here, srv_pipe_hnd.c will take care */
1408                 return True;
1409         }
1410         
1411         if (DEBUGLEVEL >= 10)
1412                 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r);
1413         
1414         push = ndr_push_init_ctx(mem_ctx);
1415         if (push == NULL) {
1416                 talloc_free(mem_ctx);
1417                 return False;
1418         }
1419         
1420         status = ndr_push_dfs_EnumEx(push, NDR_OUT, &r);
1421         if (NT_STATUS_IS_ERR(status)) {
1422                 talloc_free(mem_ctx);
1423                 return False;
1424         }
1425         
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);
1429                 return False;
1430         }
1431         
1432         talloc_free(mem_ctx);
1433         
1434         return True;
1435 }
1436
1437 static BOOL api_dfs_SetInfo2(pipes_struct *p)
1438 {
1439         struct ndr_pull *pull;
1440         struct ndr_push *push;
1441         NTSTATUS status;
1442         DATA_BLOB blob;
1443         struct dfs_SetInfo2 r;
1444         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo2");
1445         
1446         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1447                 talloc_free(mem_ctx);
1448                 return False;
1449         }
1450         
1451         pull = ndr_pull_init_blob(&blob, mem_ctx);
1452         if (pull == NULL) {
1453                 talloc_free(mem_ctx);
1454                 return False;
1455         }
1456         
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);
1461                 return False;
1462         }
1463         
1464         if (DEBUGLEVEL >= 10)
1465                 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r);
1466         
1467         r.out.result = _dfs_SetInfo2(p, &r);
1468         
1469         if (p->rng_fault_state) {
1470                 talloc_free(mem_ctx);
1471                 /* Return True here, srv_pipe_hnd.c will take care */
1472                 return True;
1473         }
1474         
1475         if (DEBUGLEVEL >= 10)
1476                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r);
1477         
1478         push = ndr_push_init_ctx(mem_ctx);
1479         if (push == NULL) {
1480                 talloc_free(mem_ctx);
1481                 return False;
1482         }
1483         
1484         status = ndr_push_dfs_SetInfo2(push, NDR_OUT, &r);
1485         if (NT_STATUS_IS_ERR(status)) {
1486                 talloc_free(mem_ctx);
1487                 return False;
1488         }
1489         
1490         blob = ndr_push_blob(push);
1491         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1492                 talloc_free(mem_ctx);
1493                 return False;
1494         }
1495         
1496         talloc_free(mem_ctx);
1497         
1498         return True;
1499 }
1500
1501
1502 /* Tables */
1503 static struct api_struct api_netdfs_cmds[] = 
1504 {
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},
1528 };
1529
1530 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns)
1531 {
1532         *fns = api_netdfs_cmds;
1533         *n_fns = sizeof(api_netdfs_cmds) / sizeof(struct api_struct);
1534 }
1535
1536 NTSTATUS rpc_netdfs_init(void)
1537 {
1538         return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct));
1539 }