RIP BOOL. Convert BOOL -> bool. I found a few interesting
[samba.git] / source3 / librpc / gen_ndr / srv_netlogon.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_netlogon.h"
8
9 static bool api_netr_LogonUasLogon(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 netr_LogonUasLogon *r;
17         
18         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONUASLOGON];
19         
20         r = talloc(NULL, struct netr_LogonUasLogon);
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(netr_LogonUasLogon, r);
45         
46         ZERO_STRUCT(r->out);
47         r->out.info = talloc_zero(r, struct netr_UasInfo);
48         if (r->out.info == NULL) {
49                 talloc_free(r);
50                 return False;
51         }
52         
53         r->out.result = _netr_LogonUasLogon(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(netr_LogonUasLogon, 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_netr_LogonUasLogoff(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 netr_LogonUasLogoff *r;
95         
96         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONUASLOGOFF];
97         
98         r = talloc(NULL, struct netr_LogonUasLogoff);
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(netr_LogonUasLogoff, r);
123         
124         ZERO_STRUCT(r->out);
125         r->out.info = talloc_zero(r, struct netr_UasLogoffInfo);
126         if (r->out.info == NULL) {
127                 talloc_free(r);
128                 return False;
129         }
130         
131         r->out.result = _netr_LogonUasLogoff(p, r);
132         
133         if (p->rng_fault_state) {
134                 talloc_free(r);
135                 /* Return True here, srv_pipe_hnd.c will take care */
136                 return True;
137         }
138         
139         if (DEBUGLEVEL >= 10)
140                 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, r);
141         
142         push = ndr_push_init_ctx(r);
143         if (push == NULL) {
144                 talloc_free(r);
145                 return False;
146         }
147         
148         status = call->ndr_push(push, NDR_OUT, r);
149         if (NT_STATUS_IS_ERR(status)) {
150                 talloc_free(r);
151                 return False;
152         }
153         
154         blob = ndr_push_blob(push);
155         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
156                 talloc_free(r);
157                 return False;
158         }
159         
160         talloc_free(r);
161         
162         return True;
163 }
164
165 static bool api_netr_LogonSamLogon(pipes_struct *p)
166 {
167         const struct ndr_interface_call *call;
168         struct ndr_pull *pull;
169         struct ndr_push *push;
170         NTSTATUS status;
171         DATA_BLOB blob;
172         struct netr_LogonSamLogon *r;
173         
174         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGON];
175         
176         r = talloc(NULL, struct netr_LogonSamLogon);
177         if (r == NULL) {
178                 return False;
179         }
180         
181         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
182                 talloc_free(r);
183                 return False;
184         }
185         
186         pull = ndr_pull_init_blob(&blob, r);
187         if (pull == NULL) {
188                 talloc_free(r);
189                 return False;
190         }
191         
192         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
193         status = call->ndr_pull(pull, NDR_IN, r);
194         if (NT_STATUS_IS_ERR(status)) {
195                 talloc_free(r);
196                 return False;
197         }
198         
199         if (DEBUGLEVEL >= 10)
200                 NDR_PRINT_IN_DEBUG(netr_LogonSamLogon, r);
201         
202         ZERO_STRUCT(r->out);
203         r->out.return_authenticator = r->in.return_authenticator;
204         r->out.validation = talloc_zero(r, union netr_Validation);
205         if (r->out.validation == NULL) {
206                 talloc_free(r);
207                 return False;
208         }
209         
210         r->out.authoritative = talloc_zero(r, uint8_t);
211         if (r->out.authoritative == NULL) {
212                 talloc_free(r);
213                 return False;
214         }
215         
216         r->out.result = _netr_LogonSamLogon(p, r);
217         
218         if (p->rng_fault_state) {
219                 talloc_free(r);
220                 /* Return True here, srv_pipe_hnd.c will take care */
221                 return True;
222         }
223         
224         if (DEBUGLEVEL >= 10)
225                 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, r);
226         
227         push = ndr_push_init_ctx(r);
228         if (push == NULL) {
229                 talloc_free(r);
230                 return False;
231         }
232         
233         status = call->ndr_push(push, NDR_OUT, r);
234         if (NT_STATUS_IS_ERR(status)) {
235                 talloc_free(r);
236                 return False;
237         }
238         
239         blob = ndr_push_blob(push);
240         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
241                 talloc_free(r);
242                 return False;
243         }
244         
245         talloc_free(r);
246         
247         return True;
248 }
249
250 static bool api_netr_LogonSamLogoff(pipes_struct *p)
251 {
252         const struct ndr_interface_call *call;
253         struct ndr_pull *pull;
254         struct ndr_push *push;
255         NTSTATUS status;
256         DATA_BLOB blob;
257         struct netr_LogonSamLogoff *r;
258         
259         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGOFF];
260         
261         r = talloc(NULL, struct netr_LogonSamLogoff);
262         if (r == NULL) {
263                 return False;
264         }
265         
266         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
267                 talloc_free(r);
268                 return False;
269         }
270         
271         pull = ndr_pull_init_blob(&blob, r);
272         if (pull == NULL) {
273                 talloc_free(r);
274                 return False;
275         }
276         
277         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
278         status = call->ndr_pull(pull, NDR_IN, r);
279         if (NT_STATUS_IS_ERR(status)) {
280                 talloc_free(r);
281                 return False;
282         }
283         
284         if (DEBUGLEVEL >= 10)
285                 NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff, r);
286         
287         ZERO_STRUCT(r->out);
288         r->out.return_authenticator = r->in.return_authenticator;
289         r->out.result = _netr_LogonSamLogoff(p, r);
290         
291         if (p->rng_fault_state) {
292                 talloc_free(r);
293                 /* Return True here, srv_pipe_hnd.c will take care */
294                 return True;
295         }
296         
297         if (DEBUGLEVEL >= 10)
298                 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, r);
299         
300         push = ndr_push_init_ctx(r);
301         if (push == NULL) {
302                 talloc_free(r);
303                 return False;
304         }
305         
306         status = call->ndr_push(push, NDR_OUT, r);
307         if (NT_STATUS_IS_ERR(status)) {
308                 talloc_free(r);
309                 return False;
310         }
311         
312         blob = ndr_push_blob(push);
313         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
314                 talloc_free(r);
315                 return False;
316         }
317         
318         talloc_free(r);
319         
320         return True;
321 }
322
323 static bool api_netr_ServerReqChallenge(pipes_struct *p)
324 {
325         const struct ndr_interface_call *call;
326         struct ndr_pull *pull;
327         struct ndr_push *push;
328         NTSTATUS status;
329         DATA_BLOB blob;
330         struct netr_ServerReqChallenge *r;
331         
332         call = &ndr_table_netlogon.calls[NDR_NETR_SERVERREQCHALLENGE];
333         
334         r = talloc(NULL, struct netr_ServerReqChallenge);
335         if (r == NULL) {
336                 return False;
337         }
338         
339         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
340                 talloc_free(r);
341                 return False;
342         }
343         
344         pull = ndr_pull_init_blob(&blob, r);
345         if (pull == NULL) {
346                 talloc_free(r);
347                 return False;
348         }
349         
350         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
351         status = call->ndr_pull(pull, NDR_IN, r);
352         if (NT_STATUS_IS_ERR(status)) {
353                 talloc_free(r);
354                 return False;
355         }
356         
357         if (DEBUGLEVEL >= 10)
358                 NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge, r);
359         
360         ZERO_STRUCT(r->out);
361         r->out.credentials = r->in.credentials;
362         r->out.result = _netr_ServerReqChallenge(p, r);
363         
364         if (p->rng_fault_state) {
365                 talloc_free(r);
366                 /* Return True here, srv_pipe_hnd.c will take care */
367                 return True;
368         }
369         
370         if (DEBUGLEVEL >= 10)
371                 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, r);
372         
373         push = ndr_push_init_ctx(r);
374         if (push == NULL) {
375                 talloc_free(r);
376                 return False;
377         }
378         
379         status = call->ndr_push(push, NDR_OUT, r);
380         if (NT_STATUS_IS_ERR(status)) {
381                 talloc_free(r);
382                 return False;
383         }
384         
385         blob = ndr_push_blob(push);
386         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
387                 talloc_free(r);
388                 return False;
389         }
390         
391         talloc_free(r);
392         
393         return True;
394 }
395
396 static bool api_netr_ServerAuthenticate(pipes_struct *p)
397 {
398         const struct ndr_interface_call *call;
399         struct ndr_pull *pull;
400         struct ndr_push *push;
401         NTSTATUS status;
402         DATA_BLOB blob;
403         struct netr_ServerAuthenticate *r;
404         
405         call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE];
406         
407         r = talloc(NULL, struct netr_ServerAuthenticate);
408         if (r == NULL) {
409                 return False;
410         }
411         
412         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
413                 talloc_free(r);
414                 return False;
415         }
416         
417         pull = ndr_pull_init_blob(&blob, r);
418         if (pull == NULL) {
419                 talloc_free(r);
420                 return False;
421         }
422         
423         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
424         status = call->ndr_pull(pull, NDR_IN, r);
425         if (NT_STATUS_IS_ERR(status)) {
426                 talloc_free(r);
427                 return False;
428         }
429         
430         if (DEBUGLEVEL >= 10)
431                 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate, r);
432         
433         ZERO_STRUCT(r->out);
434         r->out.credentials = r->in.credentials;
435         r->out.result = _netr_ServerAuthenticate(p, r);
436         
437         if (p->rng_fault_state) {
438                 talloc_free(r);
439                 /* Return True here, srv_pipe_hnd.c will take care */
440                 return True;
441         }
442         
443         if (DEBUGLEVEL >= 10)
444                 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, r);
445         
446         push = ndr_push_init_ctx(r);
447         if (push == NULL) {
448                 talloc_free(r);
449                 return False;
450         }
451         
452         status = call->ndr_push(push, NDR_OUT, r);
453         if (NT_STATUS_IS_ERR(status)) {
454                 talloc_free(r);
455                 return False;
456         }
457         
458         blob = ndr_push_blob(push);
459         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
460                 talloc_free(r);
461                 return False;
462         }
463         
464         talloc_free(r);
465         
466         return True;
467 }
468
469 static bool api_netr_ServerPasswordSet(pipes_struct *p)
470 {
471         const struct ndr_interface_call *call;
472         struct ndr_pull *pull;
473         struct ndr_push *push;
474         NTSTATUS status;
475         DATA_BLOB blob;
476         struct netr_ServerPasswordSet *r;
477         
478         call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDSET];
479         
480         r = talloc(NULL, struct netr_ServerPasswordSet);
481         if (r == NULL) {
482                 return False;
483         }
484         
485         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
486                 talloc_free(r);
487                 return False;
488         }
489         
490         pull = ndr_pull_init_blob(&blob, r);
491         if (pull == NULL) {
492                 talloc_free(r);
493                 return False;
494         }
495         
496         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
497         status = call->ndr_pull(pull, NDR_IN, r);
498         if (NT_STATUS_IS_ERR(status)) {
499                 talloc_free(r);
500                 return False;
501         }
502         
503         if (DEBUGLEVEL >= 10)
504                 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, r);
505         
506         ZERO_STRUCT(r->out);
507         r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator);
508         if (r->out.return_authenticator == NULL) {
509                 talloc_free(r);
510                 return False;
511         }
512         
513         r->out.result = _netr_ServerPasswordSet(p, r);
514         
515         if (p->rng_fault_state) {
516                 talloc_free(r);
517                 /* Return True here, srv_pipe_hnd.c will take care */
518                 return True;
519         }
520         
521         if (DEBUGLEVEL >= 10)
522                 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, r);
523         
524         push = ndr_push_init_ctx(r);
525         if (push == NULL) {
526                 talloc_free(r);
527                 return False;
528         }
529         
530         status = call->ndr_push(push, NDR_OUT, r);
531         if (NT_STATUS_IS_ERR(status)) {
532                 talloc_free(r);
533                 return False;
534         }
535         
536         blob = ndr_push_blob(push);
537         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
538                 talloc_free(r);
539                 return False;
540         }
541         
542         talloc_free(r);
543         
544         return True;
545 }
546
547 static bool api_netr_DatabaseDeltas(pipes_struct *p)
548 {
549         const struct ndr_interface_call *call;
550         struct ndr_pull *pull;
551         struct ndr_push *push;
552         NTSTATUS status;
553         DATA_BLOB blob;
554         struct netr_DatabaseDeltas *r;
555         
556         call = &ndr_table_netlogon.calls[NDR_NETR_DATABASEDELTAS];
557         
558         r = talloc(NULL, struct netr_DatabaseDeltas);
559         if (r == NULL) {
560                 return False;
561         }
562         
563         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
564                 talloc_free(r);
565                 return False;
566         }
567         
568         pull = ndr_pull_init_blob(&blob, r);
569         if (pull == NULL) {
570                 talloc_free(r);
571                 return False;
572         }
573         
574         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
575         status = call->ndr_pull(pull, NDR_IN, r);
576         if (NT_STATUS_IS_ERR(status)) {
577                 talloc_free(r);
578                 return False;
579         }
580         
581         if (DEBUGLEVEL >= 10)
582                 NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas, r);
583         
584         ZERO_STRUCT(r->out);
585         r->out.return_authenticator = r->in.return_authenticator;
586         r->out.sequence_num = r->in.sequence_num;
587         r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
588         if (r->out.delta_enum_array == NULL) {
589                 talloc_free(r);
590                 return False;
591         }
592         
593         r->out.result = _netr_DatabaseDeltas(p, r);
594         
595         if (p->rng_fault_state) {
596                 talloc_free(r);
597                 /* Return True here, srv_pipe_hnd.c will take care */
598                 return True;
599         }
600         
601         if (DEBUGLEVEL >= 10)
602                 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, r);
603         
604         push = ndr_push_init_ctx(r);
605         if (push == NULL) {
606                 talloc_free(r);
607                 return False;
608         }
609         
610         status = call->ndr_push(push, NDR_OUT, r);
611         if (NT_STATUS_IS_ERR(status)) {
612                 talloc_free(r);
613                 return False;
614         }
615         
616         blob = ndr_push_blob(push);
617         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
618                 talloc_free(r);
619                 return False;
620         }
621         
622         talloc_free(r);
623         
624         return True;
625 }
626
627 static bool api_netr_DatabaseSync(pipes_struct *p)
628 {
629         const struct ndr_interface_call *call;
630         struct ndr_pull *pull;
631         struct ndr_push *push;
632         NTSTATUS status;
633         DATA_BLOB blob;
634         struct netr_DatabaseSync *r;
635         
636         call = &ndr_table_netlogon.calls[NDR_NETR_DATABASESYNC];
637         
638         r = talloc(NULL, struct netr_DatabaseSync);
639         if (r == NULL) {
640                 return False;
641         }
642         
643         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
644                 talloc_free(r);
645                 return False;
646         }
647         
648         pull = ndr_pull_init_blob(&blob, r);
649         if (pull == NULL) {
650                 talloc_free(r);
651                 return False;
652         }
653         
654         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
655         status = call->ndr_pull(pull, NDR_IN, r);
656         if (NT_STATUS_IS_ERR(status)) {
657                 talloc_free(r);
658                 return False;
659         }
660         
661         if (DEBUGLEVEL >= 10)
662                 NDR_PRINT_IN_DEBUG(netr_DatabaseSync, r);
663         
664         ZERO_STRUCT(r->out);
665         r->out.return_authenticator = r->in.return_authenticator;
666         r->out.sync_context = r->in.sync_context;
667         r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
668         if (r->out.delta_enum_array == NULL) {
669                 talloc_free(r);
670                 return False;
671         }
672         
673         r->out.result = _netr_DatabaseSync(p, r);
674         
675         if (p->rng_fault_state) {
676                 talloc_free(r);
677                 /* Return True here, srv_pipe_hnd.c will take care */
678                 return True;
679         }
680         
681         if (DEBUGLEVEL >= 10)
682                 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, r);
683         
684         push = ndr_push_init_ctx(r);
685         if (push == NULL) {
686                 talloc_free(r);
687                 return False;
688         }
689         
690         status = call->ndr_push(push, NDR_OUT, r);
691         if (NT_STATUS_IS_ERR(status)) {
692                 talloc_free(r);
693                 return False;
694         }
695         
696         blob = ndr_push_blob(push);
697         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
698                 talloc_free(r);
699                 return False;
700         }
701         
702         talloc_free(r);
703         
704         return True;
705 }
706
707 static bool api_netr_AccountDeltas(pipes_struct *p)
708 {
709         const struct ndr_interface_call *call;
710         struct ndr_pull *pull;
711         struct ndr_push *push;
712         NTSTATUS status;
713         DATA_BLOB blob;
714         struct netr_AccountDeltas *r;
715         
716         call = &ndr_table_netlogon.calls[NDR_NETR_ACCOUNTDELTAS];
717         
718         r = talloc(NULL, struct netr_AccountDeltas);
719         if (r == NULL) {
720                 return False;
721         }
722         
723         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
724                 talloc_free(r);
725                 return False;
726         }
727         
728         pull = ndr_pull_init_blob(&blob, r);
729         if (pull == NULL) {
730                 talloc_free(r);
731                 return False;
732         }
733         
734         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
735         status = call->ndr_pull(pull, NDR_IN, r);
736         if (NT_STATUS_IS_ERR(status)) {
737                 talloc_free(r);
738                 return False;
739         }
740         
741         if (DEBUGLEVEL >= 10)
742                 NDR_PRINT_IN_DEBUG(netr_AccountDeltas, r);
743         
744         ZERO_STRUCT(r->out);
745         r->out.return_authenticator = r->in.return_authenticator;
746         r->out.buffer = talloc_zero(r, struct netr_AccountBuffer);
747         if (r->out.buffer == NULL) {
748                 talloc_free(r);
749                 return False;
750         }
751         
752         r->out.count_returned = talloc_zero(r, uint32_t);
753         if (r->out.count_returned == NULL) {
754                 talloc_free(r);
755                 return False;
756         }
757         
758         r->out.total_entries = talloc_zero(r, uint32_t);
759         if (r->out.total_entries == NULL) {
760                 talloc_free(r);
761                 return False;
762         }
763         
764         r->out.recordid = talloc_zero(r, struct netr_UAS_INFO_0);
765         if (r->out.recordid == NULL) {
766                 talloc_free(r);
767                 return False;
768         }
769         
770         r->out.result = _netr_AccountDeltas(p, r);
771         
772         if (p->rng_fault_state) {
773                 talloc_free(r);
774                 /* Return True here, srv_pipe_hnd.c will take care */
775                 return True;
776         }
777         
778         if (DEBUGLEVEL >= 10)
779                 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, r);
780         
781         push = ndr_push_init_ctx(r);
782         if (push == NULL) {
783                 talloc_free(r);
784                 return False;
785         }
786         
787         status = call->ndr_push(push, NDR_OUT, r);
788         if (NT_STATUS_IS_ERR(status)) {
789                 talloc_free(r);
790                 return False;
791         }
792         
793         blob = ndr_push_blob(push);
794         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
795                 talloc_free(r);
796                 return False;
797         }
798         
799         talloc_free(r);
800         
801         return True;
802 }
803
804 static bool api_netr_AccountSync(pipes_struct *p)
805 {
806         const struct ndr_interface_call *call;
807         struct ndr_pull *pull;
808         struct ndr_push *push;
809         NTSTATUS status;
810         DATA_BLOB blob;
811         struct netr_AccountSync *r;
812         
813         call = &ndr_table_netlogon.calls[NDR_NETR_ACCOUNTSYNC];
814         
815         r = talloc(NULL, struct netr_AccountSync);
816         if (r == NULL) {
817                 return False;
818         }
819         
820         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
821                 talloc_free(r);
822                 return False;
823         }
824         
825         pull = ndr_pull_init_blob(&blob, r);
826         if (pull == NULL) {
827                 talloc_free(r);
828                 return False;
829         }
830         
831         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
832         status = call->ndr_pull(pull, NDR_IN, r);
833         if (NT_STATUS_IS_ERR(status)) {
834                 talloc_free(r);
835                 return False;
836         }
837         
838         if (DEBUGLEVEL >= 10)
839                 NDR_PRINT_IN_DEBUG(netr_AccountSync, r);
840         
841         ZERO_STRUCT(r->out);
842         r->out.return_authenticator = r->in.return_authenticator;
843         r->out.buffer = talloc_zero(r, struct netr_AccountBuffer);
844         if (r->out.buffer == NULL) {
845                 talloc_free(r);
846                 return False;
847         }
848         
849         r->out.count_returned = talloc_zero(r, uint32_t);
850         if (r->out.count_returned == NULL) {
851                 talloc_free(r);
852                 return False;
853         }
854         
855         r->out.total_entries = talloc_zero(r, uint32_t);
856         if (r->out.total_entries == NULL) {
857                 talloc_free(r);
858                 return False;
859         }
860         
861         r->out.next_reference = talloc_zero(r, uint32_t);
862         if (r->out.next_reference == NULL) {
863                 talloc_free(r);
864                 return False;
865         }
866         
867         r->out.recordid = r->in.recordid;
868         r->out.result = _netr_AccountSync(p, r);
869         
870         if (p->rng_fault_state) {
871                 talloc_free(r);
872                 /* Return True here, srv_pipe_hnd.c will take care */
873                 return True;
874         }
875         
876         if (DEBUGLEVEL >= 10)
877                 NDR_PRINT_OUT_DEBUG(netr_AccountSync, r);
878         
879         push = ndr_push_init_ctx(r);
880         if (push == NULL) {
881                 talloc_free(r);
882                 return False;
883         }
884         
885         status = call->ndr_push(push, NDR_OUT, r);
886         if (NT_STATUS_IS_ERR(status)) {
887                 talloc_free(r);
888                 return False;
889         }
890         
891         blob = ndr_push_blob(push);
892         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
893                 talloc_free(r);
894                 return False;
895         }
896         
897         talloc_free(r);
898         
899         return True;
900 }
901
902 static bool api_netr_GetDcName(pipes_struct *p)
903 {
904         const struct ndr_interface_call *call;
905         struct ndr_pull *pull;
906         struct ndr_push *push;
907         NTSTATUS status;
908         DATA_BLOB blob;
909         struct netr_GetDcName *r;
910         
911         call = &ndr_table_netlogon.calls[NDR_NETR_GETDCNAME];
912         
913         r = talloc(NULL, struct netr_GetDcName);
914         if (r == NULL) {
915                 return False;
916         }
917         
918         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
919                 talloc_free(r);
920                 return False;
921         }
922         
923         pull = ndr_pull_init_blob(&blob, r);
924         if (pull == NULL) {
925                 talloc_free(r);
926                 return False;
927         }
928         
929         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
930         status = call->ndr_pull(pull, NDR_IN, r);
931         if (NT_STATUS_IS_ERR(status)) {
932                 talloc_free(r);
933                 return False;
934         }
935         
936         if (DEBUGLEVEL >= 10)
937                 NDR_PRINT_IN_DEBUG(netr_GetDcName, r);
938         
939         ZERO_STRUCT(r->out);
940         r->out.dcname = talloc_zero(r, const char *);
941         if (r->out.dcname == NULL) {
942                 talloc_free(r);
943                 return False;
944         }
945         
946         r->out.result = _netr_GetDcName(p, r);
947         
948         if (p->rng_fault_state) {
949                 talloc_free(r);
950                 /* Return True here, srv_pipe_hnd.c will take care */
951                 return True;
952         }
953         
954         if (DEBUGLEVEL >= 10)
955                 NDR_PRINT_OUT_DEBUG(netr_GetDcName, r);
956         
957         push = ndr_push_init_ctx(r);
958         if (push == NULL) {
959                 talloc_free(r);
960                 return False;
961         }
962         
963         status = call->ndr_push(push, NDR_OUT, r);
964         if (NT_STATUS_IS_ERR(status)) {
965                 talloc_free(r);
966                 return False;
967         }
968         
969         blob = ndr_push_blob(push);
970         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
971                 talloc_free(r);
972                 return False;
973         }
974         
975         talloc_free(r);
976         
977         return True;
978 }
979
980 static bool api_netr_LogonControl(pipes_struct *p)
981 {
982         const struct ndr_interface_call *call;
983         struct ndr_pull *pull;
984         struct ndr_push *push;
985         NTSTATUS status;
986         DATA_BLOB blob;
987         struct netr_LogonControl *r;
988         
989         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL];
990         
991         r = talloc(NULL, struct netr_LogonControl);
992         if (r == NULL) {
993                 return False;
994         }
995         
996         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
997                 talloc_free(r);
998                 return False;
999         }
1000         
1001         pull = ndr_pull_init_blob(&blob, r);
1002         if (pull == NULL) {
1003                 talloc_free(r);
1004                 return False;
1005         }
1006         
1007         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1008         status = call->ndr_pull(pull, NDR_IN, r);
1009         if (NT_STATUS_IS_ERR(status)) {
1010                 talloc_free(r);
1011                 return False;
1012         }
1013         
1014         if (DEBUGLEVEL >= 10)
1015                 NDR_PRINT_IN_DEBUG(netr_LogonControl, r);
1016         
1017         ZERO_STRUCT(r->out);
1018         r->out.info = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION);
1019         if (r->out.info == NULL) {
1020                 talloc_free(r);
1021                 return False;
1022         }
1023         
1024         r->out.result = _netr_LogonControl(p, r);
1025         
1026         if (p->rng_fault_state) {
1027                 talloc_free(r);
1028                 /* Return True here, srv_pipe_hnd.c will take care */
1029                 return True;
1030         }
1031         
1032         if (DEBUGLEVEL >= 10)
1033                 NDR_PRINT_OUT_DEBUG(netr_LogonControl, r);
1034         
1035         push = ndr_push_init_ctx(r);
1036         if (push == NULL) {
1037                 talloc_free(r);
1038                 return False;
1039         }
1040         
1041         status = call->ndr_push(push, NDR_OUT, r);
1042         if (NT_STATUS_IS_ERR(status)) {
1043                 talloc_free(r);
1044                 return False;
1045         }
1046         
1047         blob = ndr_push_blob(push);
1048         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1049                 talloc_free(r);
1050                 return False;
1051         }
1052         
1053         talloc_free(r);
1054         
1055         return True;
1056 }
1057
1058 static bool api_netr_GetAnyDCName(pipes_struct *p)
1059 {
1060         const struct ndr_interface_call *call;
1061         struct ndr_pull *pull;
1062         struct ndr_push *push;
1063         NTSTATUS status;
1064         DATA_BLOB blob;
1065         struct netr_GetAnyDCName *r;
1066         
1067         call = &ndr_table_netlogon.calls[NDR_NETR_GETANYDCNAME];
1068         
1069         r = talloc(NULL, struct netr_GetAnyDCName);
1070         if (r == NULL) {
1071                 return False;
1072         }
1073         
1074         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1075                 talloc_free(r);
1076                 return False;
1077         }
1078         
1079         pull = ndr_pull_init_blob(&blob, r);
1080         if (pull == NULL) {
1081                 talloc_free(r);
1082                 return False;
1083         }
1084         
1085         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1086         status = call->ndr_pull(pull, NDR_IN, r);
1087         if (NT_STATUS_IS_ERR(status)) {
1088                 talloc_free(r);
1089                 return False;
1090         }
1091         
1092         if (DEBUGLEVEL >= 10)
1093                 NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, r);
1094         
1095         ZERO_STRUCT(r->out);
1096         r->out.dcname = talloc_zero(r, const char *);
1097         if (r->out.dcname == NULL) {
1098                 talloc_free(r);
1099                 return False;
1100         }
1101         
1102         r->out.result = _netr_GetAnyDCName(p, r);
1103         
1104         if (p->rng_fault_state) {
1105                 talloc_free(r);
1106                 /* Return True here, srv_pipe_hnd.c will take care */
1107                 return True;
1108         }
1109         
1110         if (DEBUGLEVEL >= 10)
1111                 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, r);
1112         
1113         push = ndr_push_init_ctx(r);
1114         if (push == NULL) {
1115                 talloc_free(r);
1116                 return False;
1117         }
1118         
1119         status = call->ndr_push(push, NDR_OUT, r);
1120         if (NT_STATUS_IS_ERR(status)) {
1121                 talloc_free(r);
1122                 return False;
1123         }
1124         
1125         blob = ndr_push_blob(push);
1126         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1127                 talloc_free(r);
1128                 return False;
1129         }
1130         
1131         talloc_free(r);
1132         
1133         return True;
1134 }
1135
1136 static bool api_netr_LogonControl2(pipes_struct *p)
1137 {
1138         const struct ndr_interface_call *call;
1139         struct ndr_pull *pull;
1140         struct ndr_push *push;
1141         NTSTATUS status;
1142         DATA_BLOB blob;
1143         struct netr_LogonControl2 *r;
1144         
1145         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL2];
1146         
1147         r = talloc(NULL, struct netr_LogonControl2);
1148         if (r == NULL) {
1149                 return False;
1150         }
1151         
1152         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1153                 talloc_free(r);
1154                 return False;
1155         }
1156         
1157         pull = ndr_pull_init_blob(&blob, r);
1158         if (pull == NULL) {
1159                 talloc_free(r);
1160                 return False;
1161         }
1162         
1163         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1164         status = call->ndr_pull(pull, NDR_IN, r);
1165         if (NT_STATUS_IS_ERR(status)) {
1166                 talloc_free(r);
1167                 return False;
1168         }
1169         
1170         if (DEBUGLEVEL >= 10)
1171                 NDR_PRINT_IN_DEBUG(netr_LogonControl2, r);
1172         
1173         ZERO_STRUCT(r->out);
1174         r->out.query = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION);
1175         if (r->out.query == NULL) {
1176                 talloc_free(r);
1177                 return False;
1178         }
1179         
1180         r->out.result = _netr_LogonControl2(p, r);
1181         
1182         if (p->rng_fault_state) {
1183                 talloc_free(r);
1184                 /* Return True here, srv_pipe_hnd.c will take care */
1185                 return True;
1186         }
1187         
1188         if (DEBUGLEVEL >= 10)
1189                 NDR_PRINT_OUT_DEBUG(netr_LogonControl2, r);
1190         
1191         push = ndr_push_init_ctx(r);
1192         if (push == NULL) {
1193                 talloc_free(r);
1194                 return False;
1195         }
1196         
1197         status = call->ndr_push(push, NDR_OUT, r);
1198         if (NT_STATUS_IS_ERR(status)) {
1199                 talloc_free(r);
1200                 return False;
1201         }
1202         
1203         blob = ndr_push_blob(push);
1204         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1205                 talloc_free(r);
1206                 return False;
1207         }
1208         
1209         talloc_free(r);
1210         
1211         return True;
1212 }
1213
1214 static bool api_netr_ServerAuthenticate2(pipes_struct *p)
1215 {
1216         const struct ndr_interface_call *call;
1217         struct ndr_pull *pull;
1218         struct ndr_push *push;
1219         NTSTATUS status;
1220         DATA_BLOB blob;
1221         struct netr_ServerAuthenticate2 *r;
1222         
1223         call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE2];
1224         
1225         r = talloc(NULL, struct netr_ServerAuthenticate2);
1226         if (r == NULL) {
1227                 return False;
1228         }
1229         
1230         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1231                 talloc_free(r);
1232                 return False;
1233         }
1234         
1235         pull = ndr_pull_init_blob(&blob, r);
1236         if (pull == NULL) {
1237                 talloc_free(r);
1238                 return False;
1239         }
1240         
1241         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1242         status = call->ndr_pull(pull, NDR_IN, r);
1243         if (NT_STATUS_IS_ERR(status)) {
1244                 talloc_free(r);
1245                 return False;
1246         }
1247         
1248         if (DEBUGLEVEL >= 10)
1249                 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2, r);
1250         
1251         ZERO_STRUCT(r->out);
1252         r->out.credentials = r->in.credentials;
1253         r->out.negotiate_flags = r->in.negotiate_flags;
1254         r->out.result = _netr_ServerAuthenticate2(p, r);
1255         
1256         if (p->rng_fault_state) {
1257                 talloc_free(r);
1258                 /* Return True here, srv_pipe_hnd.c will take care */
1259                 return True;
1260         }
1261         
1262         if (DEBUGLEVEL >= 10)
1263                 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, r);
1264         
1265         push = ndr_push_init_ctx(r);
1266         if (push == NULL) {
1267                 talloc_free(r);
1268                 return False;
1269         }
1270         
1271         status = call->ndr_push(push, NDR_OUT, r);
1272         if (NT_STATUS_IS_ERR(status)) {
1273                 talloc_free(r);
1274                 return False;
1275         }
1276         
1277         blob = ndr_push_blob(push);
1278         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1279                 talloc_free(r);
1280                 return False;
1281         }
1282         
1283         talloc_free(r);
1284         
1285         return True;
1286 }
1287
1288 static bool api_netr_DatabaseSync2(pipes_struct *p)
1289 {
1290         const struct ndr_interface_call *call;
1291         struct ndr_pull *pull;
1292         struct ndr_push *push;
1293         NTSTATUS status;
1294         DATA_BLOB blob;
1295         struct netr_DatabaseSync2 *r;
1296         
1297         call = &ndr_table_netlogon.calls[NDR_NETR_DATABASESYNC2];
1298         
1299         r = talloc(NULL, struct netr_DatabaseSync2);
1300         if (r == NULL) {
1301                 return False;
1302         }
1303         
1304         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1305                 talloc_free(r);
1306                 return False;
1307         }
1308         
1309         pull = ndr_pull_init_blob(&blob, r);
1310         if (pull == NULL) {
1311                 talloc_free(r);
1312                 return False;
1313         }
1314         
1315         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1316         status = call->ndr_pull(pull, NDR_IN, r);
1317         if (NT_STATUS_IS_ERR(status)) {
1318                 talloc_free(r);
1319                 return False;
1320         }
1321         
1322         if (DEBUGLEVEL >= 10)
1323                 NDR_PRINT_IN_DEBUG(netr_DatabaseSync2, r);
1324         
1325         ZERO_STRUCT(r->out);
1326         r->out.return_authenticator = r->in.return_authenticator;
1327         r->out.sync_context = r->in.sync_context;
1328         r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
1329         if (r->out.delta_enum_array == NULL) {
1330                 talloc_free(r);
1331                 return False;
1332         }
1333         
1334         r->out.result = _netr_DatabaseSync2(p, r);
1335         
1336         if (p->rng_fault_state) {
1337                 talloc_free(r);
1338                 /* Return True here, srv_pipe_hnd.c will take care */
1339                 return True;
1340         }
1341         
1342         if (DEBUGLEVEL >= 10)
1343                 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, r);
1344         
1345         push = ndr_push_init_ctx(r);
1346         if (push == NULL) {
1347                 talloc_free(r);
1348                 return False;
1349         }
1350         
1351         status = call->ndr_push(push, NDR_OUT, r);
1352         if (NT_STATUS_IS_ERR(status)) {
1353                 talloc_free(r);
1354                 return False;
1355         }
1356         
1357         blob = ndr_push_blob(push);
1358         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1359                 talloc_free(r);
1360                 return False;
1361         }
1362         
1363         talloc_free(r);
1364         
1365         return True;
1366 }
1367
1368 static bool api_netr_DatabaseRedo(pipes_struct *p)
1369 {
1370         const struct ndr_interface_call *call;
1371         struct ndr_pull *pull;
1372         struct ndr_push *push;
1373         NTSTATUS status;
1374         DATA_BLOB blob;
1375         struct netr_DatabaseRedo *r;
1376         
1377         call = &ndr_table_netlogon.calls[NDR_NETR_DATABASEREDO];
1378         
1379         r = talloc(NULL, struct netr_DatabaseRedo);
1380         if (r == NULL) {
1381                 return False;
1382         }
1383         
1384         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1385                 talloc_free(r);
1386                 return False;
1387         }
1388         
1389         pull = ndr_pull_init_blob(&blob, r);
1390         if (pull == NULL) {
1391                 talloc_free(r);
1392                 return False;
1393         }
1394         
1395         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1396         status = call->ndr_pull(pull, NDR_IN, r);
1397         if (NT_STATUS_IS_ERR(status)) {
1398                 talloc_free(r);
1399                 return False;
1400         }
1401         
1402         if (DEBUGLEVEL >= 10)
1403                 NDR_PRINT_IN_DEBUG(netr_DatabaseRedo, r);
1404         
1405         ZERO_STRUCT(r->out);
1406         r->out.return_authenticator = r->in.return_authenticator;
1407         r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
1408         if (r->out.delta_enum_array == NULL) {
1409                 talloc_free(r);
1410                 return False;
1411         }
1412         
1413         r->out.result = _netr_DatabaseRedo(p, r);
1414         
1415         if (p->rng_fault_state) {
1416                 talloc_free(r);
1417                 /* Return True here, srv_pipe_hnd.c will take care */
1418                 return True;
1419         }
1420         
1421         if (DEBUGLEVEL >= 10)
1422                 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, r);
1423         
1424         push = ndr_push_init_ctx(r);
1425         if (push == NULL) {
1426                 talloc_free(r);
1427                 return False;
1428         }
1429         
1430         status = call->ndr_push(push, NDR_OUT, r);
1431         if (NT_STATUS_IS_ERR(status)) {
1432                 talloc_free(r);
1433                 return False;
1434         }
1435         
1436         blob = ndr_push_blob(push);
1437         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1438                 talloc_free(r);
1439                 return False;
1440         }
1441         
1442         talloc_free(r);
1443         
1444         return True;
1445 }
1446
1447 static bool api_netr_LogonControl2Ex(pipes_struct *p)
1448 {
1449         const struct ndr_interface_call *call;
1450         struct ndr_pull *pull;
1451         struct ndr_push *push;
1452         NTSTATUS status;
1453         DATA_BLOB blob;
1454         struct netr_LogonControl2Ex *r;
1455         
1456         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL2EX];
1457         
1458         r = talloc(NULL, struct netr_LogonControl2Ex);
1459         if (r == NULL) {
1460                 return False;
1461         }
1462         
1463         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1464                 talloc_free(r);
1465                 return False;
1466         }
1467         
1468         pull = ndr_pull_init_blob(&blob, r);
1469         if (pull == NULL) {
1470                 talloc_free(r);
1471                 return False;
1472         }
1473         
1474         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1475         status = call->ndr_pull(pull, NDR_IN, r);
1476         if (NT_STATUS_IS_ERR(status)) {
1477                 talloc_free(r);
1478                 return False;
1479         }
1480         
1481         if (DEBUGLEVEL >= 10)
1482                 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, r);
1483         
1484         ZERO_STRUCT(r->out);
1485         r->out.query = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION);
1486         if (r->out.query == NULL) {
1487                 talloc_free(r);
1488                 return False;
1489         }
1490         
1491         r->out.result = _netr_LogonControl2Ex(p, r);
1492         
1493         if (p->rng_fault_state) {
1494                 talloc_free(r);
1495                 /* Return True here, srv_pipe_hnd.c will take care */
1496                 return True;
1497         }
1498         
1499         if (DEBUGLEVEL >= 10)
1500                 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, r);
1501         
1502         push = ndr_push_init_ctx(r);
1503         if (push == NULL) {
1504                 talloc_free(r);
1505                 return False;
1506         }
1507         
1508         status = call->ndr_push(push, NDR_OUT, r);
1509         if (NT_STATUS_IS_ERR(status)) {
1510                 talloc_free(r);
1511                 return False;
1512         }
1513         
1514         blob = ndr_push_blob(push);
1515         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1516                 talloc_free(r);
1517                 return False;
1518         }
1519         
1520         talloc_free(r);
1521         
1522         return True;
1523 }
1524
1525 static bool api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct *p)
1526 {
1527         const struct ndr_interface_call *call;
1528         struct ndr_pull *pull;
1529         struct ndr_push *push;
1530         NTSTATUS status;
1531         DATA_BLOB blob;
1532         struct netr_NETRENUMERATETRUSTEDDOMAINS *r;
1533         
1534         call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINS];
1535         
1536         r = talloc(NULL, struct netr_NETRENUMERATETRUSTEDDOMAINS);
1537         if (r == NULL) {
1538                 return False;
1539         }
1540         
1541         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1542                 talloc_free(r);
1543                 return False;
1544         }
1545         
1546         pull = ndr_pull_init_blob(&blob, r);
1547         if (pull == NULL) {
1548                 talloc_free(r);
1549                 return False;
1550         }
1551         
1552         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1553         status = call->ndr_pull(pull, NDR_IN, r);
1554         if (NT_STATUS_IS_ERR(status)) {
1555                 talloc_free(r);
1556                 return False;
1557         }
1558         
1559         if (DEBUGLEVEL >= 10)
1560                 NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS, r);
1561         
1562         r->out.result = _netr_NETRENUMERATETRUSTEDDOMAINS(p, r);
1563         
1564         if (p->rng_fault_state) {
1565                 talloc_free(r);
1566                 /* Return True here, srv_pipe_hnd.c will take care */
1567                 return True;
1568         }
1569         
1570         if (DEBUGLEVEL >= 10)
1571                 NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS, r);
1572         
1573         push = ndr_push_init_ctx(r);
1574         if (push == NULL) {
1575                 talloc_free(r);
1576                 return False;
1577         }
1578         
1579         status = call->ndr_push(push, NDR_OUT, r);
1580         if (NT_STATUS_IS_ERR(status)) {
1581                 talloc_free(r);
1582                 return False;
1583         }
1584         
1585         blob = ndr_push_blob(push);
1586         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1587                 talloc_free(r);
1588                 return False;
1589         }
1590         
1591         talloc_free(r);
1592         
1593         return True;
1594 }
1595
1596 static bool api_netr_DsRGetDCName(pipes_struct *p)
1597 {
1598         const struct ndr_interface_call *call;
1599         struct ndr_pull *pull;
1600         struct ndr_push *push;
1601         NTSTATUS status;
1602         DATA_BLOB blob;
1603         struct netr_DsRGetDCName *r;
1604         
1605         call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAME];
1606         
1607         r = talloc(NULL, struct netr_DsRGetDCName);
1608         if (r == NULL) {
1609                 return False;
1610         }
1611         
1612         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1613                 talloc_free(r);
1614                 return False;
1615         }
1616         
1617         pull = ndr_pull_init_blob(&blob, r);
1618         if (pull == NULL) {
1619                 talloc_free(r);
1620                 return False;
1621         }
1622         
1623         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1624         status = call->ndr_pull(pull, NDR_IN, r);
1625         if (NT_STATUS_IS_ERR(status)) {
1626                 talloc_free(r);
1627                 return False;
1628         }
1629         
1630         if (DEBUGLEVEL >= 10)
1631                 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, r);
1632         
1633         ZERO_STRUCT(r->out);
1634         r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo);
1635         if (r->out.info == NULL) {
1636                 talloc_free(r);
1637                 return False;
1638         }
1639         
1640         r->out.result = _netr_DsRGetDCName(p, r);
1641         
1642         if (p->rng_fault_state) {
1643                 talloc_free(r);
1644                 /* Return True here, srv_pipe_hnd.c will take care */
1645                 return True;
1646         }
1647         
1648         if (DEBUGLEVEL >= 10)
1649                 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, r);
1650         
1651         push = ndr_push_init_ctx(r);
1652         if (push == NULL) {
1653                 talloc_free(r);
1654                 return False;
1655         }
1656         
1657         status = call->ndr_push(push, NDR_OUT, r);
1658         if (NT_STATUS_IS_ERR(status)) {
1659                 talloc_free(r);
1660                 return False;
1661         }
1662         
1663         blob = ndr_push_blob(push);
1664         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1665                 talloc_free(r);
1666                 return False;
1667         }
1668         
1669         talloc_free(r);
1670         
1671         return True;
1672 }
1673
1674 static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
1675 {
1676         const struct ndr_interface_call *call;
1677         struct ndr_pull *pull;
1678         struct ndr_push *push;
1679         NTSTATUS status;
1680         DATA_BLOB blob;
1681         struct netr_NETRLOGONDUMMYROUTINE1 *r;
1682         
1683         call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONDUMMYROUTINE1];
1684         
1685         r = talloc(NULL, struct netr_NETRLOGONDUMMYROUTINE1);
1686         if (r == NULL) {
1687                 return False;
1688         }
1689         
1690         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1691                 talloc_free(r);
1692                 return False;
1693         }
1694         
1695         pull = ndr_pull_init_blob(&blob, r);
1696         if (pull == NULL) {
1697                 talloc_free(r);
1698                 return False;
1699         }
1700         
1701         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1702         status = call->ndr_pull(pull, NDR_IN, r);
1703         if (NT_STATUS_IS_ERR(status)) {
1704                 talloc_free(r);
1705                 return False;
1706         }
1707         
1708         if (DEBUGLEVEL >= 10)
1709                 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
1710         
1711         r->out.result = _netr_NETRLOGONDUMMYROUTINE1(p, r);
1712         
1713         if (p->rng_fault_state) {
1714                 talloc_free(r);
1715                 /* Return True here, srv_pipe_hnd.c will take care */
1716                 return True;
1717         }
1718         
1719         if (DEBUGLEVEL >= 10)
1720                 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
1721         
1722         push = ndr_push_init_ctx(r);
1723         if (push == NULL) {
1724                 talloc_free(r);
1725                 return False;
1726         }
1727         
1728         status = call->ndr_push(push, NDR_OUT, r);
1729         if (NT_STATUS_IS_ERR(status)) {
1730                 talloc_free(r);
1731                 return False;
1732         }
1733         
1734         blob = ndr_push_blob(push);
1735         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1736                 talloc_free(r);
1737                 return False;
1738         }
1739         
1740         talloc_free(r);
1741         
1742         return True;
1743 }
1744
1745 static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p)
1746 {
1747         const struct ndr_interface_call *call;
1748         struct ndr_pull *pull;
1749         struct ndr_push *push;
1750         NTSTATUS status;
1751         DATA_BLOB blob;
1752         struct netr_NETRLOGONSETSERVICEBITS *r;
1753         
1754         call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONSETSERVICEBITS];
1755         
1756         r = talloc(NULL, struct netr_NETRLOGONSETSERVICEBITS);
1757         if (r == NULL) {
1758                 return False;
1759         }
1760         
1761         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1762                 talloc_free(r);
1763                 return False;
1764         }
1765         
1766         pull = ndr_pull_init_blob(&blob, r);
1767         if (pull == NULL) {
1768                 talloc_free(r);
1769                 return False;
1770         }
1771         
1772         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1773         status = call->ndr_pull(pull, NDR_IN, r);
1774         if (NT_STATUS_IS_ERR(status)) {
1775                 talloc_free(r);
1776                 return False;
1777         }
1778         
1779         if (DEBUGLEVEL >= 10)
1780                 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, r);
1781         
1782         r->out.result = _netr_NETRLOGONSETSERVICEBITS(p, r);
1783         
1784         if (p->rng_fault_state) {
1785                 talloc_free(r);
1786                 /* Return True here, srv_pipe_hnd.c will take care */
1787                 return True;
1788         }
1789         
1790         if (DEBUGLEVEL >= 10)
1791                 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, r);
1792         
1793         push = ndr_push_init_ctx(r);
1794         if (push == NULL) {
1795                 talloc_free(r);
1796                 return False;
1797         }
1798         
1799         status = call->ndr_push(push, NDR_OUT, r);
1800         if (NT_STATUS_IS_ERR(status)) {
1801                 talloc_free(r);
1802                 return False;
1803         }
1804         
1805         blob = ndr_push_blob(push);
1806         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1807                 talloc_free(r);
1808                 return False;
1809         }
1810         
1811         talloc_free(r);
1812         
1813         return True;
1814 }
1815
1816 static bool api_netr_NETRLOGONGETTRUSTRID(pipes_struct *p)
1817 {
1818         const struct ndr_interface_call *call;
1819         struct ndr_pull *pull;
1820         struct ndr_push *push;
1821         NTSTATUS status;
1822         DATA_BLOB blob;
1823         struct netr_NETRLOGONGETTRUSTRID *r;
1824         
1825         call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONGETTRUSTRID];
1826         
1827         r = talloc(NULL, struct netr_NETRLOGONGETTRUSTRID);
1828         if (r == NULL) {
1829                 return False;
1830         }
1831         
1832         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1833                 talloc_free(r);
1834                 return False;
1835         }
1836         
1837         pull = ndr_pull_init_blob(&blob, r);
1838         if (pull == NULL) {
1839                 talloc_free(r);
1840                 return False;
1841         }
1842         
1843         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1844         status = call->ndr_pull(pull, NDR_IN, r);
1845         if (NT_STATUS_IS_ERR(status)) {
1846                 talloc_free(r);
1847                 return False;
1848         }
1849         
1850         if (DEBUGLEVEL >= 10)
1851                 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTRUSTRID, r);
1852         
1853         r->out.result = _netr_NETRLOGONGETTRUSTRID(p, r);
1854         
1855         if (p->rng_fault_state) {
1856                 talloc_free(r);
1857                 /* Return True here, srv_pipe_hnd.c will take care */
1858                 return True;
1859         }
1860         
1861         if (DEBUGLEVEL >= 10)
1862                 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTRUSTRID, r);
1863         
1864         push = ndr_push_init_ctx(r);
1865         if (push == NULL) {
1866                 talloc_free(r);
1867                 return False;
1868         }
1869         
1870         status = call->ndr_push(push, NDR_OUT, r);
1871         if (NT_STATUS_IS_ERR(status)) {
1872                 talloc_free(r);
1873                 return False;
1874         }
1875         
1876         blob = ndr_push_blob(push);
1877         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1878                 talloc_free(r);
1879                 return False;
1880         }
1881         
1882         talloc_free(r);
1883         
1884         return True;
1885 }
1886
1887 static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p)
1888 {
1889         const struct ndr_interface_call *call;
1890         struct ndr_pull *pull;
1891         struct ndr_push *push;
1892         NTSTATUS status;
1893         DATA_BLOB blob;
1894         struct netr_NETRLOGONCOMPUTESERVERDIGEST *r;
1895         
1896         call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST];
1897         
1898         r = talloc(NULL, struct netr_NETRLOGONCOMPUTESERVERDIGEST);
1899         if (r == NULL) {
1900                 return False;
1901         }
1902         
1903         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1904                 talloc_free(r);
1905                 return False;
1906         }
1907         
1908         pull = ndr_pull_init_blob(&blob, r);
1909         if (pull == NULL) {
1910                 talloc_free(r);
1911                 return False;
1912         }
1913         
1914         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1915         status = call->ndr_pull(pull, NDR_IN, r);
1916         if (NT_STATUS_IS_ERR(status)) {
1917                 talloc_free(r);
1918                 return False;
1919         }
1920         
1921         if (DEBUGLEVEL >= 10)
1922                 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, r);
1923         
1924         r->out.result = _netr_NETRLOGONCOMPUTESERVERDIGEST(p, r);
1925         
1926         if (p->rng_fault_state) {
1927                 talloc_free(r);
1928                 /* Return True here, srv_pipe_hnd.c will take care */
1929                 return True;
1930         }
1931         
1932         if (DEBUGLEVEL >= 10)
1933                 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, r);
1934         
1935         push = ndr_push_init_ctx(r);
1936         if (push == NULL) {
1937                 talloc_free(r);
1938                 return False;
1939         }
1940         
1941         status = call->ndr_push(push, NDR_OUT, r);
1942         if (NT_STATUS_IS_ERR(status)) {
1943                 talloc_free(r);
1944                 return False;
1945         }
1946         
1947         blob = ndr_push_blob(push);
1948         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1949                 talloc_free(r);
1950                 return False;
1951         }
1952         
1953         talloc_free(r);
1954         
1955         return True;
1956 }
1957
1958 static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p)
1959 {
1960         const struct ndr_interface_call *call;
1961         struct ndr_pull *pull;
1962         struct ndr_push *push;
1963         NTSTATUS status;
1964         DATA_BLOB blob;
1965         struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r;
1966         
1967         call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST];
1968         
1969         r = talloc(NULL, struct netr_NETRLOGONCOMPUTECLIENTDIGEST);
1970         if (r == NULL) {
1971                 return False;
1972         }
1973         
1974         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1975                 talloc_free(r);
1976                 return False;
1977         }
1978         
1979         pull = ndr_pull_init_blob(&blob, r);
1980         if (pull == NULL) {
1981                 talloc_free(r);
1982                 return False;
1983         }
1984         
1985         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1986         status = call->ndr_pull(pull, NDR_IN, r);
1987         if (NT_STATUS_IS_ERR(status)) {
1988                 talloc_free(r);
1989                 return False;
1990         }
1991         
1992         if (DEBUGLEVEL >= 10)
1993                 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, r);
1994         
1995         r->out.result = _netr_NETRLOGONCOMPUTECLIENTDIGEST(p, r);
1996         
1997         if (p->rng_fault_state) {
1998                 talloc_free(r);
1999                 /* Return True here, srv_pipe_hnd.c will take care */
2000                 return True;
2001         }
2002         
2003         if (DEBUGLEVEL >= 10)
2004                 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, r);
2005         
2006         push = ndr_push_init_ctx(r);
2007         if (push == NULL) {
2008                 talloc_free(r);
2009                 return False;
2010         }
2011         
2012         status = call->ndr_push(push, NDR_OUT, r);
2013         if (NT_STATUS_IS_ERR(status)) {
2014                 talloc_free(r);
2015                 return False;
2016         }
2017         
2018         blob = ndr_push_blob(push);
2019         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2020                 talloc_free(r);
2021                 return False;
2022         }
2023         
2024         talloc_free(r);
2025         
2026         return True;
2027 }
2028
2029 static bool api_netr_ServerAuthenticate3(pipes_struct *p)
2030 {
2031         const struct ndr_interface_call *call;
2032         struct ndr_pull *pull;
2033         struct ndr_push *push;
2034         NTSTATUS status;
2035         DATA_BLOB blob;
2036         struct netr_ServerAuthenticate3 *r;
2037         
2038         call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE3];
2039         
2040         r = talloc(NULL, struct netr_ServerAuthenticate3);
2041         if (r == NULL) {
2042                 return False;
2043         }
2044         
2045         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2046                 talloc_free(r);
2047                 return False;
2048         }
2049         
2050         pull = ndr_pull_init_blob(&blob, r);
2051         if (pull == NULL) {
2052                 talloc_free(r);
2053                 return False;
2054         }
2055         
2056         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2057         status = call->ndr_pull(pull, NDR_IN, r);
2058         if (NT_STATUS_IS_ERR(status)) {
2059                 talloc_free(r);
2060                 return False;
2061         }
2062         
2063         if (DEBUGLEVEL >= 10)
2064                 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3, r);
2065         
2066         ZERO_STRUCT(r->out);
2067         r->out.credentials = r->in.credentials;
2068         r->out.negotiate_flags = r->in.negotiate_flags;
2069         r->out.rid = talloc_zero(r, uint32_t);
2070         if (r->out.rid == NULL) {
2071                 talloc_free(r);
2072                 return False;
2073         }
2074         
2075         r->out.result = _netr_ServerAuthenticate3(p, r);
2076         
2077         if (p->rng_fault_state) {
2078                 talloc_free(r);
2079                 /* Return True here, srv_pipe_hnd.c will take care */
2080                 return True;
2081         }
2082         
2083         if (DEBUGLEVEL >= 10)
2084                 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, r);
2085         
2086         push = ndr_push_init_ctx(r);
2087         if (push == NULL) {
2088                 talloc_free(r);
2089                 return False;
2090         }
2091         
2092         status = call->ndr_push(push, NDR_OUT, r);
2093         if (NT_STATUS_IS_ERR(status)) {
2094                 talloc_free(r);
2095                 return False;
2096         }
2097         
2098         blob = ndr_push_blob(push);
2099         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2100                 talloc_free(r);
2101                 return False;
2102         }
2103         
2104         talloc_free(r);
2105         
2106         return True;
2107 }
2108
2109 static bool api_netr_DsRGetDCNameEx(pipes_struct *p)
2110 {
2111         const struct ndr_interface_call *call;
2112         struct ndr_pull *pull;
2113         struct ndr_push *push;
2114         NTSTATUS status;
2115         DATA_BLOB blob;
2116         struct netr_DsRGetDCNameEx *r;
2117         
2118         call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAMEEX];
2119         
2120         r = talloc(NULL, struct netr_DsRGetDCNameEx);
2121         if (r == NULL) {
2122                 return False;
2123         }
2124         
2125         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2126                 talloc_free(r);
2127                 return False;
2128         }
2129         
2130         pull = ndr_pull_init_blob(&blob, r);
2131         if (pull == NULL) {
2132                 talloc_free(r);
2133                 return False;
2134         }
2135         
2136         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2137         status = call->ndr_pull(pull, NDR_IN, r);
2138         if (NT_STATUS_IS_ERR(status)) {
2139                 talloc_free(r);
2140                 return False;
2141         }
2142         
2143         if (DEBUGLEVEL >= 10)
2144                 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, r);
2145         
2146         ZERO_STRUCT(r->out);
2147         r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo);
2148         if (r->out.info == NULL) {
2149                 talloc_free(r);
2150                 return False;
2151         }
2152         
2153         r->out.result = _netr_DsRGetDCNameEx(p, r);
2154         
2155         if (p->rng_fault_state) {
2156                 talloc_free(r);
2157                 /* Return True here, srv_pipe_hnd.c will take care */
2158                 return True;
2159         }
2160         
2161         if (DEBUGLEVEL >= 10)
2162                 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, r);
2163         
2164         push = ndr_push_init_ctx(r);
2165         if (push == NULL) {
2166                 talloc_free(r);
2167                 return False;
2168         }
2169         
2170         status = call->ndr_push(push, NDR_OUT, r);
2171         if (NT_STATUS_IS_ERR(status)) {
2172                 talloc_free(r);
2173                 return False;
2174         }
2175         
2176         blob = ndr_push_blob(push);
2177         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2178                 talloc_free(r);
2179                 return False;
2180         }
2181         
2182         talloc_free(r);
2183         
2184         return True;
2185 }
2186
2187 static bool api_netr_DsRGetSiteName(pipes_struct *p)
2188 {
2189         const struct ndr_interface_call *call;
2190         struct ndr_pull *pull;
2191         struct ndr_push *push;
2192         NTSTATUS status;
2193         DATA_BLOB blob;
2194         struct netr_DsRGetSiteName *r;
2195         
2196         call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETSITENAME];
2197         
2198         r = talloc(NULL, struct netr_DsRGetSiteName);
2199         if (r == NULL) {
2200                 return False;
2201         }
2202         
2203         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2204                 talloc_free(r);
2205                 return False;
2206         }
2207         
2208         pull = ndr_pull_init_blob(&blob, r);
2209         if (pull == NULL) {
2210                 talloc_free(r);
2211                 return False;
2212         }
2213         
2214         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2215         status = call->ndr_pull(pull, NDR_IN, r);
2216         if (NT_STATUS_IS_ERR(status)) {
2217                 talloc_free(r);
2218                 return False;
2219         }
2220         
2221         if (DEBUGLEVEL >= 10)
2222                 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, r);
2223         
2224         ZERO_STRUCT(r->out);
2225         r->out.site = talloc_zero(r, const char *);
2226         if (r->out.site == NULL) {
2227                 talloc_free(r);
2228                 return False;
2229         }
2230         
2231         r->out.result = _netr_DsRGetSiteName(p, r);
2232         
2233         if (p->rng_fault_state) {
2234                 talloc_free(r);
2235                 /* Return True here, srv_pipe_hnd.c will take care */
2236                 return True;
2237         }
2238         
2239         if (DEBUGLEVEL >= 10)
2240                 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, r);
2241         
2242         push = ndr_push_init_ctx(r);
2243         if (push == NULL) {
2244                 talloc_free(r);
2245                 return False;
2246         }
2247         
2248         status = call->ndr_push(push, NDR_OUT, r);
2249         if (NT_STATUS_IS_ERR(status)) {
2250                 talloc_free(r);
2251                 return False;
2252         }
2253         
2254         blob = ndr_push_blob(push);
2255         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2256                 talloc_free(r);
2257                 return False;
2258         }
2259         
2260         talloc_free(r);
2261         
2262         return True;
2263 }
2264
2265 static bool api_netr_LogonGetDomainInfo(pipes_struct *p)
2266 {
2267         const struct ndr_interface_call *call;
2268         struct ndr_pull *pull;
2269         struct ndr_push *push;
2270         NTSTATUS status;
2271         DATA_BLOB blob;
2272         struct netr_LogonGetDomainInfo *r;
2273         
2274         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONGETDOMAININFO];
2275         
2276         r = talloc(NULL, struct netr_LogonGetDomainInfo);
2277         if (r == NULL) {
2278                 return False;
2279         }
2280         
2281         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2282                 talloc_free(r);
2283                 return False;
2284         }
2285         
2286         pull = ndr_pull_init_blob(&blob, r);
2287         if (pull == NULL) {
2288                 talloc_free(r);
2289                 return False;
2290         }
2291         
2292         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2293         status = call->ndr_pull(pull, NDR_IN, r);
2294         if (NT_STATUS_IS_ERR(status)) {
2295                 talloc_free(r);
2296                 return False;
2297         }
2298         
2299         if (DEBUGLEVEL >= 10)
2300                 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, r);
2301         
2302         ZERO_STRUCT(r->out);
2303         r->out.return_authenticator = r->in.return_authenticator;
2304         r->out.info = talloc_zero(r, union netr_DomainInfo);
2305         if (r->out.info == NULL) {
2306                 talloc_free(r);
2307                 return False;
2308         }
2309         
2310         r->out.result = _netr_LogonGetDomainInfo(p, r);
2311         
2312         if (p->rng_fault_state) {
2313                 talloc_free(r);
2314                 /* Return True here, srv_pipe_hnd.c will take care */
2315                 return True;
2316         }
2317         
2318         if (DEBUGLEVEL >= 10)
2319                 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, r);
2320         
2321         push = ndr_push_init_ctx(r);
2322         if (push == NULL) {
2323                 talloc_free(r);
2324                 return False;
2325         }
2326         
2327         status = call->ndr_push(push, NDR_OUT, r);
2328         if (NT_STATUS_IS_ERR(status)) {
2329                 talloc_free(r);
2330                 return False;
2331         }
2332         
2333         blob = ndr_push_blob(push);
2334         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2335                 talloc_free(r);
2336                 return False;
2337         }
2338         
2339         talloc_free(r);
2340         
2341         return True;
2342 }
2343
2344 static bool api_netr_ServerPasswordSet2(pipes_struct *p)
2345 {
2346         const struct ndr_interface_call *call;
2347         struct ndr_pull *pull;
2348         struct ndr_push *push;
2349         NTSTATUS status;
2350         DATA_BLOB blob;
2351         struct netr_ServerPasswordSet2 *r;
2352         
2353         call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDSET2];
2354         
2355         r = talloc(NULL, struct netr_ServerPasswordSet2);
2356         if (r == NULL) {
2357                 return False;
2358         }
2359         
2360         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2361                 talloc_free(r);
2362                 return False;
2363         }
2364         
2365         pull = ndr_pull_init_blob(&blob, r);
2366         if (pull == NULL) {
2367                 talloc_free(r);
2368                 return False;
2369         }
2370         
2371         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2372         status = call->ndr_pull(pull, NDR_IN, r);
2373         if (NT_STATUS_IS_ERR(status)) {
2374                 talloc_free(r);
2375                 return False;
2376         }
2377         
2378         if (DEBUGLEVEL >= 10)
2379                 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, r);
2380         
2381         ZERO_STRUCT(r->out);
2382         r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator);
2383         if (r->out.return_authenticator == NULL) {
2384                 talloc_free(r);
2385                 return False;
2386         }
2387         
2388         r->out.result = _netr_ServerPasswordSet2(p, r);
2389         
2390         if (p->rng_fault_state) {
2391                 talloc_free(r);
2392                 /* Return True here, srv_pipe_hnd.c will take care */
2393                 return True;
2394         }
2395         
2396         if (DEBUGLEVEL >= 10)
2397                 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, r);
2398         
2399         push = ndr_push_init_ctx(r);
2400         if (push == NULL) {
2401                 talloc_free(r);
2402                 return False;
2403         }
2404         
2405         status = call->ndr_push(push, NDR_OUT, r);
2406         if (NT_STATUS_IS_ERR(status)) {
2407                 talloc_free(r);
2408                 return False;
2409         }
2410         
2411         blob = ndr_push_blob(push);
2412         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2413                 talloc_free(r);
2414                 return False;
2415         }
2416         
2417         talloc_free(r);
2418         
2419         return True;
2420 }
2421
2422 static bool api_netr_NETRSERVERPASSWORDGET(pipes_struct *p)
2423 {
2424         const struct ndr_interface_call *call;
2425         struct ndr_pull *pull;
2426         struct ndr_push *push;
2427         NTSTATUS status;
2428         DATA_BLOB blob;
2429         struct netr_NETRSERVERPASSWORDGET *r;
2430         
2431         call = &ndr_table_netlogon.calls[NDR_NETR_NETRSERVERPASSWORDGET];
2432         
2433         r = talloc(NULL, struct netr_NETRSERVERPASSWORDGET);
2434         if (r == NULL) {
2435                 return False;
2436         }
2437         
2438         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2439                 talloc_free(r);
2440                 return False;
2441         }
2442         
2443         pull = ndr_pull_init_blob(&blob, r);
2444         if (pull == NULL) {
2445                 talloc_free(r);
2446                 return False;
2447         }
2448         
2449         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2450         status = call->ndr_pull(pull, NDR_IN, r);
2451         if (NT_STATUS_IS_ERR(status)) {
2452                 talloc_free(r);
2453                 return False;
2454         }
2455         
2456         if (DEBUGLEVEL >= 10)
2457                 NDR_PRINT_IN_DEBUG(netr_NETRSERVERPASSWORDGET, r);
2458         
2459         r->out.result = _netr_NETRSERVERPASSWORDGET(p, r);
2460         
2461         if (p->rng_fault_state) {
2462                 talloc_free(r);
2463                 /* Return True here, srv_pipe_hnd.c will take care */
2464                 return True;
2465         }
2466         
2467         if (DEBUGLEVEL >= 10)
2468                 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERPASSWORDGET, r);
2469         
2470         push = ndr_push_init_ctx(r);
2471         if (push == NULL) {
2472                 talloc_free(r);
2473                 return False;
2474         }
2475         
2476         status = call->ndr_push(push, NDR_OUT, r);
2477         if (NT_STATUS_IS_ERR(status)) {
2478                 talloc_free(r);
2479                 return False;
2480         }
2481         
2482         blob = ndr_push_blob(push);
2483         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2484                 talloc_free(r);
2485                 return False;
2486         }
2487         
2488         talloc_free(r);
2489         
2490         return True;
2491 }
2492
2493 static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p)
2494 {
2495         const struct ndr_interface_call *call;
2496         struct ndr_pull *pull;
2497         struct ndr_push *push;
2498         NTSTATUS status;
2499         DATA_BLOB blob;
2500         struct netr_NETRLOGONSENDTOSAM *r;
2501         
2502         call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONSENDTOSAM];
2503         
2504         r = talloc(NULL, struct netr_NETRLOGONSENDTOSAM);
2505         if (r == NULL) {
2506                 return False;
2507         }
2508         
2509         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2510                 talloc_free(r);
2511                 return False;
2512         }
2513         
2514         pull = ndr_pull_init_blob(&blob, r);
2515         if (pull == NULL) {
2516                 talloc_free(r);
2517                 return False;
2518         }
2519         
2520         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2521         status = call->ndr_pull(pull, NDR_IN, r);
2522         if (NT_STATUS_IS_ERR(status)) {
2523                 talloc_free(r);
2524                 return False;
2525         }
2526         
2527         if (DEBUGLEVEL >= 10)
2528                 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, r);
2529         
2530         r->out.result = _netr_NETRLOGONSENDTOSAM(p, r);
2531         
2532         if (p->rng_fault_state) {
2533                 talloc_free(r);
2534                 /* Return True here, srv_pipe_hnd.c will take care */
2535                 return True;
2536         }
2537         
2538         if (DEBUGLEVEL >= 10)
2539                 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, r);
2540         
2541         push = ndr_push_init_ctx(r);
2542         if (push == NULL) {
2543                 talloc_free(r);
2544                 return False;
2545         }
2546         
2547         status = call->ndr_push(push, NDR_OUT, r);
2548         if (NT_STATUS_IS_ERR(status)) {
2549                 talloc_free(r);
2550                 return False;
2551         }
2552         
2553         blob = ndr_push_blob(push);
2554         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2555                 talloc_free(r);
2556                 return False;
2557         }
2558         
2559         talloc_free(r);
2560         
2561         return True;
2562 }
2563
2564 static bool api_netr_DSRADDRESSTOSITENAMESW(pipes_struct *p)
2565 {
2566         const struct ndr_interface_call *call;
2567         struct ndr_pull *pull;
2568         struct ndr_push *push;
2569         NTSTATUS status;
2570         DATA_BLOB blob;
2571         struct netr_DSRADDRESSTOSITENAMESW *r;
2572         
2573         call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESW];
2574         
2575         r = talloc(NULL, struct netr_DSRADDRESSTOSITENAMESW);
2576         if (r == NULL) {
2577                 return False;
2578         }
2579         
2580         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2581                 talloc_free(r);
2582                 return False;
2583         }
2584         
2585         pull = ndr_pull_init_blob(&blob, r);
2586         if (pull == NULL) {
2587                 talloc_free(r);
2588                 return False;
2589         }
2590         
2591         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2592         status = call->ndr_pull(pull, NDR_IN, r);
2593         if (NT_STATUS_IS_ERR(status)) {
2594                 talloc_free(r);
2595                 return False;
2596         }
2597         
2598         if (DEBUGLEVEL >= 10)
2599                 NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESW, r);
2600         
2601         r->out.result = _netr_DSRADDRESSTOSITENAMESW(p, r);
2602         
2603         if (p->rng_fault_state) {
2604                 talloc_free(r);
2605                 /* Return True here, srv_pipe_hnd.c will take care */
2606                 return True;
2607         }
2608         
2609         if (DEBUGLEVEL >= 10)
2610                 NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESW, r);
2611         
2612         push = ndr_push_init_ctx(r);
2613         if (push == NULL) {
2614                 talloc_free(r);
2615                 return False;
2616         }
2617         
2618         status = call->ndr_push(push, NDR_OUT, r);
2619         if (NT_STATUS_IS_ERR(status)) {
2620                 talloc_free(r);
2621                 return False;
2622         }
2623         
2624         blob = ndr_push_blob(push);
2625         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2626                 talloc_free(r);
2627                 return False;
2628         }
2629         
2630         talloc_free(r);
2631         
2632         return True;
2633 }
2634
2635 static bool api_netr_DsRGetDCNameEx2(pipes_struct *p)
2636 {
2637         const struct ndr_interface_call *call;
2638         struct ndr_pull *pull;
2639         struct ndr_push *push;
2640         NTSTATUS status;
2641         DATA_BLOB blob;
2642         struct netr_DsRGetDCNameEx2 *r;
2643         
2644         call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAMEEX2];
2645         
2646         r = talloc(NULL, struct netr_DsRGetDCNameEx2);
2647         if (r == NULL) {
2648                 return False;
2649         }
2650         
2651         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2652                 talloc_free(r);
2653                 return False;
2654         }
2655         
2656         pull = ndr_pull_init_blob(&blob, r);
2657         if (pull == NULL) {
2658                 talloc_free(r);
2659                 return False;
2660         }
2661         
2662         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2663         status = call->ndr_pull(pull, NDR_IN, r);
2664         if (NT_STATUS_IS_ERR(status)) {
2665                 talloc_free(r);
2666                 return False;
2667         }
2668         
2669         if (DEBUGLEVEL >= 10)
2670                 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, r);
2671         
2672         ZERO_STRUCT(r->out);
2673         r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo);
2674         if (r->out.info == NULL) {
2675                 talloc_free(r);
2676                 return False;
2677         }
2678         
2679         r->out.result = _netr_DsRGetDCNameEx2(p, r);
2680         
2681         if (p->rng_fault_state) {
2682                 talloc_free(r);
2683                 /* Return True here, srv_pipe_hnd.c will take care */
2684                 return True;
2685         }
2686         
2687         if (DEBUGLEVEL >= 10)
2688                 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, r);
2689         
2690         push = ndr_push_init_ctx(r);
2691         if (push == NULL) {
2692                 talloc_free(r);
2693                 return False;
2694         }
2695         
2696         status = call->ndr_push(push, NDR_OUT, r);
2697         if (NT_STATUS_IS_ERR(status)) {
2698                 talloc_free(r);
2699                 return False;
2700         }
2701         
2702         blob = ndr_push_blob(push);
2703         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2704                 talloc_free(r);
2705                 return False;
2706         }
2707         
2708         talloc_free(r);
2709         
2710         return True;
2711 }
2712
2713 static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p)
2714 {
2715         const struct ndr_interface_call *call;
2716         struct ndr_pull *pull;
2717         struct ndr_push *push;
2718         NTSTATUS status;
2719         DATA_BLOB blob;
2720         struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r;
2721         
2722         call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN];
2723         
2724         r = talloc(NULL, struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN);
2725         if (r == NULL) {
2726                 return False;
2727         }
2728         
2729         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2730                 talloc_free(r);
2731                 return False;
2732         }
2733         
2734         pull = ndr_pull_init_blob(&blob, r);
2735         if (pull == NULL) {
2736                 talloc_free(r);
2737                 return False;
2738         }
2739         
2740         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2741         status = call->ndr_pull(pull, NDR_IN, r);
2742         if (NT_STATUS_IS_ERR(status)) {
2743                 talloc_free(r);
2744                 return False;
2745         }
2746         
2747         if (DEBUGLEVEL >= 10)
2748                 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, r);
2749         
2750         r->out.result = _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(p, r);
2751         
2752         if (p->rng_fault_state) {
2753                 talloc_free(r);
2754                 /* Return True here, srv_pipe_hnd.c will take care */
2755                 return True;
2756         }
2757         
2758         if (DEBUGLEVEL >= 10)
2759                 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, r);
2760         
2761         push = ndr_push_init_ctx(r);
2762         if (push == NULL) {
2763                 talloc_free(r);
2764                 return False;
2765         }
2766         
2767         status = call->ndr_push(push, NDR_OUT, r);
2768         if (NT_STATUS_IS_ERR(status)) {
2769                 talloc_free(r);
2770                 return False;
2771         }
2772         
2773         blob = ndr_push_blob(push);
2774         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2775                 talloc_free(r);
2776                 return False;
2777         }
2778         
2779         talloc_free(r);
2780         
2781         return True;
2782 }
2783
2784 static bool api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct *p)
2785 {
2786         const struct ndr_interface_call *call;
2787         struct ndr_pull *pull;
2788         struct ndr_push *push;
2789         NTSTATUS status;
2790         DATA_BLOB blob;
2791         struct netr_NETRENUMERATETRUSTEDDOMAINSEX *r;
2792         
2793         call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX];
2794         
2795         r = talloc(NULL, struct netr_NETRENUMERATETRUSTEDDOMAINSEX);
2796         if (r == NULL) {
2797                 return False;
2798         }
2799         
2800         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2801                 talloc_free(r);
2802                 return False;
2803         }
2804         
2805         pull = ndr_pull_init_blob(&blob, r);
2806         if (pull == NULL) {
2807                 talloc_free(r);
2808                 return False;
2809         }
2810         
2811         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2812         status = call->ndr_pull(pull, NDR_IN, r);
2813         if (NT_STATUS_IS_ERR(status)) {
2814                 talloc_free(r);
2815                 return False;
2816         }
2817         
2818         if (DEBUGLEVEL >= 10)
2819                 NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX, r);
2820         
2821         r->out.result = _netr_NETRENUMERATETRUSTEDDOMAINSEX(p, r);
2822         
2823         if (p->rng_fault_state) {
2824                 talloc_free(r);
2825                 /* Return True here, srv_pipe_hnd.c will take care */
2826                 return True;
2827         }
2828         
2829         if (DEBUGLEVEL >= 10)
2830                 NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX, r);
2831         
2832         push = ndr_push_init_ctx(r);
2833         if (push == NULL) {
2834                 talloc_free(r);
2835                 return False;
2836         }
2837         
2838         status = call->ndr_push(push, NDR_OUT, r);
2839         if (NT_STATUS_IS_ERR(status)) {
2840                 talloc_free(r);
2841                 return False;
2842         }
2843         
2844         blob = ndr_push_blob(push);
2845         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2846                 talloc_free(r);
2847                 return False;
2848         }
2849         
2850         talloc_free(r);
2851         
2852         return True;
2853 }
2854
2855 static bool api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct *p)
2856 {
2857         const struct ndr_interface_call *call;
2858         struct ndr_pull *pull;
2859         struct ndr_push *push;
2860         NTSTATUS status;
2861         DATA_BLOB blob;
2862         struct netr_DSRADDRESSTOSITENAMESEXW *r;
2863         
2864         call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESEXW];
2865         
2866         r = talloc(NULL, struct netr_DSRADDRESSTOSITENAMESEXW);
2867         if (r == NULL) {
2868                 return False;
2869         }
2870         
2871         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2872                 talloc_free(r);
2873                 return False;
2874         }
2875         
2876         pull = ndr_pull_init_blob(&blob, r);
2877         if (pull == NULL) {
2878                 talloc_free(r);
2879                 return False;
2880         }
2881         
2882         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2883         status = call->ndr_pull(pull, NDR_IN, r);
2884         if (NT_STATUS_IS_ERR(status)) {
2885                 talloc_free(r);
2886                 return False;
2887         }
2888         
2889         if (DEBUGLEVEL >= 10)
2890                 NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESEXW, r);
2891         
2892         r->out.result = _netr_DSRADDRESSTOSITENAMESEXW(p, r);
2893         
2894         if (p->rng_fault_state) {
2895                 talloc_free(r);
2896                 /* Return True here, srv_pipe_hnd.c will take care */
2897                 return True;
2898         }
2899         
2900         if (DEBUGLEVEL >= 10)
2901                 NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESEXW, r);
2902         
2903         push = ndr_push_init_ctx(r);
2904         if (push == NULL) {
2905                 talloc_free(r);
2906                 return False;
2907         }
2908         
2909         status = call->ndr_push(push, NDR_OUT, r);
2910         if (NT_STATUS_IS_ERR(status)) {
2911                 talloc_free(r);
2912                 return False;
2913         }
2914         
2915         blob = ndr_push_blob(push);
2916         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2917                 talloc_free(r);
2918                 return False;
2919         }
2920         
2921         talloc_free(r);
2922         
2923         return True;
2924 }
2925
2926 static bool api_netr_DSRGETDCSITECOVERAGEW(pipes_struct *p)
2927 {
2928         const struct ndr_interface_call *call;
2929         struct ndr_pull *pull;
2930         struct ndr_push *push;
2931         NTSTATUS status;
2932         DATA_BLOB blob;
2933         struct netr_DSRGETDCSITECOVERAGEW *r;
2934         
2935         call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCSITECOVERAGEW];
2936         
2937         r = talloc(NULL, struct netr_DSRGETDCSITECOVERAGEW);
2938         if (r == NULL) {
2939                 return False;
2940         }
2941         
2942         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2943                 talloc_free(r);
2944                 return False;
2945         }
2946         
2947         pull = ndr_pull_init_blob(&blob, r);
2948         if (pull == NULL) {
2949                 talloc_free(r);
2950                 return False;
2951         }
2952         
2953         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2954         status = call->ndr_pull(pull, NDR_IN, r);
2955         if (NT_STATUS_IS_ERR(status)) {
2956                 talloc_free(r);
2957                 return False;
2958         }
2959         
2960         if (DEBUGLEVEL >= 10)
2961                 NDR_PRINT_IN_DEBUG(netr_DSRGETDCSITECOVERAGEW, r);
2962         
2963         r->out.result = _netr_DSRGETDCSITECOVERAGEW(p, r);
2964         
2965         if (p->rng_fault_state) {
2966                 talloc_free(r);
2967                 /* Return True here, srv_pipe_hnd.c will take care */
2968                 return True;
2969         }
2970         
2971         if (DEBUGLEVEL >= 10)
2972                 NDR_PRINT_OUT_DEBUG(netr_DSRGETDCSITECOVERAGEW, r);
2973         
2974         push = ndr_push_init_ctx(r);
2975         if (push == NULL) {
2976                 talloc_free(r);
2977                 return False;
2978         }
2979         
2980         status = call->ndr_push(push, NDR_OUT, r);
2981         if (NT_STATUS_IS_ERR(status)) {
2982                 talloc_free(r);
2983                 return False;
2984         }
2985         
2986         blob = ndr_push_blob(push);
2987         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2988                 talloc_free(r);
2989                 return False;
2990         }
2991         
2992         talloc_free(r);
2993         
2994         return True;
2995 }
2996
2997 static bool api_netr_LogonSamLogonEx(pipes_struct *p)
2998 {
2999         const struct ndr_interface_call *call;
3000         struct ndr_pull *pull;
3001         struct ndr_push *push;
3002         NTSTATUS status;
3003         DATA_BLOB blob;
3004         struct netr_LogonSamLogonEx *r;
3005         
3006         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGONEX];
3007         
3008         r = talloc(NULL, struct netr_LogonSamLogonEx);
3009         if (r == NULL) {
3010                 return False;
3011         }
3012         
3013         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3014                 talloc_free(r);
3015                 return False;
3016         }
3017         
3018         pull = ndr_pull_init_blob(&blob, r);
3019         if (pull == NULL) {
3020                 talloc_free(r);
3021                 return False;
3022         }
3023         
3024         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3025         status = call->ndr_pull(pull, NDR_IN, r);
3026         if (NT_STATUS_IS_ERR(status)) {
3027                 talloc_free(r);
3028                 return False;
3029         }
3030         
3031         if (DEBUGLEVEL >= 10)
3032                 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, r);
3033         
3034         ZERO_STRUCT(r->out);
3035         r->out.validation = talloc_zero(r, union netr_Validation);
3036         if (r->out.validation == NULL) {
3037                 talloc_free(r);
3038                 return False;
3039         }
3040         
3041         r->out.authoritative = talloc_zero(r, uint8_t);
3042         if (r->out.authoritative == NULL) {
3043                 talloc_free(r);
3044                 return False;
3045         }
3046         
3047         r->out.flags = r->in.flags;
3048         r->out.result = _netr_LogonSamLogonEx(p, r);
3049         
3050         if (p->rng_fault_state) {
3051                 talloc_free(r);
3052                 /* Return True here, srv_pipe_hnd.c will take care */
3053                 return True;
3054         }
3055         
3056         if (DEBUGLEVEL >= 10)
3057                 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, r);
3058         
3059         push = ndr_push_init_ctx(r);
3060         if (push == NULL) {
3061                 talloc_free(r);
3062                 return False;
3063         }
3064         
3065         status = call->ndr_push(push, NDR_OUT, r);
3066         if (NT_STATUS_IS_ERR(status)) {
3067                 talloc_free(r);
3068                 return False;
3069         }
3070         
3071         blob = ndr_push_blob(push);
3072         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3073                 talloc_free(r);
3074                 return False;
3075         }
3076         
3077         talloc_free(r);
3078         
3079         return True;
3080 }
3081
3082 static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p)
3083 {
3084         const struct ndr_interface_call *call;
3085         struct ndr_pull *pull;
3086         struct ndr_push *push;
3087         NTSTATUS status;
3088         DATA_BLOB blob;
3089         struct netr_DsrEnumerateDomainTrusts *r;
3090         
3091         call = &ndr_table_netlogon.calls[NDR_NETR_DSRENUMERATEDOMAINTRUSTS];
3092         
3093         r = talloc(NULL, struct netr_DsrEnumerateDomainTrusts);
3094         if (r == NULL) {
3095                 return False;
3096         }
3097         
3098         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3099                 talloc_free(r);
3100                 return False;
3101         }
3102         
3103         pull = ndr_pull_init_blob(&blob, r);
3104         if (pull == NULL) {
3105                 talloc_free(r);
3106                 return False;
3107         }
3108         
3109         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3110         status = call->ndr_pull(pull, NDR_IN, r);
3111         if (NT_STATUS_IS_ERR(status)) {
3112                 talloc_free(r);
3113                 return False;
3114         }
3115         
3116         if (DEBUGLEVEL >= 10)
3117                 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, r);
3118         
3119         ZERO_STRUCT(r->out);
3120         r->out.count = talloc_zero(r, uint32_t);
3121         if (r->out.count == NULL) {
3122                 talloc_free(r);
3123                 return False;
3124         }
3125         
3126         r->out.trusts = talloc_zero_array(r, struct netr_DomainTrust *, r->out.count);
3127         if (r->out.trusts == NULL) {
3128                 talloc_free(r);
3129                 return False;
3130         }
3131         
3132         r->out.result = _netr_DsrEnumerateDomainTrusts(p, r);
3133         
3134         if (p->rng_fault_state) {
3135                 talloc_free(r);
3136                 /* Return True here, srv_pipe_hnd.c will take care */
3137                 return True;
3138         }
3139         
3140         if (DEBUGLEVEL >= 10)
3141                 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, r);
3142         
3143         push = ndr_push_init_ctx(r);
3144         if (push == NULL) {
3145                 talloc_free(r);
3146                 return False;
3147         }
3148         
3149         status = call->ndr_push(push, NDR_OUT, r);
3150         if (NT_STATUS_IS_ERR(status)) {
3151                 talloc_free(r);
3152                 return False;
3153         }
3154         
3155         blob = ndr_push_blob(push);
3156         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3157                 talloc_free(r);
3158                 return False;
3159         }
3160         
3161         talloc_free(r);
3162         
3163         return True;
3164 }
3165
3166 static bool api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct *p)
3167 {
3168         const struct ndr_interface_call *call;
3169         struct ndr_pull *pull;
3170         struct ndr_push *push;
3171         NTSTATUS status;
3172         DATA_BLOB blob;
3173         struct netr_DSRDEREGISTERDNSHOSTRECORDS *r;
3174         
3175         call = &ndr_table_netlogon.calls[NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS];
3176         
3177         r = talloc(NULL, struct netr_DSRDEREGISTERDNSHOSTRECORDS);
3178         if (r == NULL) {
3179                 return False;
3180         }
3181         
3182         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3183                 talloc_free(r);
3184                 return False;
3185         }
3186         
3187         pull = ndr_pull_init_blob(&blob, r);
3188         if (pull == NULL) {
3189                 talloc_free(r);
3190                 return False;
3191         }
3192         
3193         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3194         status = call->ndr_pull(pull, NDR_IN, r);
3195         if (NT_STATUS_IS_ERR(status)) {
3196                 talloc_free(r);
3197                 return False;
3198         }
3199         
3200         if (DEBUGLEVEL >= 10)
3201                 NDR_PRINT_IN_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, r);
3202         
3203         r->out.result = _netr_DSRDEREGISTERDNSHOSTRECORDS(p, r);
3204         
3205         if (p->rng_fault_state) {
3206                 talloc_free(r);
3207                 /* Return True here, srv_pipe_hnd.c will take care */
3208                 return True;
3209         }
3210         
3211         if (DEBUGLEVEL >= 10)
3212                 NDR_PRINT_OUT_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, r);
3213         
3214         push = ndr_push_init_ctx(r);
3215         if (push == NULL) {
3216                 talloc_free(r);
3217                 return False;
3218         }
3219         
3220         status = call->ndr_push(push, NDR_OUT, r);
3221         if (NT_STATUS_IS_ERR(status)) {
3222                 talloc_free(r);
3223                 return False;
3224         }
3225         
3226         blob = ndr_push_blob(push);
3227         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3228                 talloc_free(r);
3229                 return False;
3230         }
3231         
3232         talloc_free(r);
3233         
3234         return True;
3235 }
3236
3237 static bool api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct *p)
3238 {
3239         const struct ndr_interface_call *call;
3240         struct ndr_pull *pull;
3241         struct ndr_push *push;
3242         NTSTATUS status;
3243         DATA_BLOB blob;
3244         struct netr_NETRSERVERTRUSTPASSWORDSGET *r;
3245         
3246         call = &ndr_table_netlogon.calls[NDR_NETR_NETRSERVERTRUSTPASSWORDSGET];
3247         
3248         r = talloc(NULL, struct netr_NETRSERVERTRUSTPASSWORDSGET);
3249         if (r == NULL) {
3250                 return False;
3251         }
3252         
3253         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3254                 talloc_free(r);
3255                 return False;
3256         }
3257         
3258         pull = ndr_pull_init_blob(&blob, r);
3259         if (pull == NULL) {
3260                 talloc_free(r);
3261                 return False;
3262         }
3263         
3264         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3265         status = call->ndr_pull(pull, NDR_IN, r);
3266         if (NT_STATUS_IS_ERR(status)) {
3267                 talloc_free(r);
3268                 return False;
3269         }
3270         
3271         if (DEBUGLEVEL >= 10)
3272                 NDR_PRINT_IN_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET, r);
3273         
3274         r->out.result = _netr_NETRSERVERTRUSTPASSWORDSGET(p, r);
3275         
3276         if (p->rng_fault_state) {
3277                 talloc_free(r);
3278                 /* Return True here, srv_pipe_hnd.c will take care */
3279                 return True;
3280         }
3281         
3282         if (DEBUGLEVEL >= 10)
3283                 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET, r);
3284         
3285         push = ndr_push_init_ctx(r);
3286         if (push == NULL) {
3287                 talloc_free(r);
3288                 return False;
3289         }
3290         
3291         status = call->ndr_push(push, NDR_OUT, r);
3292         if (NT_STATUS_IS_ERR(status)) {
3293                 talloc_free(r);
3294                 return False;
3295         }
3296         
3297         blob = ndr_push_blob(push);
3298         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3299                 talloc_free(r);
3300                 return False;
3301         }
3302         
3303         talloc_free(r);
3304         
3305         return True;
3306 }
3307
3308 static bool api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct *p)
3309 {
3310         const struct ndr_interface_call *call;
3311         struct ndr_pull *pull;
3312         struct ndr_push *push;
3313         NTSTATUS status;
3314         DATA_BLOB blob;
3315         struct netr_DSRGETFORESTTRUSTINFORMATION *r;
3316         
3317         call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETFORESTTRUSTINFORMATION];
3318         
3319         r = talloc(NULL, struct netr_DSRGETFORESTTRUSTINFORMATION);
3320         if (r == NULL) {
3321                 return False;
3322         }
3323         
3324         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3325                 talloc_free(r);
3326                 return False;
3327         }
3328         
3329         pull = ndr_pull_init_blob(&blob, r);
3330         if (pull == NULL) {
3331                 talloc_free(r);
3332                 return False;
3333         }
3334         
3335         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3336         status = call->ndr_pull(pull, NDR_IN, r);
3337         if (NT_STATUS_IS_ERR(status)) {
3338                 talloc_free(r);
3339                 return False;
3340         }
3341         
3342         if (DEBUGLEVEL >= 10)
3343                 NDR_PRINT_IN_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION, r);
3344         
3345         r->out.result = _netr_DSRGETFORESTTRUSTINFORMATION(p, r);
3346         
3347         if (p->rng_fault_state) {
3348                 talloc_free(r);
3349                 /* Return True here, srv_pipe_hnd.c will take care */
3350                 return True;
3351         }
3352         
3353         if (DEBUGLEVEL >= 10)
3354                 NDR_PRINT_OUT_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION, r);
3355         
3356         push = ndr_push_init_ctx(r);
3357         if (push == NULL) {
3358                 talloc_free(r);
3359                 return False;
3360         }
3361         
3362         status = call->ndr_push(push, NDR_OUT, r);
3363         if (NT_STATUS_IS_ERR(status)) {
3364                 talloc_free(r);
3365                 return False;
3366         }
3367         
3368         blob = ndr_push_blob(push);
3369         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3370                 talloc_free(r);
3371                 return False;
3372         }
3373         
3374         talloc_free(r);
3375         
3376         return True;
3377 }
3378
3379 static bool api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct *p)
3380 {
3381         const struct ndr_interface_call *call;
3382         struct ndr_pull *pull;
3383         struct ndr_push *push;
3384         NTSTATUS status;
3385         DATA_BLOB blob;
3386         struct netr_NETRGETFORESTTRUSTINFORMATION *r;
3387         
3388         call = &ndr_table_netlogon.calls[NDR_NETR_NETRGETFORESTTRUSTINFORMATION];
3389         
3390         r = talloc(NULL, struct netr_NETRGETFORESTTRUSTINFORMATION);
3391         if (r == NULL) {
3392                 return False;
3393         }
3394         
3395         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3396                 talloc_free(r);
3397                 return False;
3398         }
3399         
3400         pull = ndr_pull_init_blob(&blob, r);
3401         if (pull == NULL) {
3402                 talloc_free(r);
3403                 return False;
3404         }
3405         
3406         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3407         status = call->ndr_pull(pull, NDR_IN, r);
3408         if (NT_STATUS_IS_ERR(status)) {
3409                 talloc_free(r);
3410                 return False;
3411         }
3412         
3413         if (DEBUGLEVEL >= 10)
3414                 NDR_PRINT_IN_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION, r);
3415         
3416         r->out.result = _netr_NETRGETFORESTTRUSTINFORMATION(p, r);
3417         
3418         if (p->rng_fault_state) {
3419                 talloc_free(r);
3420                 /* Return True here, srv_pipe_hnd.c will take care */
3421                 return True;
3422         }
3423         
3424         if (DEBUGLEVEL >= 10)
3425                 NDR_PRINT_OUT_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION, r);
3426         
3427         push = ndr_push_init_ctx(r);
3428         if (push == NULL) {
3429                 talloc_free(r);
3430                 return False;
3431         }
3432         
3433         status = call->ndr_push(push, NDR_OUT, r);
3434         if (NT_STATUS_IS_ERR(status)) {
3435                 talloc_free(r);
3436                 return False;
3437         }
3438         
3439         blob = ndr_push_blob(push);
3440         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3441                 talloc_free(r);
3442                 return False;
3443         }
3444         
3445         talloc_free(r);
3446         
3447         return True;
3448 }
3449
3450 static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p)
3451 {
3452         const struct ndr_interface_call *call;
3453         struct ndr_pull *pull;
3454         struct ndr_push *push;
3455         NTSTATUS status;
3456         DATA_BLOB blob;
3457         struct netr_LogonSamLogonWithFlags *r;
3458         
3459         call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGONWITHFLAGS];
3460         
3461         r = talloc(NULL, struct netr_LogonSamLogonWithFlags);
3462         if (r == NULL) {
3463                 return False;
3464         }
3465         
3466         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3467                 talloc_free(r);
3468                 return False;
3469         }
3470         
3471         pull = ndr_pull_init_blob(&blob, r);
3472         if (pull == NULL) {
3473                 talloc_free(r);
3474                 return False;
3475         }
3476         
3477         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3478         status = call->ndr_pull(pull, NDR_IN, r);
3479         if (NT_STATUS_IS_ERR(status)) {
3480                 talloc_free(r);
3481                 return False;
3482         }
3483         
3484         if (DEBUGLEVEL >= 10)
3485                 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, r);
3486         
3487         ZERO_STRUCT(r->out);
3488         r->out.return_authenticator = r->in.return_authenticator;
3489         r->out.validation = talloc_zero(r, union netr_Validation);
3490         if (r->out.validation == NULL) {
3491                 talloc_free(r);
3492                 return False;
3493         }
3494         
3495         r->out.authoritative = talloc_zero(r, uint8_t);
3496         if (r->out.authoritative == NULL) {
3497                 talloc_free(r);
3498                 return False;
3499         }
3500         
3501         r->out.flags = r->in.flags;
3502         r->out.result = _netr_LogonSamLogonWithFlags(p, r);
3503         
3504         if (p->rng_fault_state) {
3505                 talloc_free(r);
3506                 /* Return True here, srv_pipe_hnd.c will take care */
3507                 return True;
3508         }
3509         
3510         if (DEBUGLEVEL >= 10)
3511                 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, r);
3512         
3513         push = ndr_push_init_ctx(r);
3514         if (push == NULL) {
3515                 talloc_free(r);
3516                 return False;
3517         }
3518         
3519         status = call->ndr_push(push, NDR_OUT, r);
3520         if (NT_STATUS_IS_ERR(status)) {
3521                 talloc_free(r);
3522                 return False;
3523         }
3524         
3525         blob = ndr_push_blob(push);
3526         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3527                 talloc_free(r);
3528                 return False;
3529         }
3530         
3531         talloc_free(r);
3532         
3533         return True;
3534 }
3535
3536 static bool api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p)
3537 {
3538         const struct ndr_interface_call *call;
3539         struct ndr_pull *pull;
3540         struct ndr_push *push;
3541         NTSTATUS status;
3542         DATA_BLOB blob;
3543         struct netr_NETRSERVERGETTRUSTINFO *r;
3544         
3545         call = &ndr_table_netlogon.calls[NDR_NETR_NETRSERVERGETTRUSTINFO];
3546         
3547         r = talloc(NULL, struct netr_NETRSERVERGETTRUSTINFO);
3548         if (r == NULL) {
3549                 return False;
3550         }
3551         
3552         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3553                 talloc_free(r);
3554                 return False;
3555         }
3556         
3557         pull = ndr_pull_init_blob(&blob, r);
3558         if (pull == NULL) {
3559                 talloc_free(r);
3560                 return False;
3561         }
3562         
3563         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3564         status = call->ndr_pull(pull, NDR_IN, r);
3565         if (NT_STATUS_IS_ERR(status)) {
3566                 talloc_free(r);
3567                 return False;
3568         }
3569         
3570         if (DEBUGLEVEL >= 10)
3571                 NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO, r);
3572         
3573         r->out.result = _netr_NETRSERVERGETTRUSTINFO(p, r);
3574         
3575         if (p->rng_fault_state) {
3576                 talloc_free(r);
3577                 /* Return True here, srv_pipe_hnd.c will take care */
3578                 return True;
3579         }
3580         
3581         if (DEBUGLEVEL >= 10)
3582                 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, r);
3583         
3584         push = ndr_push_init_ctx(r);
3585         if (push == NULL) {
3586                 talloc_free(r);
3587                 return False;
3588         }
3589         
3590         status = call->ndr_push(push, NDR_OUT, r);
3591         if (NT_STATUS_IS_ERR(status)) {
3592                 talloc_free(r);
3593                 return False;
3594         }
3595         
3596         blob = ndr_push_blob(push);
3597         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3598                 talloc_free(r);
3599                 return False;
3600         }
3601         
3602         talloc_free(r);
3603         
3604         return True;
3605 }
3606
3607
3608 /* Tables */
3609 static struct api_struct api_netlogon_cmds[] = 
3610 {
3611         {"NETR_LOGONUASLOGON", NDR_NETR_LOGONUASLOGON, api_netr_LogonUasLogon},
3612         {"NETR_LOGONUASLOGOFF", NDR_NETR_LOGONUASLOGOFF, api_netr_LogonUasLogoff},
3613         {"NETR_LOGONSAMLOGON", NDR_NETR_LOGONSAMLOGON, api_netr_LogonSamLogon},
3614         {"NETR_LOGONSAMLOGOFF", NDR_NETR_LOGONSAMLOGOFF, api_netr_LogonSamLogoff},
3615         {"NETR_SERVERREQCHALLENGE", NDR_NETR_SERVERREQCHALLENGE, api_netr_ServerReqChallenge},
3616         {"NETR_SERVERAUTHENTICATE", NDR_NETR_SERVERAUTHENTICATE, api_netr_ServerAuthenticate},
3617         {"NETR_SERVERPASSWORDSET", NDR_NETR_SERVERPASSWORDSET, api_netr_ServerPasswordSet},
3618         {"NETR_DATABASEDELTAS", NDR_NETR_DATABASEDELTAS, api_netr_DatabaseDeltas},
3619         {"NETR_DATABASESYNC", NDR_NETR_DATABASESYNC, api_netr_DatabaseSync},
3620         {"NETR_ACCOUNTDELTAS", NDR_NETR_ACCOUNTDELTAS, api_netr_AccountDeltas},
3621         {"NETR_ACCOUNTSYNC", NDR_NETR_ACCOUNTSYNC, api_netr_AccountSync},
3622         {"NETR_GETDCNAME", NDR_NETR_GETDCNAME, api_netr_GetDcName},
3623         {"NETR_LOGONCONTROL", NDR_NETR_LOGONCONTROL, api_netr_LogonControl},
3624         {"NETR_GETANYDCNAME", NDR_NETR_GETANYDCNAME, api_netr_GetAnyDCName},
3625         {"NETR_LOGONCONTROL2", NDR_NETR_LOGONCONTROL2, api_netr_LogonControl2},
3626         {"NETR_SERVERAUTHENTICATE2", NDR_NETR_SERVERAUTHENTICATE2, api_netr_ServerAuthenticate2},
3627         {"NETR_DATABASESYNC2", NDR_NETR_DATABASESYNC2, api_netr_DatabaseSync2},
3628         {"NETR_DATABASEREDO", NDR_NETR_DATABASEREDO, api_netr_DatabaseRedo},
3629         {"NETR_LOGONCONTROL2EX", NDR_NETR_LOGONCONTROL2EX, api_netr_LogonControl2Ex},
3630         {"NETR_NETRENUMERATETRUSTEDDOMAINS", NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, api_netr_NETRENUMERATETRUSTEDDOMAINS},
3631         {"NETR_DSRGETDCNAME", NDR_NETR_DSRGETDCNAME, api_netr_DsRGetDCName},
3632         {"NETR_NETRLOGONDUMMYROUTINE1", NDR_NETR_NETRLOGONDUMMYROUTINE1, api_netr_NETRLOGONDUMMYROUTINE1},
3633         {"NETR_NETRLOGONSETSERVICEBITS", NDR_NETR_NETRLOGONSETSERVICEBITS, api_netr_NETRLOGONSETSERVICEBITS},
3634         {"NETR_NETRLOGONGETTRUSTRID", NDR_NETR_NETRLOGONGETTRUSTRID, api_netr_NETRLOGONGETTRUSTRID},
3635         {"NETR_NETRLOGONCOMPUTESERVERDIGEST", NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST, api_netr_NETRLOGONCOMPUTESERVERDIGEST},
3636         {"NETR_NETRLOGONCOMPUTECLIENTDIGEST", NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST, api_netr_NETRLOGONCOMPUTECLIENTDIGEST},
3637         {"NETR_SERVERAUTHENTICATE3", NDR_NETR_SERVERAUTHENTICATE3, api_netr_ServerAuthenticate3},
3638         {"NETR_DSRGETDCNAMEEX", NDR_NETR_DSRGETDCNAMEEX, api_netr_DsRGetDCNameEx},
3639         {"NETR_DSRGETSITENAME", NDR_NETR_DSRGETSITENAME, api_netr_DsRGetSiteName},
3640         {"NETR_LOGONGETDOMAININFO", NDR_NETR_LOGONGETDOMAININFO, api_netr_LogonGetDomainInfo},
3641         {"NETR_SERVERPASSWORDSET2", NDR_NETR_SERVERPASSWORDSET2, api_netr_ServerPasswordSet2},
3642         {"NETR_NETRSERVERPASSWORDGET", NDR_NETR_NETRSERVERPASSWORDGET, api_netr_NETRSERVERPASSWORDGET},
3643         {"NETR_NETRLOGONSENDTOSAM", NDR_NETR_NETRLOGONSENDTOSAM, api_netr_NETRLOGONSENDTOSAM},
3644         {"NETR_DSRADDRESSTOSITENAMESW", NDR_NETR_DSRADDRESSTOSITENAMESW, api_netr_DSRADDRESSTOSITENAMESW},
3645         {"NETR_DSRGETDCNAMEEX2", NDR_NETR_DSRGETDCNAMEEX2, api_netr_DsRGetDCNameEx2},
3646         {"NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN", NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN, api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN},
3647         {"NETR_NETRENUMERATETRUSTEDDOMAINSEX", NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX, api_netr_NETRENUMERATETRUSTEDDOMAINSEX},
3648         {"NETR_DSRADDRESSTOSITENAMESEXW", NDR_NETR_DSRADDRESSTOSITENAMESEXW, api_netr_DSRADDRESSTOSITENAMESEXW},
3649         {"NETR_DSRGETDCSITECOVERAGEW", NDR_NETR_DSRGETDCSITECOVERAGEW, api_netr_DSRGETDCSITECOVERAGEW},
3650         {"NETR_LOGONSAMLOGONEX", NDR_NETR_LOGONSAMLOGONEX, api_netr_LogonSamLogonEx},
3651         {"NETR_DSRENUMERATEDOMAINTRUSTS", NDR_NETR_DSRENUMERATEDOMAINTRUSTS, api_netr_DsrEnumerateDomainTrusts},
3652         {"NETR_DSRDEREGISTERDNSHOSTRECORDS", NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, api_netr_DSRDEREGISTERDNSHOSTRECORDS},
3653         {"NETR_NETRSERVERTRUSTPASSWORDSGET", NDR_NETR_NETRSERVERTRUSTPASSWORDSGET, api_netr_NETRSERVERTRUSTPASSWORDSGET},
3654         {"NETR_DSRGETFORESTTRUSTINFORMATION", NDR_NETR_DSRGETFORESTTRUSTINFORMATION, api_netr_DSRGETFORESTTRUSTINFORMATION},
3655         {"NETR_NETRGETFORESTTRUSTINFORMATION", NDR_NETR_NETRGETFORESTTRUSTINFORMATION, api_netr_NETRGETFORESTTRUSTINFORMATION},
3656         {"NETR_LOGONSAMLOGONWITHFLAGS", NDR_NETR_LOGONSAMLOGONWITHFLAGS, api_netr_LogonSamLogonWithFlags},
3657         {"NETR_NETRSERVERGETTRUSTINFO", NDR_NETR_NETRSERVERGETTRUSTINFO, api_netr_NETRSERVERGETTRUSTINFO},
3658 };
3659
3660 void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns)
3661 {
3662         *fns = api_netlogon_cmds;
3663         *n_fns = sizeof(api_netlogon_cmds) / sizeof(struct api_struct);
3664 }
3665
3666 NTSTATUS rpc_netlogon_init(void)
3667 {
3668         return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netlogon", "netlogon", api_netlogon_cmds, sizeof(api_netlogon_cmds) / sizeof(struct api_struct));
3669 }