6250508ccd986ed41979ba91e0ebd9c4b7272cc1
[sfrench/samba-autobuild/.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.version = talloc_zero(mem_ctx, enum dfs_ManagerVersion);
41         if (r.out.version == 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         ZERO_STRUCT(r.out);
697         r.out.unknown2 = r.in.unknown2;
698         r.out.result = _dfs_AddFtRoot(p, &r);
699         
700         if (p->rng_fault_state) {
701                 talloc_free(mem_ctx);
702                 /* Return True here, srv_pipe_hnd.c will take care */
703                 return True;
704         }
705         
706         if (DEBUGLEVEL >= 10)
707                 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r);
708         
709         push = ndr_push_init_ctx(mem_ctx);
710         if (push == NULL) {
711                 talloc_free(mem_ctx);
712                 return False;
713         }
714         
715         status = ndr_push_dfs_AddFtRoot(push, NDR_OUT, &r);
716         if (NT_STATUS_IS_ERR(status)) {
717                 talloc_free(mem_ctx);
718                 return False;
719         }
720         
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);
724                 return False;
725         }
726         
727         talloc_free(mem_ctx);
728         
729         return True;
730 }
731
732 static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
733 {
734         struct ndr_pull *pull;
735         struct ndr_push *push;
736         NTSTATUS status;
737         DATA_BLOB blob;
738         struct dfs_RemoveFtRoot r;
739         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveFtRoot");
740         
741         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
742                 talloc_free(mem_ctx);
743                 return False;
744         }
745         
746         pull = ndr_pull_init_blob(&blob, mem_ctx);
747         if (pull == NULL) {
748                 talloc_free(mem_ctx);
749                 return False;
750         }
751         
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);
756                 return False;
757         }
758         
759         if (DEBUGLEVEL >= 10)
760                 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r);
761         
762         ZERO_STRUCT(r.out);
763         r.out.unknown = r.in.unknown;
764         r.out.result = _dfs_RemoveFtRoot(p, &r);
765         
766         if (p->rng_fault_state) {
767                 talloc_free(mem_ctx);
768                 /* Return True here, srv_pipe_hnd.c will take care */
769                 return True;
770         }
771         
772         if (DEBUGLEVEL >= 10)
773                 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r);
774         
775         push = ndr_push_init_ctx(mem_ctx);
776         if (push == NULL) {
777                 talloc_free(mem_ctx);
778                 return False;
779         }
780         
781         status = ndr_push_dfs_RemoveFtRoot(push, NDR_OUT, &r);
782         if (NT_STATUS_IS_ERR(status)) {
783                 talloc_free(mem_ctx);
784                 return False;
785         }
786         
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);
790                 return False;
791         }
792         
793         talloc_free(mem_ctx);
794         
795         return True;
796 }
797
798 static BOOL api_dfs_AddStdRoot(pipes_struct *p)
799 {
800         struct ndr_pull *pull;
801         struct ndr_push *push;
802         NTSTATUS status;
803         DATA_BLOB blob;
804         struct dfs_AddStdRoot r;
805         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRoot");
806         
807         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
808                 talloc_free(mem_ctx);
809                 return False;
810         }
811         
812         pull = ndr_pull_init_blob(&blob, mem_ctx);
813         if (pull == NULL) {
814                 talloc_free(mem_ctx);
815                 return False;
816         }
817         
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);
822                 return False;
823         }
824         
825         if (DEBUGLEVEL >= 10)
826                 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r);
827         
828         r.out.result = _dfs_AddStdRoot(p, &r);
829         
830         if (p->rng_fault_state) {
831                 talloc_free(mem_ctx);
832                 /* Return True here, srv_pipe_hnd.c will take care */
833                 return True;
834         }
835         
836         if (DEBUGLEVEL >= 10)
837                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r);
838         
839         push = ndr_push_init_ctx(mem_ctx);
840         if (push == NULL) {
841                 talloc_free(mem_ctx);
842                 return False;
843         }
844         
845         status = ndr_push_dfs_AddStdRoot(push, NDR_OUT, &r);
846         if (NT_STATUS_IS_ERR(status)) {
847                 talloc_free(mem_ctx);
848                 return False;
849         }
850         
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);
854                 return False;
855         }
856         
857         talloc_free(mem_ctx);
858         
859         return True;
860 }
861
862 static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
863 {
864         struct ndr_pull *pull;
865         struct ndr_push *push;
866         NTSTATUS status;
867         DATA_BLOB blob;
868         struct dfs_RemoveStdRoot r;
869         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_RemoveStdRoot");
870         
871         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
872                 talloc_free(mem_ctx);
873                 return False;
874         }
875         
876         pull = ndr_pull_init_blob(&blob, mem_ctx);
877         if (pull == NULL) {
878                 talloc_free(mem_ctx);
879                 return False;
880         }
881         
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);
886                 return False;
887         }
888         
889         if (DEBUGLEVEL >= 10)
890                 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r);
891         
892         r.out.result = _dfs_RemoveStdRoot(p, &r);
893         
894         if (p->rng_fault_state) {
895                 talloc_free(mem_ctx);
896                 /* Return True here, srv_pipe_hnd.c will take care */
897                 return True;
898         }
899         
900         if (DEBUGLEVEL >= 10)
901                 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r);
902         
903         push = ndr_push_init_ctx(mem_ctx);
904         if (push == NULL) {
905                 talloc_free(mem_ctx);
906                 return False;
907         }
908         
909         status = ndr_push_dfs_RemoveStdRoot(push, NDR_OUT, &r);
910         if (NT_STATUS_IS_ERR(status)) {
911                 talloc_free(mem_ctx);
912                 return False;
913         }
914         
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);
918                 return False;
919         }
920         
921         talloc_free(mem_ctx);
922         
923         return True;
924 }
925
926 static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
927 {
928         struct ndr_pull *pull;
929         struct ndr_push *push;
930         NTSTATUS status;
931         DATA_BLOB blob;
932         struct dfs_ManagerInitialize r;
933         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_ManagerInitialize");
934         
935         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
936                 talloc_free(mem_ctx);
937                 return False;
938         }
939         
940         pull = ndr_pull_init_blob(&blob, mem_ctx);
941         if (pull == NULL) {
942                 talloc_free(mem_ctx);
943                 return False;
944         }
945         
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);
950                 return False;
951         }
952         
953         if (DEBUGLEVEL >= 10)
954                 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r);
955         
956         r.out.result = _dfs_ManagerInitialize(p, &r);
957         
958         if (p->rng_fault_state) {
959                 talloc_free(mem_ctx);
960                 /* Return True here, srv_pipe_hnd.c will take care */
961                 return True;
962         }
963         
964         if (DEBUGLEVEL >= 10)
965                 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r);
966         
967         push = ndr_push_init_ctx(mem_ctx);
968         if (push == NULL) {
969                 talloc_free(mem_ctx);
970                 return False;
971         }
972         
973         status = ndr_push_dfs_ManagerInitialize(push, NDR_OUT, &r);
974         if (NT_STATUS_IS_ERR(status)) {
975                 talloc_free(mem_ctx);
976                 return False;
977         }
978         
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);
982                 return False;
983         }
984         
985         talloc_free(mem_ctx);
986         
987         return True;
988 }
989
990 static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
991 {
992         struct ndr_pull *pull;
993         struct ndr_push *push;
994         NTSTATUS status;
995         DATA_BLOB blob;
996         struct dfs_AddStdRootForced r;
997         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_AddStdRootForced");
998         
999         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1000                 talloc_free(mem_ctx);
1001                 return False;
1002         }
1003         
1004         pull = ndr_pull_init_blob(&blob, mem_ctx);
1005         if (pull == NULL) {
1006                 talloc_free(mem_ctx);
1007                 return False;
1008         }
1009         
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);
1014                 return False;
1015         }
1016         
1017         if (DEBUGLEVEL >= 10)
1018                 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r);
1019         
1020         r.out.result = _dfs_AddStdRootForced(p, &r);
1021         
1022         if (p->rng_fault_state) {
1023                 talloc_free(mem_ctx);
1024                 /* Return True here, srv_pipe_hnd.c will take care */
1025                 return True;
1026         }
1027         
1028         if (DEBUGLEVEL >= 10)
1029                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r);
1030         
1031         push = ndr_push_init_ctx(mem_ctx);
1032         if (push == NULL) {
1033                 talloc_free(mem_ctx);
1034                 return False;
1035         }
1036         
1037         status = ndr_push_dfs_AddStdRootForced(push, NDR_OUT, &r);
1038         if (NT_STATUS_IS_ERR(status)) {
1039                 talloc_free(mem_ctx);
1040                 return False;
1041         }
1042         
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);
1046                 return False;
1047         }
1048         
1049         talloc_free(mem_ctx);
1050         
1051         return True;
1052 }
1053
1054 static BOOL api_dfs_GetDcAddress(pipes_struct *p)
1055 {
1056         struct ndr_pull *pull;
1057         struct ndr_push *push;
1058         NTSTATUS status;
1059         DATA_BLOB blob;
1060         struct dfs_GetDcAddress r;
1061         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_GetDcAddress");
1062         
1063         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1064                 talloc_free(mem_ctx);
1065                 return False;
1066         }
1067         
1068         pull = ndr_pull_init_blob(&blob, mem_ctx);
1069         if (pull == NULL) {
1070                 talloc_free(mem_ctx);
1071                 return False;
1072         }
1073         
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);
1078                 return False;
1079         }
1080         
1081         if (DEBUGLEVEL >= 10)
1082                 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r);
1083         
1084         r.out.result = _dfs_GetDcAddress(p, &r);
1085         
1086         if (p->rng_fault_state) {
1087                 talloc_free(mem_ctx);
1088                 /* Return True here, srv_pipe_hnd.c will take care */
1089                 return True;
1090         }
1091         
1092         if (DEBUGLEVEL >= 10)
1093                 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r);
1094         
1095         push = ndr_push_init_ctx(mem_ctx);
1096         if (push == NULL) {
1097                 talloc_free(mem_ctx);
1098                 return False;
1099         }
1100         
1101         status = ndr_push_dfs_GetDcAddress(push, NDR_OUT, &r);
1102         if (NT_STATUS_IS_ERR(status)) {
1103                 talloc_free(mem_ctx);
1104                 return False;
1105         }
1106         
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);
1110                 return False;
1111         }
1112         
1113         talloc_free(mem_ctx);
1114         
1115         return True;
1116 }
1117
1118 static BOOL api_dfs_SetDcAddress(pipes_struct *p)
1119 {
1120         struct ndr_pull *pull;
1121         struct ndr_push *push;
1122         NTSTATUS status;
1123         DATA_BLOB blob;
1124         struct dfs_SetDcAddress r;
1125         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetDcAddress");
1126         
1127         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1128                 talloc_free(mem_ctx);
1129                 return False;
1130         }
1131         
1132         pull = ndr_pull_init_blob(&blob, mem_ctx);
1133         if (pull == NULL) {
1134                 talloc_free(mem_ctx);
1135                 return False;
1136         }
1137         
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);
1142                 return False;
1143         }
1144         
1145         if (DEBUGLEVEL >= 10)
1146                 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r);
1147         
1148         r.out.result = _dfs_SetDcAddress(p, &r);
1149         
1150         if (p->rng_fault_state) {
1151                 talloc_free(mem_ctx);
1152                 /* Return True here, srv_pipe_hnd.c will take care */
1153                 return True;
1154         }
1155         
1156         if (DEBUGLEVEL >= 10)
1157                 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r);
1158         
1159         push = ndr_push_init_ctx(mem_ctx);
1160         if (push == NULL) {
1161                 talloc_free(mem_ctx);
1162                 return False;
1163         }
1164         
1165         status = ndr_push_dfs_SetDcAddress(push, NDR_OUT, &r);
1166         if (NT_STATUS_IS_ERR(status)) {
1167                 talloc_free(mem_ctx);
1168                 return False;
1169         }
1170         
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);
1174                 return False;
1175         }
1176         
1177         talloc_free(mem_ctx);
1178         
1179         return True;
1180 }
1181
1182 static BOOL api_dfs_FlushFtTable(pipes_struct *p)
1183 {
1184         struct ndr_pull *pull;
1185         struct ndr_push *push;
1186         NTSTATUS status;
1187         DATA_BLOB blob;
1188         struct dfs_FlushFtTable r;
1189         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_FlushFtTable");
1190         
1191         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1192                 talloc_free(mem_ctx);
1193                 return False;
1194         }
1195         
1196         pull = ndr_pull_init_blob(&blob, mem_ctx);
1197         if (pull == NULL) {
1198                 talloc_free(mem_ctx);
1199                 return False;
1200         }
1201         
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);
1206                 return False;
1207         }
1208         
1209         if (DEBUGLEVEL >= 10)
1210                 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r);
1211         
1212         r.out.result = _dfs_FlushFtTable(p, &r);
1213         
1214         if (p->rng_fault_state) {
1215                 talloc_free(mem_ctx);
1216                 /* Return True here, srv_pipe_hnd.c will take care */
1217                 return True;
1218         }
1219         
1220         if (DEBUGLEVEL >= 10)
1221                 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r);
1222         
1223         push = ndr_push_init_ctx(mem_ctx);
1224         if (push == NULL) {
1225                 talloc_free(mem_ctx);
1226                 return False;
1227         }
1228         
1229         status = ndr_push_dfs_FlushFtTable(push, NDR_OUT, &r);
1230         if (NT_STATUS_IS_ERR(status)) {
1231                 talloc_free(mem_ctx);
1232                 return False;
1233         }
1234         
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);
1238                 return False;
1239         }
1240         
1241         talloc_free(mem_ctx);
1242         
1243         return True;
1244 }
1245
1246 static BOOL api_dfs_Add2(pipes_struct *p)
1247 {
1248         struct ndr_pull *pull;
1249         struct ndr_push *push;
1250         NTSTATUS status;
1251         DATA_BLOB blob;
1252         struct dfs_Add2 r;
1253         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Add2");
1254         
1255         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1256                 talloc_free(mem_ctx);
1257                 return False;
1258         }
1259         
1260         pull = ndr_pull_init_blob(&blob, mem_ctx);
1261         if (pull == NULL) {
1262                 talloc_free(mem_ctx);
1263                 return False;
1264         }
1265         
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);
1270                 return False;
1271         }
1272         
1273         if (DEBUGLEVEL >= 10)
1274                 NDR_PRINT_IN_DEBUG(dfs_Add2, &r);
1275         
1276         r.out.result = _dfs_Add2(p, &r);
1277         
1278         if (p->rng_fault_state) {
1279                 talloc_free(mem_ctx);
1280                 /* Return True here, srv_pipe_hnd.c will take care */
1281                 return True;
1282         }
1283         
1284         if (DEBUGLEVEL >= 10)
1285                 NDR_PRINT_OUT_DEBUG(dfs_Add2, &r);
1286         
1287         push = ndr_push_init_ctx(mem_ctx);
1288         if (push == NULL) {
1289                 talloc_free(mem_ctx);
1290                 return False;
1291         }
1292         
1293         status = ndr_push_dfs_Add2(push, NDR_OUT, &r);
1294         if (NT_STATUS_IS_ERR(status)) {
1295                 talloc_free(mem_ctx);
1296                 return False;
1297         }
1298         
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);
1302                 return False;
1303         }
1304         
1305         talloc_free(mem_ctx);
1306         
1307         return True;
1308 }
1309
1310 static BOOL api_dfs_Remove2(pipes_struct *p)
1311 {
1312         struct ndr_pull *pull;
1313         struct ndr_push *push;
1314         NTSTATUS status;
1315         DATA_BLOB blob;
1316         struct dfs_Remove2 r;
1317         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_Remove2");
1318         
1319         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1320                 talloc_free(mem_ctx);
1321                 return False;
1322         }
1323         
1324         pull = ndr_pull_init_blob(&blob, mem_ctx);
1325         if (pull == NULL) {
1326                 talloc_free(mem_ctx);
1327                 return False;
1328         }
1329         
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);
1334                 return False;
1335         }
1336         
1337         if (DEBUGLEVEL >= 10)
1338                 NDR_PRINT_IN_DEBUG(dfs_Remove2, &r);
1339         
1340         r.out.result = _dfs_Remove2(p, &r);
1341         
1342         if (p->rng_fault_state) {
1343                 talloc_free(mem_ctx);
1344                 /* Return True here, srv_pipe_hnd.c will take care */
1345                 return True;
1346         }
1347         
1348         if (DEBUGLEVEL >= 10)
1349                 NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r);
1350         
1351         push = ndr_push_init_ctx(mem_ctx);
1352         if (push == NULL) {
1353                 talloc_free(mem_ctx);
1354                 return False;
1355         }
1356         
1357         status = ndr_push_dfs_Remove2(push, NDR_OUT, &r);
1358         if (NT_STATUS_IS_ERR(status)) {
1359                 talloc_free(mem_ctx);
1360                 return False;
1361         }
1362         
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);
1366                 return False;
1367         }
1368         
1369         talloc_free(mem_ctx);
1370         
1371         return True;
1372 }
1373
1374 static BOOL api_dfs_EnumEx(pipes_struct *p)
1375 {
1376         struct ndr_pull *pull;
1377         struct ndr_push *push;
1378         NTSTATUS status;
1379         DATA_BLOB blob;
1380         struct dfs_EnumEx r;
1381         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_EnumEx");
1382         
1383         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1384                 talloc_free(mem_ctx);
1385                 return False;
1386         }
1387         
1388         pull = ndr_pull_init_blob(&blob, mem_ctx);
1389         if (pull == NULL) {
1390                 talloc_free(mem_ctx);
1391                 return False;
1392         }
1393         
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);
1398                 return False;
1399         }
1400         
1401         if (DEBUGLEVEL >= 10)
1402                 NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r);
1403         
1404         ZERO_STRUCT(r.out);
1405         r.out.info = r.in.info;
1406         r.out.total = r.in.total;
1407         r.out.result = _dfs_EnumEx(p, &r);
1408         
1409         if (p->rng_fault_state) {
1410                 talloc_free(mem_ctx);
1411                 /* Return True here, srv_pipe_hnd.c will take care */
1412                 return True;
1413         }
1414         
1415         if (DEBUGLEVEL >= 10)
1416                 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r);
1417         
1418         push = ndr_push_init_ctx(mem_ctx);
1419         if (push == NULL) {
1420                 talloc_free(mem_ctx);
1421                 return False;
1422         }
1423         
1424         status = ndr_push_dfs_EnumEx(push, NDR_OUT, &r);
1425         if (NT_STATUS_IS_ERR(status)) {
1426                 talloc_free(mem_ctx);
1427                 return False;
1428         }
1429         
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);
1433                 return False;
1434         }
1435         
1436         talloc_free(mem_ctx);
1437         
1438         return True;
1439 }
1440
1441 static BOOL api_dfs_SetInfo2(pipes_struct *p)
1442 {
1443         struct ndr_pull *pull;
1444         struct ndr_push *push;
1445         NTSTATUS status;
1446         DATA_BLOB blob;
1447         struct dfs_SetInfo2 r;
1448         TALLOC_CTX *mem_ctx = talloc_init("api_dfs_SetInfo2");
1449         
1450         if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1451                 talloc_free(mem_ctx);
1452                 return False;
1453         }
1454         
1455         pull = ndr_pull_init_blob(&blob, mem_ctx);
1456         if (pull == NULL) {
1457                 talloc_free(mem_ctx);
1458                 return False;
1459         }
1460         
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);
1465                 return False;
1466         }
1467         
1468         if (DEBUGLEVEL >= 10)
1469                 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r);
1470         
1471         r.out.result = _dfs_SetInfo2(p, &r);
1472         
1473         if (p->rng_fault_state) {
1474                 talloc_free(mem_ctx);
1475                 /* Return True here, srv_pipe_hnd.c will take care */
1476                 return True;
1477         }
1478         
1479         if (DEBUGLEVEL >= 10)
1480                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r);
1481         
1482         push = ndr_push_init_ctx(mem_ctx);
1483         if (push == NULL) {
1484                 talloc_free(mem_ctx);
1485                 return False;
1486         }
1487         
1488         status = ndr_push_dfs_SetInfo2(push, NDR_OUT, &r);
1489         if (NT_STATUS_IS_ERR(status)) {
1490                 talloc_free(mem_ctx);
1491                 return False;
1492         }
1493         
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);
1497                 return False;
1498         }
1499         
1500         talloc_free(mem_ctx);
1501         
1502         return True;
1503 }
1504
1505
1506 /* Tables */
1507 static struct api_struct api_netdfs_cmds[] = 
1508 {
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},
1532 };
1533
1534 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns)
1535 {
1536         *fns = api_netdfs_cmds;
1537         *n_fns = sizeof(api_netdfs_cmds) / sizeof(struct api_struct);
1538 }
1539
1540 NTSTATUS rpc_netdfs_init(void)
1541 {
1542         return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct));
1543 }