RIP BOOL. Convert BOOL -> bool. I found a few interesting
[samba.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         const struct ndr_interface_call *call;
12         struct ndr_pull *pull;
13         struct ndr_push *push;
14         NTSTATUS status;
15         DATA_BLOB blob;
16         struct dfs_GetManagerVersion *r;
17         
18         call = &ndr_table_netdfs.calls[NDR_DFS_GETMANAGERVERSION];
19         
20         r = talloc(NULL, struct dfs_GetManagerVersion);
21         if (r == NULL) {
22                 return False;
23         }
24         
25         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26                 talloc_free(r);
27                 return False;
28         }
29         
30         pull = ndr_pull_init_blob(&blob, r);
31         if (pull == NULL) {
32                 talloc_free(r);
33                 return False;
34         }
35         
36         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37         status = call->ndr_pull(pull, NDR_IN, r);
38         if (NT_STATUS_IS_ERR(status)) {
39                 talloc_free(r);
40                 return False;
41         }
42         
43         if (DEBUGLEVEL >= 10)
44                 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, r);
45         
46         ZERO_STRUCT(r->out);
47         r->out.version = talloc_zero(r, enum dfs_ManagerVersion);
48         if (r->out.version == NULL) {
49                 talloc_free(r);
50                 return False;
51         }
52         
53         _dfs_GetManagerVersion(p, r);
54         
55         if (p->rng_fault_state) {
56                 talloc_free(r);
57                 /* Return True here, srv_pipe_hnd.c will take care */
58                 return True;
59         }
60         
61         if (DEBUGLEVEL >= 10)
62                 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, r);
63         
64         push = ndr_push_init_ctx(r);
65         if (push == NULL) {
66                 talloc_free(r);
67                 return False;
68         }
69         
70         status = call->ndr_push(push, NDR_OUT, r);
71         if (NT_STATUS_IS_ERR(status)) {
72                 talloc_free(r);
73                 return False;
74         }
75         
76         blob = ndr_push_blob(push);
77         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
78                 talloc_free(r);
79                 return False;
80         }
81         
82         talloc_free(r);
83         
84         return True;
85 }
86
87 static bool api_dfs_Add(pipes_struct *p)
88 {
89         const struct ndr_interface_call *call;
90         struct ndr_pull *pull;
91         struct ndr_push *push;
92         NTSTATUS status;
93         DATA_BLOB blob;
94         struct dfs_Add *r;
95         
96         call = &ndr_table_netdfs.calls[NDR_DFS_ADD];
97         
98         r = talloc(NULL, struct dfs_Add);
99         if (r == NULL) {
100                 return False;
101         }
102         
103         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
104                 talloc_free(r);
105                 return False;
106         }
107         
108         pull = ndr_pull_init_blob(&blob, r);
109         if (pull == NULL) {
110                 talloc_free(r);
111                 return False;
112         }
113         
114         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
115         status = call->ndr_pull(pull, NDR_IN, r);
116         if (NT_STATUS_IS_ERR(status)) {
117                 talloc_free(r);
118                 return False;
119         }
120         
121         if (DEBUGLEVEL >= 10)
122                 NDR_PRINT_IN_DEBUG(dfs_Add, r);
123         
124         r->out.result = _dfs_Add(p, r);
125         
126         if (p->rng_fault_state) {
127                 talloc_free(r);
128                 /* Return True here, srv_pipe_hnd.c will take care */
129                 return True;
130         }
131         
132         if (DEBUGLEVEL >= 10)
133                 NDR_PRINT_OUT_DEBUG(dfs_Add, r);
134         
135         push = ndr_push_init_ctx(r);
136         if (push == NULL) {
137                 talloc_free(r);
138                 return False;
139         }
140         
141         status = call->ndr_push(push, NDR_OUT, r);
142         if (NT_STATUS_IS_ERR(status)) {
143                 talloc_free(r);
144                 return False;
145         }
146         
147         blob = ndr_push_blob(push);
148         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
149                 talloc_free(r);
150                 return False;
151         }
152         
153         talloc_free(r);
154         
155         return True;
156 }
157
158 static bool api_dfs_Remove(pipes_struct *p)
159 {
160         const struct ndr_interface_call *call;
161         struct ndr_pull *pull;
162         struct ndr_push *push;
163         NTSTATUS status;
164         DATA_BLOB blob;
165         struct dfs_Remove *r;
166         
167         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE];
168         
169         r = talloc(NULL, struct dfs_Remove);
170         if (r == NULL) {
171                 return False;
172         }
173         
174         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
175                 talloc_free(r);
176                 return False;
177         }
178         
179         pull = ndr_pull_init_blob(&blob, r);
180         if (pull == NULL) {
181                 talloc_free(r);
182                 return False;
183         }
184         
185         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
186         status = call->ndr_pull(pull, NDR_IN, r);
187         if (NT_STATUS_IS_ERR(status)) {
188                 talloc_free(r);
189                 return False;
190         }
191         
192         if (DEBUGLEVEL >= 10)
193                 NDR_PRINT_IN_DEBUG(dfs_Remove, r);
194         
195         r->out.result = _dfs_Remove(p, r);
196         
197         if (p->rng_fault_state) {
198                 talloc_free(r);
199                 /* Return True here, srv_pipe_hnd.c will take care */
200                 return True;
201         }
202         
203         if (DEBUGLEVEL >= 10)
204                 NDR_PRINT_OUT_DEBUG(dfs_Remove, r);
205         
206         push = ndr_push_init_ctx(r);
207         if (push == NULL) {
208                 talloc_free(r);
209                 return False;
210         }
211         
212         status = call->ndr_push(push, NDR_OUT, r);
213         if (NT_STATUS_IS_ERR(status)) {
214                 talloc_free(r);
215                 return False;
216         }
217         
218         blob = ndr_push_blob(push);
219         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
220                 talloc_free(r);
221                 return False;
222         }
223         
224         talloc_free(r);
225         
226         return True;
227 }
228
229 static bool api_dfs_SetInfo(pipes_struct *p)
230 {
231         const struct ndr_interface_call *call;
232         struct ndr_pull *pull;
233         struct ndr_push *push;
234         NTSTATUS status;
235         DATA_BLOB blob;
236         struct dfs_SetInfo *r;
237         
238         call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO];
239         
240         r = talloc(NULL, struct dfs_SetInfo);
241         if (r == NULL) {
242                 return False;
243         }
244         
245         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
246                 talloc_free(r);
247                 return False;
248         }
249         
250         pull = ndr_pull_init_blob(&blob, r);
251         if (pull == NULL) {
252                 talloc_free(r);
253                 return False;
254         }
255         
256         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
257         status = call->ndr_pull(pull, NDR_IN, r);
258         if (NT_STATUS_IS_ERR(status)) {
259                 talloc_free(r);
260                 return False;
261         }
262         
263         if (DEBUGLEVEL >= 10)
264                 NDR_PRINT_IN_DEBUG(dfs_SetInfo, r);
265         
266         r->out.result = _dfs_SetInfo(p, r);
267         
268         if (p->rng_fault_state) {
269                 talloc_free(r);
270                 /* Return True here, srv_pipe_hnd.c will take care */
271                 return True;
272         }
273         
274         if (DEBUGLEVEL >= 10)
275                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo, r);
276         
277         push = ndr_push_init_ctx(r);
278         if (push == NULL) {
279                 talloc_free(r);
280                 return False;
281         }
282         
283         status = call->ndr_push(push, NDR_OUT, r);
284         if (NT_STATUS_IS_ERR(status)) {
285                 talloc_free(r);
286                 return False;
287         }
288         
289         blob = ndr_push_blob(push);
290         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
291                 talloc_free(r);
292                 return False;
293         }
294         
295         talloc_free(r);
296         
297         return True;
298 }
299
300 static bool api_dfs_GetInfo(pipes_struct *p)
301 {
302         const struct ndr_interface_call *call;
303         struct ndr_pull *pull;
304         struct ndr_push *push;
305         NTSTATUS status;
306         DATA_BLOB blob;
307         struct dfs_GetInfo *r;
308         
309         call = &ndr_table_netdfs.calls[NDR_DFS_GETINFO];
310         
311         r = talloc(NULL, struct dfs_GetInfo);
312         if (r == NULL) {
313                 return False;
314         }
315         
316         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
317                 talloc_free(r);
318                 return False;
319         }
320         
321         pull = ndr_pull_init_blob(&blob, r);
322         if (pull == NULL) {
323                 talloc_free(r);
324                 return False;
325         }
326         
327         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
328         status = call->ndr_pull(pull, NDR_IN, r);
329         if (NT_STATUS_IS_ERR(status)) {
330                 talloc_free(r);
331                 return False;
332         }
333         
334         if (DEBUGLEVEL >= 10)
335                 NDR_PRINT_IN_DEBUG(dfs_GetInfo, r);
336         
337         ZERO_STRUCT(r->out);
338         r->out.info = talloc_zero(r, union dfs_Info);
339         if (r->out.info == NULL) {
340                 talloc_free(r);
341                 return False;
342         }
343         
344         r->out.result = _dfs_GetInfo(p, r);
345         
346         if (p->rng_fault_state) {
347                 talloc_free(r);
348                 /* Return True here, srv_pipe_hnd.c will take care */
349                 return True;
350         }
351         
352         if (DEBUGLEVEL >= 10)
353                 NDR_PRINT_OUT_DEBUG(dfs_GetInfo, r);
354         
355         push = ndr_push_init_ctx(r);
356         if (push == NULL) {
357                 talloc_free(r);
358                 return False;
359         }
360         
361         status = call->ndr_push(push, NDR_OUT, r);
362         if (NT_STATUS_IS_ERR(status)) {
363                 talloc_free(r);
364                 return False;
365         }
366         
367         blob = ndr_push_blob(push);
368         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
369                 talloc_free(r);
370                 return False;
371         }
372         
373         talloc_free(r);
374         
375         return True;
376 }
377
378 static bool api_dfs_Enum(pipes_struct *p)
379 {
380         const struct ndr_interface_call *call;
381         struct ndr_pull *pull;
382         struct ndr_push *push;
383         NTSTATUS status;
384         DATA_BLOB blob;
385         struct dfs_Enum *r;
386         
387         call = &ndr_table_netdfs.calls[NDR_DFS_ENUM];
388         
389         r = talloc(NULL, struct dfs_Enum);
390         if (r == NULL) {
391                 return False;
392         }
393         
394         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
395                 talloc_free(r);
396                 return False;
397         }
398         
399         pull = ndr_pull_init_blob(&blob, r);
400         if (pull == NULL) {
401                 talloc_free(r);
402                 return False;
403         }
404         
405         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
406         status = call->ndr_pull(pull, NDR_IN, r);
407         if (NT_STATUS_IS_ERR(status)) {
408                 talloc_free(r);
409                 return False;
410         }
411         
412         if (DEBUGLEVEL >= 10)
413                 NDR_PRINT_IN_DEBUG(dfs_Enum, r);
414         
415         ZERO_STRUCT(r->out);
416         r->out.info = r->in.info;
417         r->out.total = r->in.total;
418         r->out.result = _dfs_Enum(p, r);
419         
420         if (p->rng_fault_state) {
421                 talloc_free(r);
422                 /* Return True here, srv_pipe_hnd.c will take care */
423                 return True;
424         }
425         
426         if (DEBUGLEVEL >= 10)
427                 NDR_PRINT_OUT_DEBUG(dfs_Enum, r);
428         
429         push = ndr_push_init_ctx(r);
430         if (push == NULL) {
431                 talloc_free(r);
432                 return False;
433         }
434         
435         status = call->ndr_push(push, NDR_OUT, r);
436         if (NT_STATUS_IS_ERR(status)) {
437                 talloc_free(r);
438                 return False;
439         }
440         
441         blob = ndr_push_blob(push);
442         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
443                 talloc_free(r);
444                 return False;
445         }
446         
447         talloc_free(r);
448         
449         return True;
450 }
451
452 static bool api_dfs_Rename(pipes_struct *p)
453 {
454         const struct ndr_interface_call *call;
455         struct ndr_pull *pull;
456         struct ndr_push *push;
457         NTSTATUS status;
458         DATA_BLOB blob;
459         struct dfs_Rename *r;
460         
461         call = &ndr_table_netdfs.calls[NDR_DFS_RENAME];
462         
463         r = talloc(NULL, struct dfs_Rename);
464         if (r == NULL) {
465                 return False;
466         }
467         
468         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
469                 talloc_free(r);
470                 return False;
471         }
472         
473         pull = ndr_pull_init_blob(&blob, r);
474         if (pull == NULL) {
475                 talloc_free(r);
476                 return False;
477         }
478         
479         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
480         status = call->ndr_pull(pull, NDR_IN, r);
481         if (NT_STATUS_IS_ERR(status)) {
482                 talloc_free(r);
483                 return False;
484         }
485         
486         if (DEBUGLEVEL >= 10)
487                 NDR_PRINT_IN_DEBUG(dfs_Rename, r);
488         
489         r->out.result = _dfs_Rename(p, r);
490         
491         if (p->rng_fault_state) {
492                 talloc_free(r);
493                 /* Return True here, srv_pipe_hnd.c will take care */
494                 return True;
495         }
496         
497         if (DEBUGLEVEL >= 10)
498                 NDR_PRINT_OUT_DEBUG(dfs_Rename, r);
499         
500         push = ndr_push_init_ctx(r);
501         if (push == NULL) {
502                 talloc_free(r);
503                 return False;
504         }
505         
506         status = call->ndr_push(push, NDR_OUT, r);
507         if (NT_STATUS_IS_ERR(status)) {
508                 talloc_free(r);
509                 return False;
510         }
511         
512         blob = ndr_push_blob(push);
513         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
514                 talloc_free(r);
515                 return False;
516         }
517         
518         talloc_free(r);
519         
520         return True;
521 }
522
523 static bool api_dfs_Move(pipes_struct *p)
524 {
525         const struct ndr_interface_call *call;
526         struct ndr_pull *pull;
527         struct ndr_push *push;
528         NTSTATUS status;
529         DATA_BLOB blob;
530         struct dfs_Move *r;
531         
532         call = &ndr_table_netdfs.calls[NDR_DFS_MOVE];
533         
534         r = talloc(NULL, struct dfs_Move);
535         if (r == NULL) {
536                 return False;
537         }
538         
539         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
540                 talloc_free(r);
541                 return False;
542         }
543         
544         pull = ndr_pull_init_blob(&blob, r);
545         if (pull == NULL) {
546                 talloc_free(r);
547                 return False;
548         }
549         
550         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
551         status = call->ndr_pull(pull, NDR_IN, r);
552         if (NT_STATUS_IS_ERR(status)) {
553                 talloc_free(r);
554                 return False;
555         }
556         
557         if (DEBUGLEVEL >= 10)
558                 NDR_PRINT_IN_DEBUG(dfs_Move, r);
559         
560         r->out.result = _dfs_Move(p, r);
561         
562         if (p->rng_fault_state) {
563                 talloc_free(r);
564                 /* Return True here, srv_pipe_hnd.c will take care */
565                 return True;
566         }
567         
568         if (DEBUGLEVEL >= 10)
569                 NDR_PRINT_OUT_DEBUG(dfs_Move, r);
570         
571         push = ndr_push_init_ctx(r);
572         if (push == NULL) {
573                 talloc_free(r);
574                 return False;
575         }
576         
577         status = call->ndr_push(push, NDR_OUT, r);
578         if (NT_STATUS_IS_ERR(status)) {
579                 talloc_free(r);
580                 return False;
581         }
582         
583         blob = ndr_push_blob(push);
584         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
585                 talloc_free(r);
586                 return False;
587         }
588         
589         talloc_free(r);
590         
591         return True;
592 }
593
594 static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p)
595 {
596         const struct ndr_interface_call *call;
597         struct ndr_pull *pull;
598         struct ndr_push *push;
599         NTSTATUS status;
600         DATA_BLOB blob;
601         struct dfs_ManagerGetConfigInfo *r;
602         
603         call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERGETCONFIGINFO];
604         
605         r = talloc(NULL, struct dfs_ManagerGetConfigInfo);
606         if (r == NULL) {
607                 return False;
608         }
609         
610         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
611                 talloc_free(r);
612                 return False;
613         }
614         
615         pull = ndr_pull_init_blob(&blob, r);
616         if (pull == NULL) {
617                 talloc_free(r);
618                 return False;
619         }
620         
621         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
622         status = call->ndr_pull(pull, NDR_IN, r);
623         if (NT_STATUS_IS_ERR(status)) {
624                 talloc_free(r);
625                 return False;
626         }
627         
628         if (DEBUGLEVEL >= 10)
629                 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, r);
630         
631         r->out.result = _dfs_ManagerGetConfigInfo(p, r);
632         
633         if (p->rng_fault_state) {
634                 talloc_free(r);
635                 /* Return True here, srv_pipe_hnd.c will take care */
636                 return True;
637         }
638         
639         if (DEBUGLEVEL >= 10)
640                 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, r);
641         
642         push = ndr_push_init_ctx(r);
643         if (push == NULL) {
644                 talloc_free(r);
645                 return False;
646         }
647         
648         status = call->ndr_push(push, NDR_OUT, r);
649         if (NT_STATUS_IS_ERR(status)) {
650                 talloc_free(r);
651                 return False;
652         }
653         
654         blob = ndr_push_blob(push);
655         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
656                 talloc_free(r);
657                 return False;
658         }
659         
660         talloc_free(r);
661         
662         return True;
663 }
664
665 static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p)
666 {
667         const struct ndr_interface_call *call;
668         struct ndr_pull *pull;
669         struct ndr_push *push;
670         NTSTATUS status;
671         DATA_BLOB blob;
672         struct dfs_ManagerSendSiteInfo *r;
673         
674         call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERSENDSITEINFO];
675         
676         r = talloc(NULL, struct dfs_ManagerSendSiteInfo);
677         if (r == NULL) {
678                 return False;
679         }
680         
681         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
682                 talloc_free(r);
683                 return False;
684         }
685         
686         pull = ndr_pull_init_blob(&blob, r);
687         if (pull == NULL) {
688                 talloc_free(r);
689                 return False;
690         }
691         
692         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
693         status = call->ndr_pull(pull, NDR_IN, r);
694         if (NT_STATUS_IS_ERR(status)) {
695                 talloc_free(r);
696                 return False;
697         }
698         
699         if (DEBUGLEVEL >= 10)
700                 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, r);
701         
702         r->out.result = _dfs_ManagerSendSiteInfo(p, r);
703         
704         if (p->rng_fault_state) {
705                 talloc_free(r);
706                 /* Return True here, srv_pipe_hnd.c will take care */
707                 return True;
708         }
709         
710         if (DEBUGLEVEL >= 10)
711                 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, r);
712         
713         push = ndr_push_init_ctx(r);
714         if (push == NULL) {
715                 talloc_free(r);
716                 return False;
717         }
718         
719         status = call->ndr_push(push, NDR_OUT, r);
720         if (NT_STATUS_IS_ERR(status)) {
721                 talloc_free(r);
722                 return False;
723         }
724         
725         blob = ndr_push_blob(push);
726         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
727                 talloc_free(r);
728                 return False;
729         }
730         
731         talloc_free(r);
732         
733         return True;
734 }
735
736 static bool api_dfs_AddFtRoot(pipes_struct *p)
737 {
738         const struct ndr_interface_call *call;
739         struct ndr_pull *pull;
740         struct ndr_push *push;
741         NTSTATUS status;
742         DATA_BLOB blob;
743         struct dfs_AddFtRoot *r;
744         
745         call = &ndr_table_netdfs.calls[NDR_DFS_ADDFTROOT];
746         
747         r = talloc(NULL, struct dfs_AddFtRoot);
748         if (r == NULL) {
749                 return False;
750         }
751         
752         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
753                 talloc_free(r);
754                 return False;
755         }
756         
757         pull = ndr_pull_init_blob(&blob, r);
758         if (pull == NULL) {
759                 talloc_free(r);
760                 return False;
761         }
762         
763         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
764         status = call->ndr_pull(pull, NDR_IN, r);
765         if (NT_STATUS_IS_ERR(status)) {
766                 talloc_free(r);
767                 return False;
768         }
769         
770         if (DEBUGLEVEL >= 10)
771                 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, r);
772         
773         ZERO_STRUCT(r->out);
774         r->out.unknown2 = r->in.unknown2;
775         r->out.result = _dfs_AddFtRoot(p, r);
776         
777         if (p->rng_fault_state) {
778                 talloc_free(r);
779                 /* Return True here, srv_pipe_hnd.c will take care */
780                 return True;
781         }
782         
783         if (DEBUGLEVEL >= 10)
784                 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, r);
785         
786         push = ndr_push_init_ctx(r);
787         if (push == NULL) {
788                 talloc_free(r);
789                 return False;
790         }
791         
792         status = call->ndr_push(push, NDR_OUT, r);
793         if (NT_STATUS_IS_ERR(status)) {
794                 talloc_free(r);
795                 return False;
796         }
797         
798         blob = ndr_push_blob(push);
799         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
800                 talloc_free(r);
801                 return False;
802         }
803         
804         talloc_free(r);
805         
806         return True;
807 }
808
809 static bool api_dfs_RemoveFtRoot(pipes_struct *p)
810 {
811         const struct ndr_interface_call *call;
812         struct ndr_pull *pull;
813         struct ndr_push *push;
814         NTSTATUS status;
815         DATA_BLOB blob;
816         struct dfs_RemoveFtRoot *r;
817         
818         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVEFTROOT];
819         
820         r = talloc(NULL, struct dfs_RemoveFtRoot);
821         if (r == NULL) {
822                 return False;
823         }
824         
825         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
826                 talloc_free(r);
827                 return False;
828         }
829         
830         pull = ndr_pull_init_blob(&blob, r);
831         if (pull == NULL) {
832                 talloc_free(r);
833                 return False;
834         }
835         
836         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
837         status = call->ndr_pull(pull, NDR_IN, r);
838         if (NT_STATUS_IS_ERR(status)) {
839                 talloc_free(r);
840                 return False;
841         }
842         
843         if (DEBUGLEVEL >= 10)
844                 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, r);
845         
846         ZERO_STRUCT(r->out);
847         r->out.unknown = r->in.unknown;
848         r->out.result = _dfs_RemoveFtRoot(p, r);
849         
850         if (p->rng_fault_state) {
851                 talloc_free(r);
852                 /* Return True here, srv_pipe_hnd.c will take care */
853                 return True;
854         }
855         
856         if (DEBUGLEVEL >= 10)
857                 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, r);
858         
859         push = ndr_push_init_ctx(r);
860         if (push == NULL) {
861                 talloc_free(r);
862                 return False;
863         }
864         
865         status = call->ndr_push(push, NDR_OUT, r);
866         if (NT_STATUS_IS_ERR(status)) {
867                 talloc_free(r);
868                 return False;
869         }
870         
871         blob = ndr_push_blob(push);
872         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
873                 talloc_free(r);
874                 return False;
875         }
876         
877         talloc_free(r);
878         
879         return True;
880 }
881
882 static bool api_dfs_AddStdRoot(pipes_struct *p)
883 {
884         const struct ndr_interface_call *call;
885         struct ndr_pull *pull;
886         struct ndr_push *push;
887         NTSTATUS status;
888         DATA_BLOB blob;
889         struct dfs_AddStdRoot *r;
890         
891         call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOT];
892         
893         r = talloc(NULL, struct dfs_AddStdRoot);
894         if (r == NULL) {
895                 return False;
896         }
897         
898         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
899                 talloc_free(r);
900                 return False;
901         }
902         
903         pull = ndr_pull_init_blob(&blob, r);
904         if (pull == NULL) {
905                 talloc_free(r);
906                 return False;
907         }
908         
909         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
910         status = call->ndr_pull(pull, NDR_IN, r);
911         if (NT_STATUS_IS_ERR(status)) {
912                 talloc_free(r);
913                 return False;
914         }
915         
916         if (DEBUGLEVEL >= 10)
917                 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, r);
918         
919         r->out.result = _dfs_AddStdRoot(p, r);
920         
921         if (p->rng_fault_state) {
922                 talloc_free(r);
923                 /* Return True here, srv_pipe_hnd.c will take care */
924                 return True;
925         }
926         
927         if (DEBUGLEVEL >= 10)
928                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, r);
929         
930         push = ndr_push_init_ctx(r);
931         if (push == NULL) {
932                 talloc_free(r);
933                 return False;
934         }
935         
936         status = call->ndr_push(push, NDR_OUT, r);
937         if (NT_STATUS_IS_ERR(status)) {
938                 talloc_free(r);
939                 return False;
940         }
941         
942         blob = ndr_push_blob(push);
943         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
944                 talloc_free(r);
945                 return False;
946         }
947         
948         talloc_free(r);
949         
950         return True;
951 }
952
953 static bool api_dfs_RemoveStdRoot(pipes_struct *p)
954 {
955         const struct ndr_interface_call *call;
956         struct ndr_pull *pull;
957         struct ndr_push *push;
958         NTSTATUS status;
959         DATA_BLOB blob;
960         struct dfs_RemoveStdRoot *r;
961         
962         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVESTDROOT];
963         
964         r = talloc(NULL, struct dfs_RemoveStdRoot);
965         if (r == NULL) {
966                 return False;
967         }
968         
969         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
970                 talloc_free(r);
971                 return False;
972         }
973         
974         pull = ndr_pull_init_blob(&blob, r);
975         if (pull == NULL) {
976                 talloc_free(r);
977                 return False;
978         }
979         
980         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
981         status = call->ndr_pull(pull, NDR_IN, r);
982         if (NT_STATUS_IS_ERR(status)) {
983                 talloc_free(r);
984                 return False;
985         }
986         
987         if (DEBUGLEVEL >= 10)
988                 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, r);
989         
990         r->out.result = _dfs_RemoveStdRoot(p, r);
991         
992         if (p->rng_fault_state) {
993                 talloc_free(r);
994                 /* Return True here, srv_pipe_hnd.c will take care */
995                 return True;
996         }
997         
998         if (DEBUGLEVEL >= 10)
999                 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, r);
1000         
1001         push = ndr_push_init_ctx(r);
1002         if (push == NULL) {
1003                 talloc_free(r);
1004                 return False;
1005         }
1006         
1007         status = call->ndr_push(push, NDR_OUT, r);
1008         if (NT_STATUS_IS_ERR(status)) {
1009                 talloc_free(r);
1010                 return False;
1011         }
1012         
1013         blob = ndr_push_blob(push);
1014         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1015                 talloc_free(r);
1016                 return False;
1017         }
1018         
1019         talloc_free(r);
1020         
1021         return True;
1022 }
1023
1024 static bool api_dfs_ManagerInitialize(pipes_struct *p)
1025 {
1026         const struct ndr_interface_call *call;
1027         struct ndr_pull *pull;
1028         struct ndr_push *push;
1029         NTSTATUS status;
1030         DATA_BLOB blob;
1031         struct dfs_ManagerInitialize *r;
1032         
1033         call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERINITIALIZE];
1034         
1035         r = talloc(NULL, struct dfs_ManagerInitialize);
1036         if (r == NULL) {
1037                 return False;
1038         }
1039         
1040         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1041                 talloc_free(r);
1042                 return False;
1043         }
1044         
1045         pull = ndr_pull_init_blob(&blob, r);
1046         if (pull == NULL) {
1047                 talloc_free(r);
1048                 return False;
1049         }
1050         
1051         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1052         status = call->ndr_pull(pull, NDR_IN, r);
1053         if (NT_STATUS_IS_ERR(status)) {
1054                 talloc_free(r);
1055                 return False;
1056         }
1057         
1058         if (DEBUGLEVEL >= 10)
1059                 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, r);
1060         
1061         r->out.result = _dfs_ManagerInitialize(p, r);
1062         
1063         if (p->rng_fault_state) {
1064                 talloc_free(r);
1065                 /* Return True here, srv_pipe_hnd.c will take care */
1066                 return True;
1067         }
1068         
1069         if (DEBUGLEVEL >= 10)
1070                 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, r);
1071         
1072         push = ndr_push_init_ctx(r);
1073         if (push == NULL) {
1074                 talloc_free(r);
1075                 return False;
1076         }
1077         
1078         status = call->ndr_push(push, NDR_OUT, r);
1079         if (NT_STATUS_IS_ERR(status)) {
1080                 talloc_free(r);
1081                 return False;
1082         }
1083         
1084         blob = ndr_push_blob(push);
1085         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1086                 talloc_free(r);
1087                 return False;
1088         }
1089         
1090         talloc_free(r);
1091         
1092         return True;
1093 }
1094
1095 static bool api_dfs_AddStdRootForced(pipes_struct *p)
1096 {
1097         const struct ndr_interface_call *call;
1098         struct ndr_pull *pull;
1099         struct ndr_push *push;
1100         NTSTATUS status;
1101         DATA_BLOB blob;
1102         struct dfs_AddStdRootForced *r;
1103         
1104         call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOTFORCED];
1105         
1106         r = talloc(NULL, struct dfs_AddStdRootForced);
1107         if (r == NULL) {
1108                 return False;
1109         }
1110         
1111         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1112                 talloc_free(r);
1113                 return False;
1114         }
1115         
1116         pull = ndr_pull_init_blob(&blob, r);
1117         if (pull == NULL) {
1118                 talloc_free(r);
1119                 return False;
1120         }
1121         
1122         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1123         status = call->ndr_pull(pull, NDR_IN, r);
1124         if (NT_STATUS_IS_ERR(status)) {
1125                 talloc_free(r);
1126                 return False;
1127         }
1128         
1129         if (DEBUGLEVEL >= 10)
1130                 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, r);
1131         
1132         r->out.result = _dfs_AddStdRootForced(p, r);
1133         
1134         if (p->rng_fault_state) {
1135                 talloc_free(r);
1136                 /* Return True here, srv_pipe_hnd.c will take care */
1137                 return True;
1138         }
1139         
1140         if (DEBUGLEVEL >= 10)
1141                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, r);
1142         
1143         push = ndr_push_init_ctx(r);
1144         if (push == NULL) {
1145                 talloc_free(r);
1146                 return False;
1147         }
1148         
1149         status = call->ndr_push(push, NDR_OUT, r);
1150         if (NT_STATUS_IS_ERR(status)) {
1151                 talloc_free(r);
1152                 return False;
1153         }
1154         
1155         blob = ndr_push_blob(push);
1156         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1157                 talloc_free(r);
1158                 return False;
1159         }
1160         
1161         talloc_free(r);
1162         
1163         return True;
1164 }
1165
1166 static bool api_dfs_GetDcAddress(pipes_struct *p)
1167 {
1168         const struct ndr_interface_call *call;
1169         struct ndr_pull *pull;
1170         struct ndr_push *push;
1171         NTSTATUS status;
1172         DATA_BLOB blob;
1173         struct dfs_GetDcAddress *r;
1174         
1175         call = &ndr_table_netdfs.calls[NDR_DFS_GETDCADDRESS];
1176         
1177         r = talloc(NULL, struct dfs_GetDcAddress);
1178         if (r == NULL) {
1179                 return False;
1180         }
1181         
1182         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1183                 talloc_free(r);
1184                 return False;
1185         }
1186         
1187         pull = ndr_pull_init_blob(&blob, r);
1188         if (pull == NULL) {
1189                 talloc_free(r);
1190                 return False;
1191         }
1192         
1193         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1194         status = call->ndr_pull(pull, NDR_IN, r);
1195         if (NT_STATUS_IS_ERR(status)) {
1196                 talloc_free(r);
1197                 return False;
1198         }
1199         
1200         if (DEBUGLEVEL >= 10)
1201                 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, r);
1202         
1203         r->out.result = _dfs_GetDcAddress(p, r);
1204         
1205         if (p->rng_fault_state) {
1206                 talloc_free(r);
1207                 /* Return True here, srv_pipe_hnd.c will take care */
1208                 return True;
1209         }
1210         
1211         if (DEBUGLEVEL >= 10)
1212                 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, r);
1213         
1214         push = ndr_push_init_ctx(r);
1215         if (push == NULL) {
1216                 talloc_free(r);
1217                 return False;
1218         }
1219         
1220         status = call->ndr_push(push, NDR_OUT, r);
1221         if (NT_STATUS_IS_ERR(status)) {
1222                 talloc_free(r);
1223                 return False;
1224         }
1225         
1226         blob = ndr_push_blob(push);
1227         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1228                 talloc_free(r);
1229                 return False;
1230         }
1231         
1232         talloc_free(r);
1233         
1234         return True;
1235 }
1236
1237 static bool api_dfs_SetDcAddress(pipes_struct *p)
1238 {
1239         const struct ndr_interface_call *call;
1240         struct ndr_pull *pull;
1241         struct ndr_push *push;
1242         NTSTATUS status;
1243         DATA_BLOB blob;
1244         struct dfs_SetDcAddress *r;
1245         
1246         call = &ndr_table_netdfs.calls[NDR_DFS_SETDCADDRESS];
1247         
1248         r = talloc(NULL, struct dfs_SetDcAddress);
1249         if (r == NULL) {
1250                 return False;
1251         }
1252         
1253         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1254                 talloc_free(r);
1255                 return False;
1256         }
1257         
1258         pull = ndr_pull_init_blob(&blob, r);
1259         if (pull == NULL) {
1260                 talloc_free(r);
1261                 return False;
1262         }
1263         
1264         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1265         status = call->ndr_pull(pull, NDR_IN, r);
1266         if (NT_STATUS_IS_ERR(status)) {
1267                 talloc_free(r);
1268                 return False;
1269         }
1270         
1271         if (DEBUGLEVEL >= 10)
1272                 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, r);
1273         
1274         r->out.result = _dfs_SetDcAddress(p, r);
1275         
1276         if (p->rng_fault_state) {
1277                 talloc_free(r);
1278                 /* Return True here, srv_pipe_hnd.c will take care */
1279                 return True;
1280         }
1281         
1282         if (DEBUGLEVEL >= 10)
1283                 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, r);
1284         
1285         push = ndr_push_init_ctx(r);
1286         if (push == NULL) {
1287                 talloc_free(r);
1288                 return False;
1289         }
1290         
1291         status = call->ndr_push(push, NDR_OUT, r);
1292         if (NT_STATUS_IS_ERR(status)) {
1293                 talloc_free(r);
1294                 return False;
1295         }
1296         
1297         blob = ndr_push_blob(push);
1298         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1299                 talloc_free(r);
1300                 return False;
1301         }
1302         
1303         talloc_free(r);
1304         
1305         return True;
1306 }
1307
1308 static bool api_dfs_FlushFtTable(pipes_struct *p)
1309 {
1310         const struct ndr_interface_call *call;
1311         struct ndr_pull *pull;
1312         struct ndr_push *push;
1313         NTSTATUS status;
1314         DATA_BLOB blob;
1315         struct dfs_FlushFtTable *r;
1316         
1317         call = &ndr_table_netdfs.calls[NDR_DFS_FLUSHFTTABLE];
1318         
1319         r = talloc(NULL, struct dfs_FlushFtTable);
1320         if (r == NULL) {
1321                 return False;
1322         }
1323         
1324         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1325                 talloc_free(r);
1326                 return False;
1327         }
1328         
1329         pull = ndr_pull_init_blob(&blob, r);
1330         if (pull == NULL) {
1331                 talloc_free(r);
1332                 return False;
1333         }
1334         
1335         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1336         status = call->ndr_pull(pull, NDR_IN, r);
1337         if (NT_STATUS_IS_ERR(status)) {
1338                 talloc_free(r);
1339                 return False;
1340         }
1341         
1342         if (DEBUGLEVEL >= 10)
1343                 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, r);
1344         
1345         r->out.result = _dfs_FlushFtTable(p, r);
1346         
1347         if (p->rng_fault_state) {
1348                 talloc_free(r);
1349                 /* Return True here, srv_pipe_hnd.c will take care */
1350                 return True;
1351         }
1352         
1353         if (DEBUGLEVEL >= 10)
1354                 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, r);
1355         
1356         push = ndr_push_init_ctx(r);
1357         if (push == NULL) {
1358                 talloc_free(r);
1359                 return False;
1360         }
1361         
1362         status = call->ndr_push(push, NDR_OUT, r);
1363         if (NT_STATUS_IS_ERR(status)) {
1364                 talloc_free(r);
1365                 return False;
1366         }
1367         
1368         blob = ndr_push_blob(push);
1369         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1370                 talloc_free(r);
1371                 return False;
1372         }
1373         
1374         talloc_free(r);
1375         
1376         return True;
1377 }
1378
1379 static bool api_dfs_Add2(pipes_struct *p)
1380 {
1381         const struct ndr_interface_call *call;
1382         struct ndr_pull *pull;
1383         struct ndr_push *push;
1384         NTSTATUS status;
1385         DATA_BLOB blob;
1386         struct dfs_Add2 *r;
1387         
1388         call = &ndr_table_netdfs.calls[NDR_DFS_ADD2];
1389         
1390         r = talloc(NULL, struct dfs_Add2);
1391         if (r == NULL) {
1392                 return False;
1393         }
1394         
1395         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1396                 talloc_free(r);
1397                 return False;
1398         }
1399         
1400         pull = ndr_pull_init_blob(&blob, r);
1401         if (pull == NULL) {
1402                 talloc_free(r);
1403                 return False;
1404         }
1405         
1406         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1407         status = call->ndr_pull(pull, NDR_IN, r);
1408         if (NT_STATUS_IS_ERR(status)) {
1409                 talloc_free(r);
1410                 return False;
1411         }
1412         
1413         if (DEBUGLEVEL >= 10)
1414                 NDR_PRINT_IN_DEBUG(dfs_Add2, r);
1415         
1416         r->out.result = _dfs_Add2(p, r);
1417         
1418         if (p->rng_fault_state) {
1419                 talloc_free(r);
1420                 /* Return True here, srv_pipe_hnd.c will take care */
1421                 return True;
1422         }
1423         
1424         if (DEBUGLEVEL >= 10)
1425                 NDR_PRINT_OUT_DEBUG(dfs_Add2, r);
1426         
1427         push = ndr_push_init_ctx(r);
1428         if (push == NULL) {
1429                 talloc_free(r);
1430                 return False;
1431         }
1432         
1433         status = call->ndr_push(push, NDR_OUT, r);
1434         if (NT_STATUS_IS_ERR(status)) {
1435                 talloc_free(r);
1436                 return False;
1437         }
1438         
1439         blob = ndr_push_blob(push);
1440         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1441                 talloc_free(r);
1442                 return False;
1443         }
1444         
1445         talloc_free(r);
1446         
1447         return True;
1448 }
1449
1450 static bool api_dfs_Remove2(pipes_struct *p)
1451 {
1452         const struct ndr_interface_call *call;
1453         struct ndr_pull *pull;
1454         struct ndr_push *push;
1455         NTSTATUS status;
1456         DATA_BLOB blob;
1457         struct dfs_Remove2 *r;
1458         
1459         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE2];
1460         
1461         r = talloc(NULL, struct dfs_Remove2);
1462         if (r == NULL) {
1463                 return False;
1464         }
1465         
1466         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1467                 talloc_free(r);
1468                 return False;
1469         }
1470         
1471         pull = ndr_pull_init_blob(&blob, r);
1472         if (pull == NULL) {
1473                 talloc_free(r);
1474                 return False;
1475         }
1476         
1477         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1478         status = call->ndr_pull(pull, NDR_IN, r);
1479         if (NT_STATUS_IS_ERR(status)) {
1480                 talloc_free(r);
1481                 return False;
1482         }
1483         
1484         if (DEBUGLEVEL >= 10)
1485                 NDR_PRINT_IN_DEBUG(dfs_Remove2, r);
1486         
1487         r->out.result = _dfs_Remove2(p, r);
1488         
1489         if (p->rng_fault_state) {
1490                 talloc_free(r);
1491                 /* Return True here, srv_pipe_hnd.c will take care */
1492                 return True;
1493         }
1494         
1495         if (DEBUGLEVEL >= 10)
1496                 NDR_PRINT_OUT_DEBUG(dfs_Remove2, r);
1497         
1498         push = ndr_push_init_ctx(r);
1499         if (push == NULL) {
1500                 talloc_free(r);
1501                 return False;
1502         }
1503         
1504         status = call->ndr_push(push, NDR_OUT, r);
1505         if (NT_STATUS_IS_ERR(status)) {
1506                 talloc_free(r);
1507                 return False;
1508         }
1509         
1510         blob = ndr_push_blob(push);
1511         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1512                 talloc_free(r);
1513                 return False;
1514         }
1515         
1516         talloc_free(r);
1517         
1518         return True;
1519 }
1520
1521 static bool api_dfs_EnumEx(pipes_struct *p)
1522 {
1523         const struct ndr_interface_call *call;
1524         struct ndr_pull *pull;
1525         struct ndr_push *push;
1526         NTSTATUS status;
1527         DATA_BLOB blob;
1528         struct dfs_EnumEx *r;
1529         
1530         call = &ndr_table_netdfs.calls[NDR_DFS_ENUMEX];
1531         
1532         r = talloc(NULL, struct dfs_EnumEx);
1533         if (r == NULL) {
1534                 return False;
1535         }
1536         
1537         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1538                 talloc_free(r);
1539                 return False;
1540         }
1541         
1542         pull = ndr_pull_init_blob(&blob, r);
1543         if (pull == NULL) {
1544                 talloc_free(r);
1545                 return False;
1546         }
1547         
1548         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1549         status = call->ndr_pull(pull, NDR_IN, r);
1550         if (NT_STATUS_IS_ERR(status)) {
1551                 talloc_free(r);
1552                 return False;
1553         }
1554         
1555         if (DEBUGLEVEL >= 10)
1556                 NDR_PRINT_IN_DEBUG(dfs_EnumEx, r);
1557         
1558         ZERO_STRUCT(r->out);
1559         r->out.info = r->in.info;
1560         r->out.total = r->in.total;
1561         r->out.result = _dfs_EnumEx(p, r);
1562         
1563         if (p->rng_fault_state) {
1564                 talloc_free(r);
1565                 /* Return True here, srv_pipe_hnd.c will take care */
1566                 return True;
1567         }
1568         
1569         if (DEBUGLEVEL >= 10)
1570                 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, r);
1571         
1572         push = ndr_push_init_ctx(r);
1573         if (push == NULL) {
1574                 talloc_free(r);
1575                 return False;
1576         }
1577         
1578         status = call->ndr_push(push, NDR_OUT, r);
1579         if (NT_STATUS_IS_ERR(status)) {
1580                 talloc_free(r);
1581                 return False;
1582         }
1583         
1584         blob = ndr_push_blob(push);
1585         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1586                 talloc_free(r);
1587                 return False;
1588         }
1589         
1590         talloc_free(r);
1591         
1592         return True;
1593 }
1594
1595 static bool api_dfs_SetInfo2(pipes_struct *p)
1596 {
1597         const struct ndr_interface_call *call;
1598         struct ndr_pull *pull;
1599         struct ndr_push *push;
1600         NTSTATUS status;
1601         DATA_BLOB blob;
1602         struct dfs_SetInfo2 *r;
1603         
1604         call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO2];
1605         
1606         r = talloc(NULL, struct dfs_SetInfo2);
1607         if (r == NULL) {
1608                 return False;
1609         }
1610         
1611         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1612                 talloc_free(r);
1613                 return False;
1614         }
1615         
1616         pull = ndr_pull_init_blob(&blob, r);
1617         if (pull == NULL) {
1618                 talloc_free(r);
1619                 return False;
1620         }
1621         
1622         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1623         status = call->ndr_pull(pull, NDR_IN, r);
1624         if (NT_STATUS_IS_ERR(status)) {
1625                 talloc_free(r);
1626                 return False;
1627         }
1628         
1629         if (DEBUGLEVEL >= 10)
1630                 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, r);
1631         
1632         r->out.result = _dfs_SetInfo2(p, r);
1633         
1634         if (p->rng_fault_state) {
1635                 talloc_free(r);
1636                 /* Return True here, srv_pipe_hnd.c will take care */
1637                 return True;
1638         }
1639         
1640         if (DEBUGLEVEL >= 10)
1641                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, r);
1642         
1643         push = ndr_push_init_ctx(r);
1644         if (push == NULL) {
1645                 talloc_free(r);
1646                 return False;
1647         }
1648         
1649         status = call->ndr_push(push, NDR_OUT, r);
1650         if (NT_STATUS_IS_ERR(status)) {
1651                 talloc_free(r);
1652                 return False;
1653         }
1654         
1655         blob = ndr_push_blob(push);
1656         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1657                 talloc_free(r);
1658                 return False;
1659         }
1660         
1661         talloc_free(r);
1662         
1663         return True;
1664 }
1665
1666
1667 /* Tables */
1668 static struct api_struct api_netdfs_cmds[] = 
1669 {
1670         {"DFS_GETMANAGERVERSION", NDR_DFS_GETMANAGERVERSION, api_dfs_GetManagerVersion},
1671         {"DFS_ADD", NDR_DFS_ADD, api_dfs_Add},
1672         {"DFS_REMOVE", NDR_DFS_REMOVE, api_dfs_Remove},
1673         {"DFS_SETINFO", NDR_DFS_SETINFO, api_dfs_SetInfo},
1674         {"DFS_GETINFO", NDR_DFS_GETINFO, api_dfs_GetInfo},
1675         {"DFS_ENUM", NDR_DFS_ENUM, api_dfs_Enum},
1676         {"DFS_RENAME", NDR_DFS_RENAME, api_dfs_Rename},
1677         {"DFS_MOVE", NDR_DFS_MOVE, api_dfs_Move},
1678         {"DFS_MANAGERGETCONFIGINFO", NDR_DFS_MANAGERGETCONFIGINFO, api_dfs_ManagerGetConfigInfo},
1679         {"DFS_MANAGERSENDSITEINFO", NDR_DFS_MANAGERSENDSITEINFO, api_dfs_ManagerSendSiteInfo},
1680         {"DFS_ADDFTROOT", NDR_DFS_ADDFTROOT, api_dfs_AddFtRoot},
1681         {"DFS_REMOVEFTROOT", NDR_DFS_REMOVEFTROOT, api_dfs_RemoveFtRoot},
1682         {"DFS_ADDSTDROOT", NDR_DFS_ADDSTDROOT, api_dfs_AddStdRoot},
1683         {"DFS_REMOVESTDROOT", NDR_DFS_REMOVESTDROOT, api_dfs_RemoveStdRoot},
1684         {"DFS_MANAGERINITIALIZE", NDR_DFS_MANAGERINITIALIZE, api_dfs_ManagerInitialize},
1685         {"DFS_ADDSTDROOTFORCED", NDR_DFS_ADDSTDROOTFORCED, api_dfs_AddStdRootForced},
1686         {"DFS_GETDCADDRESS", NDR_DFS_GETDCADDRESS, api_dfs_GetDcAddress},
1687         {"DFS_SETDCADDRESS", NDR_DFS_SETDCADDRESS, api_dfs_SetDcAddress},
1688         {"DFS_FLUSHFTTABLE", NDR_DFS_FLUSHFTTABLE, api_dfs_FlushFtTable},
1689         {"DFS_ADD2", NDR_DFS_ADD2, api_dfs_Add2},
1690         {"DFS_REMOVE2", NDR_DFS_REMOVE2, api_dfs_Remove2},
1691         {"DFS_ENUMEX", NDR_DFS_ENUMEX, api_dfs_EnumEx},
1692         {"DFS_SETINFO2", NDR_DFS_SETINFO2, api_dfs_SetInfo2},
1693 };
1694
1695 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns)
1696 {
1697         *fns = api_netdfs_cmds;
1698         *n_fns = sizeof(api_netdfs_cmds) / sizeof(struct api_struct);
1699 }
1700
1701 NTSTATUS rpc_netdfs_init(void)
1702 {
1703         return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct));
1704 }