s3: re-run make samba3-idl.
[Samba/gbeck.git] / source3 / librpc / gen_ndr / srv_netlogon.c
blob9ec98bf638a9ce6cedd3bcf2bc740071ce0066fa
1 /*
2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "librpc/gen_ndr/srv_netlogon.h"
9 static bool api_netr_LogonUasLogon(pipes_struct *p)
11 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
14 enum ndr_err_code ndr_err;
15 DATA_BLOB blob;
16 struct netr_LogonUasLogon *r;
18 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONUASLOGON];
20 r = talloc(talloc_tos(), struct netr_LogonUasLogon);
21 if (r == NULL) {
22 return false;
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26 talloc_free(r);
27 return false;
30 pull = ndr_pull_init_blob(&blob, r, NULL);
31 if (pull == NULL) {
32 talloc_free(r);
33 return false;
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 ndr_err = call->ndr_pull(pull, NDR_IN, r);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
39 talloc_free(r);
40 return false;
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(netr_LogonUasLogon, r);
47 ZERO_STRUCT(r->out);
48 r->out.info = talloc_zero(r, struct netr_UasInfo);
49 if (r->out.info == NULL) {
50 talloc_free(r);
51 return false;
54 r->out.result = _netr_LogonUasLogon(p, r);
56 if (p->rng_fault_state) {
57 talloc_free(r);
58 /* Return true here, srv_pipe_hnd.c will take care */
59 return true;
62 if (DEBUGLEVEL >= 10) {
63 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon, r);
66 push = ndr_push_init_ctx(r);
67 if (push == NULL) {
68 talloc_free(r);
69 return false;
72 ndr_err = call->ndr_push(push, NDR_OUT, r);
73 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
74 talloc_free(r);
75 return false;
78 blob = ndr_push_blob(push);
79 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
80 talloc_free(r);
81 return false;
84 talloc_free(r);
86 return true;
89 static bool api_netr_LogonUasLogoff(pipes_struct *p)
91 const struct ndr_interface_call *call;
92 struct ndr_pull *pull;
93 struct ndr_push *push;
94 enum ndr_err_code ndr_err;
95 DATA_BLOB blob;
96 struct netr_LogonUasLogoff *r;
98 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONUASLOGOFF];
100 r = talloc(talloc_tos(), struct netr_LogonUasLogoff);
101 if (r == NULL) {
102 return false;
105 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
106 talloc_free(r);
107 return false;
110 pull = ndr_pull_init_blob(&blob, r, NULL);
111 if (pull == NULL) {
112 talloc_free(r);
113 return false;
116 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
117 ndr_err = call->ndr_pull(pull, NDR_IN, r);
118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
119 talloc_free(r);
120 return false;
123 if (DEBUGLEVEL >= 10) {
124 NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff, r);
127 ZERO_STRUCT(r->out);
128 r->out.info = talloc_zero(r, struct netr_UasLogoffInfo);
129 if (r->out.info == NULL) {
130 talloc_free(r);
131 return false;
134 r->out.result = _netr_LogonUasLogoff(p, r);
136 if (p->rng_fault_state) {
137 talloc_free(r);
138 /* Return true here, srv_pipe_hnd.c will take care */
139 return true;
142 if (DEBUGLEVEL >= 10) {
143 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, r);
146 push = ndr_push_init_ctx(r);
147 if (push == NULL) {
148 talloc_free(r);
149 return false;
152 ndr_err = call->ndr_push(push, NDR_OUT, r);
153 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
154 talloc_free(r);
155 return false;
158 blob = ndr_push_blob(push);
159 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
160 talloc_free(r);
161 return false;
164 talloc_free(r);
166 return true;
169 static bool api_netr_LogonSamLogon(pipes_struct *p)
171 const struct ndr_interface_call *call;
172 struct ndr_pull *pull;
173 struct ndr_push *push;
174 enum ndr_err_code ndr_err;
175 DATA_BLOB blob;
176 struct netr_LogonSamLogon *r;
178 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGON];
180 r = talloc(talloc_tos(), struct netr_LogonSamLogon);
181 if (r == NULL) {
182 return false;
185 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
186 talloc_free(r);
187 return false;
190 pull = ndr_pull_init_blob(&blob, r, NULL);
191 if (pull == NULL) {
192 talloc_free(r);
193 return false;
196 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
197 ndr_err = call->ndr_pull(pull, NDR_IN, r);
198 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
199 talloc_free(r);
200 return false;
203 if (DEBUGLEVEL >= 10) {
204 NDR_PRINT_IN_DEBUG(netr_LogonSamLogon, r);
207 ZERO_STRUCT(r->out);
208 r->out.return_authenticator = r->in.return_authenticator;
209 r->out.validation = talloc_zero(r, union netr_Validation);
210 if (r->out.validation == NULL) {
211 talloc_free(r);
212 return false;
215 r->out.authoritative = talloc_zero(r, uint8_t);
216 if (r->out.authoritative == NULL) {
217 talloc_free(r);
218 return false;
221 r->out.result = _netr_LogonSamLogon(p, r);
223 if (p->rng_fault_state) {
224 talloc_free(r);
225 /* Return true here, srv_pipe_hnd.c will take care */
226 return true;
229 if (DEBUGLEVEL >= 10) {
230 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, r);
233 push = ndr_push_init_ctx(r);
234 if (push == NULL) {
235 talloc_free(r);
236 return false;
239 ndr_err = call->ndr_push(push, NDR_OUT, r);
240 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
241 talloc_free(r);
242 return false;
245 blob = ndr_push_blob(push);
246 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
247 talloc_free(r);
248 return false;
251 talloc_free(r);
253 return true;
256 static bool api_netr_LogonSamLogoff(pipes_struct *p)
258 const struct ndr_interface_call *call;
259 struct ndr_pull *pull;
260 struct ndr_push *push;
261 enum ndr_err_code ndr_err;
262 DATA_BLOB blob;
263 struct netr_LogonSamLogoff *r;
265 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGOFF];
267 r = talloc(talloc_tos(), struct netr_LogonSamLogoff);
268 if (r == NULL) {
269 return false;
272 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
273 talloc_free(r);
274 return false;
277 pull = ndr_pull_init_blob(&blob, r, NULL);
278 if (pull == NULL) {
279 talloc_free(r);
280 return false;
283 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
284 ndr_err = call->ndr_pull(pull, NDR_IN, r);
285 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
286 talloc_free(r);
287 return false;
290 if (DEBUGLEVEL >= 10) {
291 NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff, r);
294 ZERO_STRUCT(r->out);
295 r->out.return_authenticator = r->in.return_authenticator;
296 r->out.result = _netr_LogonSamLogoff(p, r);
298 if (p->rng_fault_state) {
299 talloc_free(r);
300 /* Return true here, srv_pipe_hnd.c will take care */
301 return true;
304 if (DEBUGLEVEL >= 10) {
305 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, r);
308 push = ndr_push_init_ctx(r);
309 if (push == NULL) {
310 talloc_free(r);
311 return false;
314 ndr_err = call->ndr_push(push, NDR_OUT, r);
315 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
316 talloc_free(r);
317 return false;
320 blob = ndr_push_blob(push);
321 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
322 talloc_free(r);
323 return false;
326 talloc_free(r);
328 return true;
331 static bool api_netr_ServerReqChallenge(pipes_struct *p)
333 const struct ndr_interface_call *call;
334 struct ndr_pull *pull;
335 struct ndr_push *push;
336 enum ndr_err_code ndr_err;
337 DATA_BLOB blob;
338 struct netr_ServerReqChallenge *r;
340 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERREQCHALLENGE];
342 r = talloc(talloc_tos(), struct netr_ServerReqChallenge);
343 if (r == NULL) {
344 return false;
347 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
348 talloc_free(r);
349 return false;
352 pull = ndr_pull_init_blob(&blob, r, NULL);
353 if (pull == NULL) {
354 talloc_free(r);
355 return false;
358 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
359 ndr_err = call->ndr_pull(pull, NDR_IN, r);
360 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
361 talloc_free(r);
362 return false;
365 if (DEBUGLEVEL >= 10) {
366 NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge, r);
369 ZERO_STRUCT(r->out);
370 r->out.return_credentials = talloc_zero(r, struct netr_Credential);
371 if (r->out.return_credentials == NULL) {
372 talloc_free(r);
373 return false;
376 r->out.result = _netr_ServerReqChallenge(p, r);
378 if (p->rng_fault_state) {
379 talloc_free(r);
380 /* Return true here, srv_pipe_hnd.c will take care */
381 return true;
384 if (DEBUGLEVEL >= 10) {
385 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, r);
388 push = ndr_push_init_ctx(r);
389 if (push == NULL) {
390 talloc_free(r);
391 return false;
394 ndr_err = call->ndr_push(push, NDR_OUT, r);
395 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
396 talloc_free(r);
397 return false;
400 blob = ndr_push_blob(push);
401 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
402 talloc_free(r);
403 return false;
406 talloc_free(r);
408 return true;
411 static bool api_netr_ServerAuthenticate(pipes_struct *p)
413 const struct ndr_interface_call *call;
414 struct ndr_pull *pull;
415 struct ndr_push *push;
416 enum ndr_err_code ndr_err;
417 DATA_BLOB blob;
418 struct netr_ServerAuthenticate *r;
420 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE];
422 r = talloc(talloc_tos(), struct netr_ServerAuthenticate);
423 if (r == NULL) {
424 return false;
427 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
428 talloc_free(r);
429 return false;
432 pull = ndr_pull_init_blob(&blob, r, NULL);
433 if (pull == NULL) {
434 talloc_free(r);
435 return false;
438 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
439 ndr_err = call->ndr_pull(pull, NDR_IN, r);
440 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
441 talloc_free(r);
442 return false;
445 if (DEBUGLEVEL >= 10) {
446 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate, r);
449 ZERO_STRUCT(r->out);
450 r->out.return_credentials = talloc_zero(r, struct netr_Credential);
451 if (r->out.return_credentials == NULL) {
452 talloc_free(r);
453 return false;
456 r->out.result = _netr_ServerAuthenticate(p, r);
458 if (p->rng_fault_state) {
459 talloc_free(r);
460 /* Return true here, srv_pipe_hnd.c will take care */
461 return true;
464 if (DEBUGLEVEL >= 10) {
465 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, r);
468 push = ndr_push_init_ctx(r);
469 if (push == NULL) {
470 talloc_free(r);
471 return false;
474 ndr_err = call->ndr_push(push, NDR_OUT, r);
475 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
476 talloc_free(r);
477 return false;
480 blob = ndr_push_blob(push);
481 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
482 talloc_free(r);
483 return false;
486 talloc_free(r);
488 return true;
491 static bool api_netr_ServerPasswordSet(pipes_struct *p)
493 const struct ndr_interface_call *call;
494 struct ndr_pull *pull;
495 struct ndr_push *push;
496 enum ndr_err_code ndr_err;
497 DATA_BLOB blob;
498 struct netr_ServerPasswordSet *r;
500 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDSET];
502 r = talloc(talloc_tos(), struct netr_ServerPasswordSet);
503 if (r == NULL) {
504 return false;
507 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
508 talloc_free(r);
509 return false;
512 pull = ndr_pull_init_blob(&blob, r, NULL);
513 if (pull == NULL) {
514 talloc_free(r);
515 return false;
518 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
519 ndr_err = call->ndr_pull(pull, NDR_IN, r);
520 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
521 talloc_free(r);
522 return false;
525 if (DEBUGLEVEL >= 10) {
526 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, r);
529 ZERO_STRUCT(r->out);
530 r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator);
531 if (r->out.return_authenticator == NULL) {
532 talloc_free(r);
533 return false;
536 r->out.result = _netr_ServerPasswordSet(p, r);
538 if (p->rng_fault_state) {
539 talloc_free(r);
540 /* Return true here, srv_pipe_hnd.c will take care */
541 return true;
544 if (DEBUGLEVEL >= 10) {
545 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, r);
548 push = ndr_push_init_ctx(r);
549 if (push == NULL) {
550 talloc_free(r);
551 return false;
554 ndr_err = call->ndr_push(push, NDR_OUT, r);
555 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
556 talloc_free(r);
557 return false;
560 blob = ndr_push_blob(push);
561 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
562 talloc_free(r);
563 return false;
566 talloc_free(r);
568 return true;
571 static bool api_netr_DatabaseDeltas(pipes_struct *p)
573 const struct ndr_interface_call *call;
574 struct ndr_pull *pull;
575 struct ndr_push *push;
576 enum ndr_err_code ndr_err;
577 DATA_BLOB blob;
578 struct netr_DatabaseDeltas *r;
580 call = &ndr_table_netlogon.calls[NDR_NETR_DATABASEDELTAS];
582 r = talloc(talloc_tos(), struct netr_DatabaseDeltas);
583 if (r == NULL) {
584 return false;
587 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
588 talloc_free(r);
589 return false;
592 pull = ndr_pull_init_blob(&blob, r, NULL);
593 if (pull == NULL) {
594 talloc_free(r);
595 return false;
598 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
599 ndr_err = call->ndr_pull(pull, NDR_IN, r);
600 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
601 talloc_free(r);
602 return false;
605 if (DEBUGLEVEL >= 10) {
606 NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas, r);
609 ZERO_STRUCT(r->out);
610 r->out.return_authenticator = r->in.return_authenticator;
611 r->out.sequence_num = r->in.sequence_num;
612 r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY *);
613 if (r->out.delta_enum_array == NULL) {
614 talloc_free(r);
615 return false;
618 r->out.result = _netr_DatabaseDeltas(p, r);
620 if (p->rng_fault_state) {
621 talloc_free(r);
622 /* Return true here, srv_pipe_hnd.c will take care */
623 return true;
626 if (DEBUGLEVEL >= 10) {
627 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, r);
630 push = ndr_push_init_ctx(r);
631 if (push == NULL) {
632 talloc_free(r);
633 return false;
636 ndr_err = call->ndr_push(push, NDR_OUT, r);
637 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
638 talloc_free(r);
639 return false;
642 blob = ndr_push_blob(push);
643 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
644 talloc_free(r);
645 return false;
648 talloc_free(r);
650 return true;
653 static bool api_netr_DatabaseSync(pipes_struct *p)
655 const struct ndr_interface_call *call;
656 struct ndr_pull *pull;
657 struct ndr_push *push;
658 enum ndr_err_code ndr_err;
659 DATA_BLOB blob;
660 struct netr_DatabaseSync *r;
662 call = &ndr_table_netlogon.calls[NDR_NETR_DATABASESYNC];
664 r = talloc(talloc_tos(), struct netr_DatabaseSync);
665 if (r == NULL) {
666 return false;
669 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
670 talloc_free(r);
671 return false;
674 pull = ndr_pull_init_blob(&blob, r, NULL);
675 if (pull == NULL) {
676 talloc_free(r);
677 return false;
680 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
681 ndr_err = call->ndr_pull(pull, NDR_IN, r);
682 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
683 talloc_free(r);
684 return false;
687 if (DEBUGLEVEL >= 10) {
688 NDR_PRINT_IN_DEBUG(netr_DatabaseSync, r);
691 ZERO_STRUCT(r->out);
692 r->out.return_authenticator = r->in.return_authenticator;
693 r->out.sync_context = r->in.sync_context;
694 r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
695 if (r->out.delta_enum_array == NULL) {
696 talloc_free(r);
697 return false;
700 r->out.result = _netr_DatabaseSync(p, r);
702 if (p->rng_fault_state) {
703 talloc_free(r);
704 /* Return true here, srv_pipe_hnd.c will take care */
705 return true;
708 if (DEBUGLEVEL >= 10) {
709 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, r);
712 push = ndr_push_init_ctx(r);
713 if (push == NULL) {
714 talloc_free(r);
715 return false;
718 ndr_err = call->ndr_push(push, NDR_OUT, r);
719 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
720 talloc_free(r);
721 return false;
724 blob = ndr_push_blob(push);
725 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
726 talloc_free(r);
727 return false;
730 talloc_free(r);
732 return true;
735 static bool api_netr_AccountDeltas(pipes_struct *p)
737 const struct ndr_interface_call *call;
738 struct ndr_pull *pull;
739 struct ndr_push *push;
740 enum ndr_err_code ndr_err;
741 DATA_BLOB blob;
742 struct netr_AccountDeltas *r;
744 call = &ndr_table_netlogon.calls[NDR_NETR_ACCOUNTDELTAS];
746 r = talloc(talloc_tos(), struct netr_AccountDeltas);
747 if (r == NULL) {
748 return false;
751 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
752 talloc_free(r);
753 return false;
756 pull = ndr_pull_init_blob(&blob, r, NULL);
757 if (pull == NULL) {
758 talloc_free(r);
759 return false;
762 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
763 ndr_err = call->ndr_pull(pull, NDR_IN, r);
764 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
765 talloc_free(r);
766 return false;
769 if (DEBUGLEVEL >= 10) {
770 NDR_PRINT_IN_DEBUG(netr_AccountDeltas, r);
773 ZERO_STRUCT(r->out);
774 r->out.return_authenticator = r->in.return_authenticator;
775 r->out.buffer = talloc_zero(r, struct netr_AccountBuffer);
776 if (r->out.buffer == NULL) {
777 talloc_free(r);
778 return false;
781 r->out.count_returned = talloc_zero(r, uint32_t);
782 if (r->out.count_returned == NULL) {
783 talloc_free(r);
784 return false;
787 r->out.total_entries = talloc_zero(r, uint32_t);
788 if (r->out.total_entries == NULL) {
789 talloc_free(r);
790 return false;
793 r->out.recordid = talloc_zero(r, struct netr_UAS_INFO_0);
794 if (r->out.recordid == NULL) {
795 talloc_free(r);
796 return false;
799 r->out.result = _netr_AccountDeltas(p, r);
801 if (p->rng_fault_state) {
802 talloc_free(r);
803 /* Return true here, srv_pipe_hnd.c will take care */
804 return true;
807 if (DEBUGLEVEL >= 10) {
808 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, r);
811 push = ndr_push_init_ctx(r);
812 if (push == NULL) {
813 talloc_free(r);
814 return false;
817 ndr_err = call->ndr_push(push, NDR_OUT, r);
818 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
819 talloc_free(r);
820 return false;
823 blob = ndr_push_blob(push);
824 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
825 talloc_free(r);
826 return false;
829 talloc_free(r);
831 return true;
834 static bool api_netr_AccountSync(pipes_struct *p)
836 const struct ndr_interface_call *call;
837 struct ndr_pull *pull;
838 struct ndr_push *push;
839 enum ndr_err_code ndr_err;
840 DATA_BLOB blob;
841 struct netr_AccountSync *r;
843 call = &ndr_table_netlogon.calls[NDR_NETR_ACCOUNTSYNC];
845 r = talloc(talloc_tos(), struct netr_AccountSync);
846 if (r == NULL) {
847 return false;
850 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
851 talloc_free(r);
852 return false;
855 pull = ndr_pull_init_blob(&blob, r, NULL);
856 if (pull == NULL) {
857 talloc_free(r);
858 return false;
861 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
862 ndr_err = call->ndr_pull(pull, NDR_IN, r);
863 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
864 talloc_free(r);
865 return false;
868 if (DEBUGLEVEL >= 10) {
869 NDR_PRINT_IN_DEBUG(netr_AccountSync, r);
872 ZERO_STRUCT(r->out);
873 r->out.return_authenticator = r->in.return_authenticator;
874 r->out.buffer = talloc_zero(r, struct netr_AccountBuffer);
875 if (r->out.buffer == NULL) {
876 talloc_free(r);
877 return false;
880 r->out.count_returned = talloc_zero(r, uint32_t);
881 if (r->out.count_returned == NULL) {
882 talloc_free(r);
883 return false;
886 r->out.total_entries = talloc_zero(r, uint32_t);
887 if (r->out.total_entries == NULL) {
888 talloc_free(r);
889 return false;
892 r->out.next_reference = talloc_zero(r, uint32_t);
893 if (r->out.next_reference == NULL) {
894 talloc_free(r);
895 return false;
898 r->out.recordid = r->in.recordid;
899 r->out.result = _netr_AccountSync(p, r);
901 if (p->rng_fault_state) {
902 talloc_free(r);
903 /* Return true here, srv_pipe_hnd.c will take care */
904 return true;
907 if (DEBUGLEVEL >= 10) {
908 NDR_PRINT_OUT_DEBUG(netr_AccountSync, r);
911 push = ndr_push_init_ctx(r);
912 if (push == NULL) {
913 talloc_free(r);
914 return false;
917 ndr_err = call->ndr_push(push, NDR_OUT, r);
918 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
919 talloc_free(r);
920 return false;
923 blob = ndr_push_blob(push);
924 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
925 talloc_free(r);
926 return false;
929 talloc_free(r);
931 return true;
934 static bool api_netr_GetDcName(pipes_struct *p)
936 const struct ndr_interface_call *call;
937 struct ndr_pull *pull;
938 struct ndr_push *push;
939 enum ndr_err_code ndr_err;
940 DATA_BLOB blob;
941 struct netr_GetDcName *r;
943 call = &ndr_table_netlogon.calls[NDR_NETR_GETDCNAME];
945 r = talloc(talloc_tos(), struct netr_GetDcName);
946 if (r == NULL) {
947 return false;
950 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
951 talloc_free(r);
952 return false;
955 pull = ndr_pull_init_blob(&blob, r, NULL);
956 if (pull == NULL) {
957 talloc_free(r);
958 return false;
961 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
962 ndr_err = call->ndr_pull(pull, NDR_IN, r);
963 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
964 talloc_free(r);
965 return false;
968 if (DEBUGLEVEL >= 10) {
969 NDR_PRINT_IN_DEBUG(netr_GetDcName, r);
972 ZERO_STRUCT(r->out);
973 r->out.dcname = talloc_zero(r, const char *);
974 if (r->out.dcname == NULL) {
975 talloc_free(r);
976 return false;
979 r->out.result = _netr_GetDcName(p, r);
981 if (p->rng_fault_state) {
982 talloc_free(r);
983 /* Return true here, srv_pipe_hnd.c will take care */
984 return true;
987 if (DEBUGLEVEL >= 10) {
988 NDR_PRINT_OUT_DEBUG(netr_GetDcName, r);
991 push = ndr_push_init_ctx(r);
992 if (push == NULL) {
993 talloc_free(r);
994 return false;
997 ndr_err = call->ndr_push(push, NDR_OUT, r);
998 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
999 talloc_free(r);
1000 return false;
1003 blob = ndr_push_blob(push);
1004 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1005 talloc_free(r);
1006 return false;
1009 talloc_free(r);
1011 return true;
1014 static bool api_netr_LogonControl(pipes_struct *p)
1016 const struct ndr_interface_call *call;
1017 struct ndr_pull *pull;
1018 struct ndr_push *push;
1019 enum ndr_err_code ndr_err;
1020 DATA_BLOB blob;
1021 struct netr_LogonControl *r;
1023 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL];
1025 r = talloc(talloc_tos(), struct netr_LogonControl);
1026 if (r == NULL) {
1027 return false;
1030 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1031 talloc_free(r);
1032 return false;
1035 pull = ndr_pull_init_blob(&blob, r, NULL);
1036 if (pull == NULL) {
1037 talloc_free(r);
1038 return false;
1041 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1042 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1043 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1044 talloc_free(r);
1045 return false;
1048 if (DEBUGLEVEL >= 10) {
1049 NDR_PRINT_IN_DEBUG(netr_LogonControl, r);
1052 ZERO_STRUCT(r->out);
1053 r->out.info = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION);
1054 if (r->out.info == NULL) {
1055 talloc_free(r);
1056 return false;
1059 r->out.result = _netr_LogonControl(p, r);
1061 if (p->rng_fault_state) {
1062 talloc_free(r);
1063 /* Return true here, srv_pipe_hnd.c will take care */
1064 return true;
1067 if (DEBUGLEVEL >= 10) {
1068 NDR_PRINT_OUT_DEBUG(netr_LogonControl, r);
1071 push = ndr_push_init_ctx(r);
1072 if (push == NULL) {
1073 talloc_free(r);
1074 return false;
1077 ndr_err = call->ndr_push(push, NDR_OUT, r);
1078 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1079 talloc_free(r);
1080 return false;
1083 blob = ndr_push_blob(push);
1084 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1085 talloc_free(r);
1086 return false;
1089 talloc_free(r);
1091 return true;
1094 static bool api_netr_GetAnyDCName(pipes_struct *p)
1096 const struct ndr_interface_call *call;
1097 struct ndr_pull *pull;
1098 struct ndr_push *push;
1099 enum ndr_err_code ndr_err;
1100 DATA_BLOB blob;
1101 struct netr_GetAnyDCName *r;
1103 call = &ndr_table_netlogon.calls[NDR_NETR_GETANYDCNAME];
1105 r = talloc(talloc_tos(), struct netr_GetAnyDCName);
1106 if (r == NULL) {
1107 return false;
1110 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1111 talloc_free(r);
1112 return false;
1115 pull = ndr_pull_init_blob(&blob, r, NULL);
1116 if (pull == NULL) {
1117 talloc_free(r);
1118 return false;
1121 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1122 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1123 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1124 talloc_free(r);
1125 return false;
1128 if (DEBUGLEVEL >= 10) {
1129 NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, r);
1132 ZERO_STRUCT(r->out);
1133 r->out.dcname = talloc_zero(r, const char *);
1134 if (r->out.dcname == NULL) {
1135 talloc_free(r);
1136 return false;
1139 r->out.result = _netr_GetAnyDCName(p, r);
1141 if (p->rng_fault_state) {
1142 talloc_free(r);
1143 /* Return true here, srv_pipe_hnd.c will take care */
1144 return true;
1147 if (DEBUGLEVEL >= 10) {
1148 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, r);
1151 push = ndr_push_init_ctx(r);
1152 if (push == NULL) {
1153 talloc_free(r);
1154 return false;
1157 ndr_err = call->ndr_push(push, NDR_OUT, r);
1158 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1159 talloc_free(r);
1160 return false;
1163 blob = ndr_push_blob(push);
1164 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1165 talloc_free(r);
1166 return false;
1169 talloc_free(r);
1171 return true;
1174 static bool api_netr_LogonControl2(pipes_struct *p)
1176 const struct ndr_interface_call *call;
1177 struct ndr_pull *pull;
1178 struct ndr_push *push;
1179 enum ndr_err_code ndr_err;
1180 DATA_BLOB blob;
1181 struct netr_LogonControl2 *r;
1183 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL2];
1185 r = talloc(talloc_tos(), struct netr_LogonControl2);
1186 if (r == NULL) {
1187 return false;
1190 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1191 talloc_free(r);
1192 return false;
1195 pull = ndr_pull_init_blob(&blob, r, NULL);
1196 if (pull == NULL) {
1197 talloc_free(r);
1198 return false;
1201 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1202 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1203 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1204 talloc_free(r);
1205 return false;
1208 if (DEBUGLEVEL >= 10) {
1209 NDR_PRINT_IN_DEBUG(netr_LogonControl2, r);
1212 ZERO_STRUCT(r->out);
1213 r->out.query = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION);
1214 if (r->out.query == NULL) {
1215 talloc_free(r);
1216 return false;
1219 r->out.result = _netr_LogonControl2(p, r);
1221 if (p->rng_fault_state) {
1222 talloc_free(r);
1223 /* Return true here, srv_pipe_hnd.c will take care */
1224 return true;
1227 if (DEBUGLEVEL >= 10) {
1228 NDR_PRINT_OUT_DEBUG(netr_LogonControl2, r);
1231 push = ndr_push_init_ctx(r);
1232 if (push == NULL) {
1233 talloc_free(r);
1234 return false;
1237 ndr_err = call->ndr_push(push, NDR_OUT, r);
1238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1239 talloc_free(r);
1240 return false;
1243 blob = ndr_push_blob(push);
1244 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1245 talloc_free(r);
1246 return false;
1249 talloc_free(r);
1251 return true;
1254 static bool api_netr_ServerAuthenticate2(pipes_struct *p)
1256 const struct ndr_interface_call *call;
1257 struct ndr_pull *pull;
1258 struct ndr_push *push;
1259 enum ndr_err_code ndr_err;
1260 DATA_BLOB blob;
1261 struct netr_ServerAuthenticate2 *r;
1263 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE2];
1265 r = talloc(talloc_tos(), struct netr_ServerAuthenticate2);
1266 if (r == NULL) {
1267 return false;
1270 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1271 talloc_free(r);
1272 return false;
1275 pull = ndr_pull_init_blob(&blob, r, NULL);
1276 if (pull == NULL) {
1277 talloc_free(r);
1278 return false;
1281 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1282 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1283 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1284 talloc_free(r);
1285 return false;
1288 if (DEBUGLEVEL >= 10) {
1289 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2, r);
1292 ZERO_STRUCT(r->out);
1293 r->out.return_credentials = talloc_zero(r, struct netr_Credential);
1294 if (r->out.return_credentials == NULL) {
1295 talloc_free(r);
1296 return false;
1299 r->out.negotiate_flags = r->in.negotiate_flags;
1300 r->out.result = _netr_ServerAuthenticate2(p, r);
1302 if (p->rng_fault_state) {
1303 talloc_free(r);
1304 /* Return true here, srv_pipe_hnd.c will take care */
1305 return true;
1308 if (DEBUGLEVEL >= 10) {
1309 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, r);
1312 push = ndr_push_init_ctx(r);
1313 if (push == NULL) {
1314 talloc_free(r);
1315 return false;
1318 ndr_err = call->ndr_push(push, NDR_OUT, r);
1319 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1320 talloc_free(r);
1321 return false;
1324 blob = ndr_push_blob(push);
1325 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1326 talloc_free(r);
1327 return false;
1330 talloc_free(r);
1332 return true;
1335 static bool api_netr_DatabaseSync2(pipes_struct *p)
1337 const struct ndr_interface_call *call;
1338 struct ndr_pull *pull;
1339 struct ndr_push *push;
1340 enum ndr_err_code ndr_err;
1341 DATA_BLOB blob;
1342 struct netr_DatabaseSync2 *r;
1344 call = &ndr_table_netlogon.calls[NDR_NETR_DATABASESYNC2];
1346 r = talloc(talloc_tos(), struct netr_DatabaseSync2);
1347 if (r == NULL) {
1348 return false;
1351 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1352 talloc_free(r);
1353 return false;
1356 pull = ndr_pull_init_blob(&blob, r, NULL);
1357 if (pull == NULL) {
1358 talloc_free(r);
1359 return false;
1362 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1363 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1364 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1365 talloc_free(r);
1366 return false;
1369 if (DEBUGLEVEL >= 10) {
1370 NDR_PRINT_IN_DEBUG(netr_DatabaseSync2, r);
1373 ZERO_STRUCT(r->out);
1374 r->out.return_authenticator = r->in.return_authenticator;
1375 r->out.sync_context = r->in.sync_context;
1376 r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY *);
1377 if (r->out.delta_enum_array == NULL) {
1378 talloc_free(r);
1379 return false;
1382 r->out.result = _netr_DatabaseSync2(p, r);
1384 if (p->rng_fault_state) {
1385 talloc_free(r);
1386 /* Return true here, srv_pipe_hnd.c will take care */
1387 return true;
1390 if (DEBUGLEVEL >= 10) {
1391 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, r);
1394 push = ndr_push_init_ctx(r);
1395 if (push == NULL) {
1396 talloc_free(r);
1397 return false;
1400 ndr_err = call->ndr_push(push, NDR_OUT, r);
1401 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1402 talloc_free(r);
1403 return false;
1406 blob = ndr_push_blob(push);
1407 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1408 talloc_free(r);
1409 return false;
1412 talloc_free(r);
1414 return true;
1417 static bool api_netr_DatabaseRedo(pipes_struct *p)
1419 const struct ndr_interface_call *call;
1420 struct ndr_pull *pull;
1421 struct ndr_push *push;
1422 enum ndr_err_code ndr_err;
1423 DATA_BLOB blob;
1424 struct netr_DatabaseRedo *r;
1426 call = &ndr_table_netlogon.calls[NDR_NETR_DATABASEREDO];
1428 r = talloc(talloc_tos(), struct netr_DatabaseRedo);
1429 if (r == NULL) {
1430 return false;
1433 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1434 talloc_free(r);
1435 return false;
1438 pull = ndr_pull_init_blob(&blob, r, NULL);
1439 if (pull == NULL) {
1440 talloc_free(r);
1441 return false;
1444 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1445 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1446 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1447 talloc_free(r);
1448 return false;
1451 if (DEBUGLEVEL >= 10) {
1452 NDR_PRINT_IN_DEBUG(netr_DatabaseRedo, r);
1455 ZERO_STRUCT(r->out);
1456 r->out.return_authenticator = r->in.return_authenticator;
1457 r->out.delta_enum_array = talloc_zero(r, struct netr_DELTA_ENUM_ARRAY);
1458 if (r->out.delta_enum_array == NULL) {
1459 talloc_free(r);
1460 return false;
1463 r->out.result = _netr_DatabaseRedo(p, r);
1465 if (p->rng_fault_state) {
1466 talloc_free(r);
1467 /* Return true here, srv_pipe_hnd.c will take care */
1468 return true;
1471 if (DEBUGLEVEL >= 10) {
1472 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, r);
1475 push = ndr_push_init_ctx(r);
1476 if (push == NULL) {
1477 talloc_free(r);
1478 return false;
1481 ndr_err = call->ndr_push(push, NDR_OUT, r);
1482 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1483 talloc_free(r);
1484 return false;
1487 blob = ndr_push_blob(push);
1488 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1489 talloc_free(r);
1490 return false;
1493 talloc_free(r);
1495 return true;
1498 static bool api_netr_LogonControl2Ex(pipes_struct *p)
1500 const struct ndr_interface_call *call;
1501 struct ndr_pull *pull;
1502 struct ndr_push *push;
1503 enum ndr_err_code ndr_err;
1504 DATA_BLOB blob;
1505 struct netr_LogonControl2Ex *r;
1507 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONCONTROL2EX];
1509 r = talloc(talloc_tos(), struct netr_LogonControl2Ex);
1510 if (r == NULL) {
1511 return false;
1514 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1515 talloc_free(r);
1516 return false;
1519 pull = ndr_pull_init_blob(&blob, r, NULL);
1520 if (pull == NULL) {
1521 talloc_free(r);
1522 return false;
1525 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1526 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1527 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1528 talloc_free(r);
1529 return false;
1532 if (DEBUGLEVEL >= 10) {
1533 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, r);
1536 ZERO_STRUCT(r->out);
1537 r->out.query = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION);
1538 if (r->out.query == NULL) {
1539 talloc_free(r);
1540 return false;
1543 r->out.result = _netr_LogonControl2Ex(p, r);
1545 if (p->rng_fault_state) {
1546 talloc_free(r);
1547 /* Return true here, srv_pipe_hnd.c will take care */
1548 return true;
1551 if (DEBUGLEVEL >= 10) {
1552 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, r);
1555 push = ndr_push_init_ctx(r);
1556 if (push == NULL) {
1557 talloc_free(r);
1558 return false;
1561 ndr_err = call->ndr_push(push, NDR_OUT, r);
1562 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1563 talloc_free(r);
1564 return false;
1567 blob = ndr_push_blob(push);
1568 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1569 talloc_free(r);
1570 return false;
1573 talloc_free(r);
1575 return true;
1578 static bool api_netr_NetrEnumerateTrustedDomains(pipes_struct *p)
1580 const struct ndr_interface_call *call;
1581 struct ndr_pull *pull;
1582 struct ndr_push *push;
1583 enum ndr_err_code ndr_err;
1584 DATA_BLOB blob;
1585 struct netr_NetrEnumerateTrustedDomains *r;
1587 call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINS];
1589 r = talloc(talloc_tos(), struct netr_NetrEnumerateTrustedDomains);
1590 if (r == NULL) {
1591 return false;
1594 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1595 talloc_free(r);
1596 return false;
1599 pull = ndr_pull_init_blob(&blob, r, NULL);
1600 if (pull == NULL) {
1601 talloc_free(r);
1602 return false;
1605 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1606 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1607 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1608 talloc_free(r);
1609 return false;
1612 if (DEBUGLEVEL >= 10) {
1613 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, r);
1616 ZERO_STRUCT(r->out);
1617 r->out.trusted_domains_blob = talloc_zero(r, struct netr_Blob);
1618 if (r->out.trusted_domains_blob == NULL) {
1619 talloc_free(r);
1620 return false;
1623 r->out.result = _netr_NetrEnumerateTrustedDomains(p, r);
1625 if (p->rng_fault_state) {
1626 talloc_free(r);
1627 /* Return true here, srv_pipe_hnd.c will take care */
1628 return true;
1631 if (DEBUGLEVEL >= 10) {
1632 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, r);
1635 push = ndr_push_init_ctx(r);
1636 if (push == NULL) {
1637 talloc_free(r);
1638 return false;
1641 ndr_err = call->ndr_push(push, NDR_OUT, r);
1642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1643 talloc_free(r);
1644 return false;
1647 blob = ndr_push_blob(push);
1648 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1649 talloc_free(r);
1650 return false;
1653 talloc_free(r);
1655 return true;
1658 static bool api_netr_DsRGetDCName(pipes_struct *p)
1660 const struct ndr_interface_call *call;
1661 struct ndr_pull *pull;
1662 struct ndr_push *push;
1663 enum ndr_err_code ndr_err;
1664 DATA_BLOB blob;
1665 struct netr_DsRGetDCName *r;
1667 call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAME];
1669 r = talloc(talloc_tos(), struct netr_DsRGetDCName);
1670 if (r == NULL) {
1671 return false;
1674 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1675 talloc_free(r);
1676 return false;
1679 pull = ndr_pull_init_blob(&blob, r, NULL);
1680 if (pull == NULL) {
1681 talloc_free(r);
1682 return false;
1685 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1686 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1687 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1688 talloc_free(r);
1689 return false;
1692 if (DEBUGLEVEL >= 10) {
1693 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, r);
1696 ZERO_STRUCT(r->out);
1697 r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo *);
1698 if (r->out.info == NULL) {
1699 talloc_free(r);
1700 return false;
1703 r->out.result = _netr_DsRGetDCName(p, r);
1705 if (p->rng_fault_state) {
1706 talloc_free(r);
1707 /* Return true here, srv_pipe_hnd.c will take care */
1708 return true;
1711 if (DEBUGLEVEL >= 10) {
1712 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, r);
1715 push = ndr_push_init_ctx(r);
1716 if (push == NULL) {
1717 talloc_free(r);
1718 return false;
1721 ndr_err = call->ndr_push(push, NDR_OUT, r);
1722 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1723 talloc_free(r);
1724 return false;
1727 blob = ndr_push_blob(push);
1728 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1729 talloc_free(r);
1730 return false;
1733 talloc_free(r);
1735 return true;
1738 static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
1740 const struct ndr_interface_call *call;
1741 struct ndr_pull *pull;
1742 struct ndr_push *push;
1743 enum ndr_err_code ndr_err;
1744 DATA_BLOB blob;
1745 struct netr_NETRLOGONDUMMYROUTINE1 *r;
1747 call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONDUMMYROUTINE1];
1749 r = talloc(talloc_tos(), struct netr_NETRLOGONDUMMYROUTINE1);
1750 if (r == NULL) {
1751 return false;
1754 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1755 talloc_free(r);
1756 return false;
1759 pull = ndr_pull_init_blob(&blob, r, NULL);
1760 if (pull == NULL) {
1761 talloc_free(r);
1762 return false;
1765 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1766 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1767 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1768 talloc_free(r);
1769 return false;
1772 if (DEBUGLEVEL >= 10) {
1773 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
1776 r->out.result = _netr_NETRLOGONDUMMYROUTINE1(p, r);
1778 if (p->rng_fault_state) {
1779 talloc_free(r);
1780 /* Return true here, srv_pipe_hnd.c will take care */
1781 return true;
1784 if (DEBUGLEVEL >= 10) {
1785 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
1788 push = ndr_push_init_ctx(r);
1789 if (push == NULL) {
1790 talloc_free(r);
1791 return false;
1794 ndr_err = call->ndr_push(push, NDR_OUT, r);
1795 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1796 talloc_free(r);
1797 return false;
1800 blob = ndr_push_blob(push);
1801 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1802 talloc_free(r);
1803 return false;
1806 talloc_free(r);
1808 return true;
1811 static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct *p)
1813 const struct ndr_interface_call *call;
1814 struct ndr_pull *pull;
1815 struct ndr_push *push;
1816 enum ndr_err_code ndr_err;
1817 DATA_BLOB blob;
1818 struct netr_NETRLOGONSETSERVICEBITS *r;
1820 call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONSETSERVICEBITS];
1822 r = talloc(talloc_tos(), struct netr_NETRLOGONSETSERVICEBITS);
1823 if (r == NULL) {
1824 return false;
1827 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1828 talloc_free(r);
1829 return false;
1832 pull = ndr_pull_init_blob(&blob, r, NULL);
1833 if (pull == NULL) {
1834 talloc_free(r);
1835 return false;
1838 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1839 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1840 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1841 talloc_free(r);
1842 return false;
1845 if (DEBUGLEVEL >= 10) {
1846 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, r);
1849 r->out.result = _netr_NETRLOGONSETSERVICEBITS(p, r);
1851 if (p->rng_fault_state) {
1852 talloc_free(r);
1853 /* Return true here, srv_pipe_hnd.c will take care */
1854 return true;
1857 if (DEBUGLEVEL >= 10) {
1858 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, r);
1861 push = ndr_push_init_ctx(r);
1862 if (push == NULL) {
1863 talloc_free(r);
1864 return false;
1867 ndr_err = call->ndr_push(push, NDR_OUT, r);
1868 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1869 talloc_free(r);
1870 return false;
1873 blob = ndr_push_blob(push);
1874 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1875 talloc_free(r);
1876 return false;
1879 talloc_free(r);
1881 return true;
1884 static bool api_netr_LogonGetTrustRid(pipes_struct *p)
1886 const struct ndr_interface_call *call;
1887 struct ndr_pull *pull;
1888 struct ndr_push *push;
1889 enum ndr_err_code ndr_err;
1890 DATA_BLOB blob;
1891 struct netr_LogonGetTrustRid *r;
1893 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONGETTRUSTRID];
1895 r = talloc(talloc_tos(), struct netr_LogonGetTrustRid);
1896 if (r == NULL) {
1897 return false;
1900 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1901 talloc_free(r);
1902 return false;
1905 pull = ndr_pull_init_blob(&blob, r, NULL);
1906 if (pull == NULL) {
1907 talloc_free(r);
1908 return false;
1911 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1912 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1913 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1914 talloc_free(r);
1915 return false;
1918 if (DEBUGLEVEL >= 10) {
1919 NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid, r);
1922 ZERO_STRUCT(r->out);
1923 r->out.rid = talloc_zero(r, uint32_t);
1924 if (r->out.rid == NULL) {
1925 talloc_free(r);
1926 return false;
1929 r->out.result = _netr_LogonGetTrustRid(p, r);
1931 if (p->rng_fault_state) {
1932 talloc_free(r);
1933 /* Return true here, srv_pipe_hnd.c will take care */
1934 return true;
1937 if (DEBUGLEVEL >= 10) {
1938 NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, r);
1941 push = ndr_push_init_ctx(r);
1942 if (push == NULL) {
1943 talloc_free(r);
1944 return false;
1947 ndr_err = call->ndr_push(push, NDR_OUT, r);
1948 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1949 talloc_free(r);
1950 return false;
1953 blob = ndr_push_blob(push);
1954 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1955 talloc_free(r);
1956 return false;
1959 talloc_free(r);
1961 return true;
1964 static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p)
1966 const struct ndr_interface_call *call;
1967 struct ndr_pull *pull;
1968 struct ndr_push *push;
1969 enum ndr_err_code ndr_err;
1970 DATA_BLOB blob;
1971 struct netr_NETRLOGONCOMPUTESERVERDIGEST *r;
1973 call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST];
1975 r = talloc(talloc_tos(), struct netr_NETRLOGONCOMPUTESERVERDIGEST);
1976 if (r == NULL) {
1977 return false;
1980 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1981 talloc_free(r);
1982 return false;
1985 pull = ndr_pull_init_blob(&blob, r, NULL);
1986 if (pull == NULL) {
1987 talloc_free(r);
1988 return false;
1991 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1992 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1993 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1994 talloc_free(r);
1995 return false;
1998 if (DEBUGLEVEL >= 10) {
1999 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, r);
2002 r->out.result = _netr_NETRLOGONCOMPUTESERVERDIGEST(p, r);
2004 if (p->rng_fault_state) {
2005 talloc_free(r);
2006 /* Return true here, srv_pipe_hnd.c will take care */
2007 return true;
2010 if (DEBUGLEVEL >= 10) {
2011 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, r);
2014 push = ndr_push_init_ctx(r);
2015 if (push == NULL) {
2016 talloc_free(r);
2017 return false;
2020 ndr_err = call->ndr_push(push, NDR_OUT, r);
2021 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2022 talloc_free(r);
2023 return false;
2026 blob = ndr_push_blob(push);
2027 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2028 talloc_free(r);
2029 return false;
2032 talloc_free(r);
2034 return true;
2037 static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct *p)
2039 const struct ndr_interface_call *call;
2040 struct ndr_pull *pull;
2041 struct ndr_push *push;
2042 enum ndr_err_code ndr_err;
2043 DATA_BLOB blob;
2044 struct netr_NETRLOGONCOMPUTECLIENTDIGEST *r;
2046 call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST];
2048 r = talloc(talloc_tos(), struct netr_NETRLOGONCOMPUTECLIENTDIGEST);
2049 if (r == NULL) {
2050 return false;
2053 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2054 talloc_free(r);
2055 return false;
2058 pull = ndr_pull_init_blob(&blob, r, NULL);
2059 if (pull == NULL) {
2060 talloc_free(r);
2061 return false;
2064 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2065 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2066 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2067 talloc_free(r);
2068 return false;
2071 if (DEBUGLEVEL >= 10) {
2072 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, r);
2075 r->out.result = _netr_NETRLOGONCOMPUTECLIENTDIGEST(p, r);
2077 if (p->rng_fault_state) {
2078 talloc_free(r);
2079 /* Return true here, srv_pipe_hnd.c will take care */
2080 return true;
2083 if (DEBUGLEVEL >= 10) {
2084 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, r);
2087 push = ndr_push_init_ctx(r);
2088 if (push == NULL) {
2089 talloc_free(r);
2090 return false;
2093 ndr_err = call->ndr_push(push, NDR_OUT, r);
2094 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2095 talloc_free(r);
2096 return false;
2099 blob = ndr_push_blob(push);
2100 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2101 talloc_free(r);
2102 return false;
2105 talloc_free(r);
2107 return true;
2110 static bool api_netr_ServerAuthenticate3(pipes_struct *p)
2112 const struct ndr_interface_call *call;
2113 struct ndr_pull *pull;
2114 struct ndr_push *push;
2115 enum ndr_err_code ndr_err;
2116 DATA_BLOB blob;
2117 struct netr_ServerAuthenticate3 *r;
2119 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERAUTHENTICATE3];
2121 r = talloc(talloc_tos(), struct netr_ServerAuthenticate3);
2122 if (r == NULL) {
2123 return false;
2126 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2127 talloc_free(r);
2128 return false;
2131 pull = ndr_pull_init_blob(&blob, r, NULL);
2132 if (pull == NULL) {
2133 talloc_free(r);
2134 return false;
2137 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2138 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2139 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2140 talloc_free(r);
2141 return false;
2144 if (DEBUGLEVEL >= 10) {
2145 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3, r);
2148 ZERO_STRUCT(r->out);
2149 r->out.credentials = r->in.credentials;
2150 r->out.negotiate_flags = r->in.negotiate_flags;
2151 r->out.rid = talloc_zero(r, uint32_t);
2152 if (r->out.rid == NULL) {
2153 talloc_free(r);
2154 return false;
2157 r->out.result = _netr_ServerAuthenticate3(p, r);
2159 if (p->rng_fault_state) {
2160 talloc_free(r);
2161 /* Return true here, srv_pipe_hnd.c will take care */
2162 return true;
2165 if (DEBUGLEVEL >= 10) {
2166 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, r);
2169 push = ndr_push_init_ctx(r);
2170 if (push == NULL) {
2171 talloc_free(r);
2172 return false;
2175 ndr_err = call->ndr_push(push, NDR_OUT, r);
2176 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2177 talloc_free(r);
2178 return false;
2181 blob = ndr_push_blob(push);
2182 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2183 talloc_free(r);
2184 return false;
2187 talloc_free(r);
2189 return true;
2192 static bool api_netr_DsRGetDCNameEx(pipes_struct *p)
2194 const struct ndr_interface_call *call;
2195 struct ndr_pull *pull;
2196 struct ndr_push *push;
2197 enum ndr_err_code ndr_err;
2198 DATA_BLOB blob;
2199 struct netr_DsRGetDCNameEx *r;
2201 call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAMEEX];
2203 r = talloc(talloc_tos(), struct netr_DsRGetDCNameEx);
2204 if (r == NULL) {
2205 return false;
2208 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2209 talloc_free(r);
2210 return false;
2213 pull = ndr_pull_init_blob(&blob, r, NULL);
2214 if (pull == NULL) {
2215 talloc_free(r);
2216 return false;
2219 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2220 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2221 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2222 talloc_free(r);
2223 return false;
2226 if (DEBUGLEVEL >= 10) {
2227 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, r);
2230 ZERO_STRUCT(r->out);
2231 r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo *);
2232 if (r->out.info == NULL) {
2233 talloc_free(r);
2234 return false;
2237 r->out.result = _netr_DsRGetDCNameEx(p, r);
2239 if (p->rng_fault_state) {
2240 talloc_free(r);
2241 /* Return true here, srv_pipe_hnd.c will take care */
2242 return true;
2245 if (DEBUGLEVEL >= 10) {
2246 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, r);
2249 push = ndr_push_init_ctx(r);
2250 if (push == NULL) {
2251 talloc_free(r);
2252 return false;
2255 ndr_err = call->ndr_push(push, NDR_OUT, r);
2256 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2257 talloc_free(r);
2258 return false;
2261 blob = ndr_push_blob(push);
2262 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2263 talloc_free(r);
2264 return false;
2267 talloc_free(r);
2269 return true;
2272 static bool api_netr_DsRGetSiteName(pipes_struct *p)
2274 const struct ndr_interface_call *call;
2275 struct ndr_pull *pull;
2276 struct ndr_push *push;
2277 enum ndr_err_code ndr_err;
2278 DATA_BLOB blob;
2279 struct netr_DsRGetSiteName *r;
2281 call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETSITENAME];
2283 r = talloc(talloc_tos(), struct netr_DsRGetSiteName);
2284 if (r == NULL) {
2285 return false;
2288 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2289 talloc_free(r);
2290 return false;
2293 pull = ndr_pull_init_blob(&blob, r, NULL);
2294 if (pull == NULL) {
2295 talloc_free(r);
2296 return false;
2299 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2300 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2301 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2302 talloc_free(r);
2303 return false;
2306 if (DEBUGLEVEL >= 10) {
2307 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, r);
2310 ZERO_STRUCT(r->out);
2311 r->out.site = talloc_zero(r, const char *);
2312 if (r->out.site == NULL) {
2313 talloc_free(r);
2314 return false;
2317 r->out.result = _netr_DsRGetSiteName(p, r);
2319 if (p->rng_fault_state) {
2320 talloc_free(r);
2321 /* Return true here, srv_pipe_hnd.c will take care */
2322 return true;
2325 if (DEBUGLEVEL >= 10) {
2326 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, r);
2329 push = ndr_push_init_ctx(r);
2330 if (push == NULL) {
2331 talloc_free(r);
2332 return false;
2335 ndr_err = call->ndr_push(push, NDR_OUT, r);
2336 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2337 talloc_free(r);
2338 return false;
2341 blob = ndr_push_blob(push);
2342 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2343 talloc_free(r);
2344 return false;
2347 talloc_free(r);
2349 return true;
2352 static bool api_netr_LogonGetDomainInfo(pipes_struct *p)
2354 const struct ndr_interface_call *call;
2355 struct ndr_pull *pull;
2356 struct ndr_push *push;
2357 enum ndr_err_code ndr_err;
2358 DATA_BLOB blob;
2359 struct netr_LogonGetDomainInfo *r;
2361 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONGETDOMAININFO];
2363 r = talloc(talloc_tos(), struct netr_LogonGetDomainInfo);
2364 if (r == NULL) {
2365 return false;
2368 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2369 talloc_free(r);
2370 return false;
2373 pull = ndr_pull_init_blob(&blob, r, NULL);
2374 if (pull == NULL) {
2375 talloc_free(r);
2376 return false;
2379 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2380 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2381 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2382 talloc_free(r);
2383 return false;
2386 if (DEBUGLEVEL >= 10) {
2387 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, r);
2390 ZERO_STRUCT(r->out);
2391 r->out.return_authenticator = r->in.return_authenticator;
2392 r->out.info = talloc_zero(r, union netr_DomainInfo);
2393 if (r->out.info == NULL) {
2394 talloc_free(r);
2395 return false;
2398 r->out.result = _netr_LogonGetDomainInfo(p, r);
2400 if (p->rng_fault_state) {
2401 talloc_free(r);
2402 /* Return true here, srv_pipe_hnd.c will take care */
2403 return true;
2406 if (DEBUGLEVEL >= 10) {
2407 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, r);
2410 push = ndr_push_init_ctx(r);
2411 if (push == NULL) {
2412 talloc_free(r);
2413 return false;
2416 ndr_err = call->ndr_push(push, NDR_OUT, r);
2417 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2418 talloc_free(r);
2419 return false;
2422 blob = ndr_push_blob(push);
2423 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2424 talloc_free(r);
2425 return false;
2428 talloc_free(r);
2430 return true;
2433 static bool api_netr_ServerPasswordSet2(pipes_struct *p)
2435 const struct ndr_interface_call *call;
2436 struct ndr_pull *pull;
2437 struct ndr_push *push;
2438 enum ndr_err_code ndr_err;
2439 DATA_BLOB blob;
2440 struct netr_ServerPasswordSet2 *r;
2442 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDSET2];
2444 r = talloc(talloc_tos(), struct netr_ServerPasswordSet2);
2445 if (r == NULL) {
2446 return false;
2449 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2450 talloc_free(r);
2451 return false;
2454 pull = ndr_pull_init_blob(&blob, r, NULL);
2455 if (pull == NULL) {
2456 talloc_free(r);
2457 return false;
2460 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2461 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2462 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2463 talloc_free(r);
2464 return false;
2467 if (DEBUGLEVEL >= 10) {
2468 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, r);
2471 ZERO_STRUCT(r->out);
2472 r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator);
2473 if (r->out.return_authenticator == NULL) {
2474 talloc_free(r);
2475 return false;
2478 r->out.result = _netr_ServerPasswordSet2(p, r);
2480 if (p->rng_fault_state) {
2481 talloc_free(r);
2482 /* Return true here, srv_pipe_hnd.c will take care */
2483 return true;
2486 if (DEBUGLEVEL >= 10) {
2487 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, r);
2490 push = ndr_push_init_ctx(r);
2491 if (push == NULL) {
2492 talloc_free(r);
2493 return false;
2496 ndr_err = call->ndr_push(push, NDR_OUT, r);
2497 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2498 talloc_free(r);
2499 return false;
2502 blob = ndr_push_blob(push);
2503 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2504 talloc_free(r);
2505 return false;
2508 talloc_free(r);
2510 return true;
2513 static bool api_netr_ServerPasswordGet(pipes_struct *p)
2515 const struct ndr_interface_call *call;
2516 struct ndr_pull *pull;
2517 struct ndr_push *push;
2518 enum ndr_err_code ndr_err;
2519 DATA_BLOB blob;
2520 struct netr_ServerPasswordGet *r;
2522 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERPASSWORDGET];
2524 r = talloc(talloc_tos(), struct netr_ServerPasswordGet);
2525 if (r == NULL) {
2526 return false;
2529 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2530 talloc_free(r);
2531 return false;
2534 pull = ndr_pull_init_blob(&blob, r, NULL);
2535 if (pull == NULL) {
2536 talloc_free(r);
2537 return false;
2540 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2541 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2542 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2543 talloc_free(r);
2544 return false;
2547 if (DEBUGLEVEL >= 10) {
2548 NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, r);
2551 ZERO_STRUCT(r->out);
2552 r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator);
2553 if (r->out.return_authenticator == NULL) {
2554 talloc_free(r);
2555 return false;
2558 r->out.password = talloc_zero(r, struct samr_Password);
2559 if (r->out.password == NULL) {
2560 talloc_free(r);
2561 return false;
2564 r->out.result = _netr_ServerPasswordGet(p, r);
2566 if (p->rng_fault_state) {
2567 talloc_free(r);
2568 /* Return true here, srv_pipe_hnd.c will take care */
2569 return true;
2572 if (DEBUGLEVEL >= 10) {
2573 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, r);
2576 push = ndr_push_init_ctx(r);
2577 if (push == NULL) {
2578 talloc_free(r);
2579 return false;
2582 ndr_err = call->ndr_push(push, NDR_OUT, r);
2583 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2584 talloc_free(r);
2585 return false;
2588 blob = ndr_push_blob(push);
2589 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2590 talloc_free(r);
2591 return false;
2594 talloc_free(r);
2596 return true;
2599 static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct *p)
2601 const struct ndr_interface_call *call;
2602 struct ndr_pull *pull;
2603 struct ndr_push *push;
2604 enum ndr_err_code ndr_err;
2605 DATA_BLOB blob;
2606 struct netr_NETRLOGONSENDTOSAM *r;
2608 call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONSENDTOSAM];
2610 r = talloc(talloc_tos(), struct netr_NETRLOGONSENDTOSAM);
2611 if (r == NULL) {
2612 return false;
2615 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2616 talloc_free(r);
2617 return false;
2620 pull = ndr_pull_init_blob(&blob, r, NULL);
2621 if (pull == NULL) {
2622 talloc_free(r);
2623 return false;
2626 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2627 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2628 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2629 talloc_free(r);
2630 return false;
2633 if (DEBUGLEVEL >= 10) {
2634 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, r);
2637 r->out.result = _netr_NETRLOGONSENDTOSAM(p, r);
2639 if (p->rng_fault_state) {
2640 talloc_free(r);
2641 /* Return true here, srv_pipe_hnd.c will take care */
2642 return true;
2645 if (DEBUGLEVEL >= 10) {
2646 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, r);
2649 push = ndr_push_init_ctx(r);
2650 if (push == NULL) {
2651 talloc_free(r);
2652 return false;
2655 ndr_err = call->ndr_push(push, NDR_OUT, r);
2656 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2657 talloc_free(r);
2658 return false;
2661 blob = ndr_push_blob(push);
2662 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2663 talloc_free(r);
2664 return false;
2667 talloc_free(r);
2669 return true;
2672 static bool api_netr_DsRAddressToSitenamesW(pipes_struct *p)
2674 const struct ndr_interface_call *call;
2675 struct ndr_pull *pull;
2676 struct ndr_push *push;
2677 enum ndr_err_code ndr_err;
2678 DATA_BLOB blob;
2679 struct netr_DsRAddressToSitenamesW *r;
2681 call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESW];
2683 r = talloc(talloc_tos(), struct netr_DsRAddressToSitenamesW);
2684 if (r == NULL) {
2685 return false;
2688 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2689 talloc_free(r);
2690 return false;
2693 pull = ndr_pull_init_blob(&blob, r, NULL);
2694 if (pull == NULL) {
2695 talloc_free(r);
2696 return false;
2699 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2700 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2701 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2702 talloc_free(r);
2703 return false;
2706 if (DEBUGLEVEL >= 10) {
2707 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, r);
2710 ZERO_STRUCT(r->out);
2711 r->out.ctr = talloc_zero(r, struct netr_DsRAddressToSitenamesWCtr *);
2712 if (r->out.ctr == NULL) {
2713 talloc_free(r);
2714 return false;
2717 r->out.result = _netr_DsRAddressToSitenamesW(p, r);
2719 if (p->rng_fault_state) {
2720 talloc_free(r);
2721 /* Return true here, srv_pipe_hnd.c will take care */
2722 return true;
2725 if (DEBUGLEVEL >= 10) {
2726 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, r);
2729 push = ndr_push_init_ctx(r);
2730 if (push == NULL) {
2731 talloc_free(r);
2732 return false;
2735 ndr_err = call->ndr_push(push, NDR_OUT, r);
2736 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2737 talloc_free(r);
2738 return false;
2741 blob = ndr_push_blob(push);
2742 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2743 talloc_free(r);
2744 return false;
2747 talloc_free(r);
2749 return true;
2752 static bool api_netr_DsRGetDCNameEx2(pipes_struct *p)
2754 const struct ndr_interface_call *call;
2755 struct ndr_pull *pull;
2756 struct ndr_push *push;
2757 enum ndr_err_code ndr_err;
2758 DATA_BLOB blob;
2759 struct netr_DsRGetDCNameEx2 *r;
2761 call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCNAMEEX2];
2763 r = talloc(talloc_tos(), struct netr_DsRGetDCNameEx2);
2764 if (r == NULL) {
2765 return false;
2768 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2769 talloc_free(r);
2770 return false;
2773 pull = ndr_pull_init_blob(&blob, r, NULL);
2774 if (pull == NULL) {
2775 talloc_free(r);
2776 return false;
2779 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2780 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2781 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2782 talloc_free(r);
2783 return false;
2786 if (DEBUGLEVEL >= 10) {
2787 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, r);
2790 ZERO_STRUCT(r->out);
2791 r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo *);
2792 if (r->out.info == NULL) {
2793 talloc_free(r);
2794 return false;
2797 r->out.result = _netr_DsRGetDCNameEx2(p, r);
2799 if (p->rng_fault_state) {
2800 talloc_free(r);
2801 /* Return true here, srv_pipe_hnd.c will take care */
2802 return true;
2805 if (DEBUGLEVEL >= 10) {
2806 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, r);
2809 push = ndr_push_init_ctx(r);
2810 if (push == NULL) {
2811 talloc_free(r);
2812 return false;
2815 ndr_err = call->ndr_push(push, NDR_OUT, r);
2816 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2817 talloc_free(r);
2818 return false;
2821 blob = ndr_push_blob(push);
2822 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2823 talloc_free(r);
2824 return false;
2827 talloc_free(r);
2829 return true;
2832 static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct *p)
2834 const struct ndr_interface_call *call;
2835 struct ndr_pull *pull;
2836 struct ndr_push *push;
2837 enum ndr_err_code ndr_err;
2838 DATA_BLOB blob;
2839 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN *r;
2841 call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN];
2843 r = talloc(talloc_tos(), struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN);
2844 if (r == NULL) {
2845 return false;
2848 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2849 talloc_free(r);
2850 return false;
2853 pull = ndr_pull_init_blob(&blob, r, NULL);
2854 if (pull == NULL) {
2855 talloc_free(r);
2856 return false;
2859 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2860 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2861 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2862 talloc_free(r);
2863 return false;
2866 if (DEBUGLEVEL >= 10) {
2867 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, r);
2870 r->out.result = _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(p, r);
2872 if (p->rng_fault_state) {
2873 talloc_free(r);
2874 /* Return true here, srv_pipe_hnd.c will take care */
2875 return true;
2878 if (DEBUGLEVEL >= 10) {
2879 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, r);
2882 push = ndr_push_init_ctx(r);
2883 if (push == NULL) {
2884 talloc_free(r);
2885 return false;
2888 ndr_err = call->ndr_push(push, NDR_OUT, r);
2889 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2890 talloc_free(r);
2891 return false;
2894 blob = ndr_push_blob(push);
2895 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2896 talloc_free(r);
2897 return false;
2900 talloc_free(r);
2902 return true;
2905 static bool api_netr_NetrEnumerateTrustedDomainsEx(pipes_struct *p)
2907 const struct ndr_interface_call *call;
2908 struct ndr_pull *pull;
2909 struct ndr_push *push;
2910 enum ndr_err_code ndr_err;
2911 DATA_BLOB blob;
2912 struct netr_NetrEnumerateTrustedDomainsEx *r;
2914 call = &ndr_table_netlogon.calls[NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX];
2916 r = talloc(talloc_tos(), struct netr_NetrEnumerateTrustedDomainsEx);
2917 if (r == NULL) {
2918 return false;
2921 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2922 talloc_free(r);
2923 return false;
2926 pull = ndr_pull_init_blob(&blob, r, NULL);
2927 if (pull == NULL) {
2928 talloc_free(r);
2929 return false;
2932 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2933 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2934 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2935 talloc_free(r);
2936 return false;
2939 if (DEBUGLEVEL >= 10) {
2940 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, r);
2943 ZERO_STRUCT(r->out);
2944 r->out.dom_trust_list = talloc_zero(r, struct netr_DomainTrustList);
2945 if (r->out.dom_trust_list == NULL) {
2946 talloc_free(r);
2947 return false;
2950 r->out.result = _netr_NetrEnumerateTrustedDomainsEx(p, r);
2952 if (p->rng_fault_state) {
2953 talloc_free(r);
2954 /* Return true here, srv_pipe_hnd.c will take care */
2955 return true;
2958 if (DEBUGLEVEL >= 10) {
2959 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, r);
2962 push = ndr_push_init_ctx(r);
2963 if (push == NULL) {
2964 talloc_free(r);
2965 return false;
2968 ndr_err = call->ndr_push(push, NDR_OUT, r);
2969 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2970 talloc_free(r);
2971 return false;
2974 blob = ndr_push_blob(push);
2975 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2976 talloc_free(r);
2977 return false;
2980 talloc_free(r);
2982 return true;
2985 static bool api_netr_DsRAddressToSitenamesExW(pipes_struct *p)
2987 const struct ndr_interface_call *call;
2988 struct ndr_pull *pull;
2989 struct ndr_push *push;
2990 enum ndr_err_code ndr_err;
2991 DATA_BLOB blob;
2992 struct netr_DsRAddressToSitenamesExW *r;
2994 call = &ndr_table_netlogon.calls[NDR_NETR_DSRADDRESSTOSITENAMESEXW];
2996 r = talloc(talloc_tos(), struct netr_DsRAddressToSitenamesExW);
2997 if (r == NULL) {
2998 return false;
3001 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3002 talloc_free(r);
3003 return false;
3006 pull = ndr_pull_init_blob(&blob, r, NULL);
3007 if (pull == NULL) {
3008 talloc_free(r);
3009 return false;
3012 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3013 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3014 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3015 talloc_free(r);
3016 return false;
3019 if (DEBUGLEVEL >= 10) {
3020 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, r);
3023 ZERO_STRUCT(r->out);
3024 r->out.ctr = talloc_zero(r, struct netr_DsRAddressToSitenamesExWCtr *);
3025 if (r->out.ctr == NULL) {
3026 talloc_free(r);
3027 return false;
3030 r->out.result = _netr_DsRAddressToSitenamesExW(p, r);
3032 if (p->rng_fault_state) {
3033 talloc_free(r);
3034 /* Return true here, srv_pipe_hnd.c will take care */
3035 return true;
3038 if (DEBUGLEVEL >= 10) {
3039 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, r);
3042 push = ndr_push_init_ctx(r);
3043 if (push == NULL) {
3044 talloc_free(r);
3045 return false;
3048 ndr_err = call->ndr_push(push, NDR_OUT, r);
3049 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3050 talloc_free(r);
3051 return false;
3054 blob = ndr_push_blob(push);
3055 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3056 talloc_free(r);
3057 return false;
3060 talloc_free(r);
3062 return true;
3065 static bool api_netr_DsrGetDcSiteCoverageW(pipes_struct *p)
3067 const struct ndr_interface_call *call;
3068 struct ndr_pull *pull;
3069 struct ndr_push *push;
3070 enum ndr_err_code ndr_err;
3071 DATA_BLOB blob;
3072 struct netr_DsrGetDcSiteCoverageW *r;
3074 call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETDCSITECOVERAGEW];
3076 r = talloc(talloc_tos(), struct netr_DsrGetDcSiteCoverageW);
3077 if (r == NULL) {
3078 return false;
3081 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3082 talloc_free(r);
3083 return false;
3086 pull = ndr_pull_init_blob(&blob, r, NULL);
3087 if (pull == NULL) {
3088 talloc_free(r);
3089 return false;
3092 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3093 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3094 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3095 talloc_free(r);
3096 return false;
3099 if (DEBUGLEVEL >= 10) {
3100 NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, r);
3103 ZERO_STRUCT(r->out);
3104 r->out.ctr = talloc_zero(r, struct DcSitesCtr);
3105 if (r->out.ctr == NULL) {
3106 talloc_free(r);
3107 return false;
3110 r->out.result = _netr_DsrGetDcSiteCoverageW(p, r);
3112 if (p->rng_fault_state) {
3113 talloc_free(r);
3114 /* Return true here, srv_pipe_hnd.c will take care */
3115 return true;
3118 if (DEBUGLEVEL >= 10) {
3119 NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, r);
3122 push = ndr_push_init_ctx(r);
3123 if (push == NULL) {
3124 talloc_free(r);
3125 return false;
3128 ndr_err = call->ndr_push(push, NDR_OUT, r);
3129 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3130 talloc_free(r);
3131 return false;
3134 blob = ndr_push_blob(push);
3135 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3136 talloc_free(r);
3137 return false;
3140 talloc_free(r);
3142 return true;
3145 static bool api_netr_LogonSamLogonEx(pipes_struct *p)
3147 const struct ndr_interface_call *call;
3148 struct ndr_pull *pull;
3149 struct ndr_push *push;
3150 enum ndr_err_code ndr_err;
3151 DATA_BLOB blob;
3152 struct netr_LogonSamLogonEx *r;
3154 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGONEX];
3156 r = talloc(talloc_tos(), struct netr_LogonSamLogonEx);
3157 if (r == NULL) {
3158 return false;
3161 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3162 talloc_free(r);
3163 return false;
3166 pull = ndr_pull_init_blob(&blob, r, NULL);
3167 if (pull == NULL) {
3168 talloc_free(r);
3169 return false;
3172 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3173 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3174 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3175 talloc_free(r);
3176 return false;
3179 if (DEBUGLEVEL >= 10) {
3180 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, r);
3183 ZERO_STRUCT(r->out);
3184 r->out.validation = talloc_zero(r, union netr_Validation);
3185 if (r->out.validation == NULL) {
3186 talloc_free(r);
3187 return false;
3190 r->out.authoritative = talloc_zero(r, uint8_t);
3191 if (r->out.authoritative == NULL) {
3192 talloc_free(r);
3193 return false;
3196 r->out.flags = r->in.flags;
3197 r->out.result = _netr_LogonSamLogonEx(p, r);
3199 if (p->rng_fault_state) {
3200 talloc_free(r);
3201 /* Return true here, srv_pipe_hnd.c will take care */
3202 return true;
3205 if (DEBUGLEVEL >= 10) {
3206 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, r);
3209 push = ndr_push_init_ctx(r);
3210 if (push == NULL) {
3211 talloc_free(r);
3212 return false;
3215 ndr_err = call->ndr_push(push, NDR_OUT, r);
3216 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3217 talloc_free(r);
3218 return false;
3221 blob = ndr_push_blob(push);
3222 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3223 talloc_free(r);
3224 return false;
3227 talloc_free(r);
3229 return true;
3232 static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct *p)
3234 const struct ndr_interface_call *call;
3235 struct ndr_pull *pull;
3236 struct ndr_push *push;
3237 enum ndr_err_code ndr_err;
3238 DATA_BLOB blob;
3239 struct netr_DsrEnumerateDomainTrusts *r;
3241 call = &ndr_table_netlogon.calls[NDR_NETR_DSRENUMERATEDOMAINTRUSTS];
3243 r = talloc(talloc_tos(), struct netr_DsrEnumerateDomainTrusts);
3244 if (r == NULL) {
3245 return false;
3248 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3249 talloc_free(r);
3250 return false;
3253 pull = ndr_pull_init_blob(&blob, r, NULL);
3254 if (pull == NULL) {
3255 talloc_free(r);
3256 return false;
3259 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3260 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3261 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3262 talloc_free(r);
3263 return false;
3266 if (DEBUGLEVEL >= 10) {
3267 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, r);
3270 ZERO_STRUCT(r->out);
3271 r->out.trusts = talloc_zero(r, struct netr_DomainTrustList);
3272 if (r->out.trusts == NULL) {
3273 talloc_free(r);
3274 return false;
3277 r->out.result = _netr_DsrEnumerateDomainTrusts(p, r);
3279 if (p->rng_fault_state) {
3280 talloc_free(r);
3281 /* Return true here, srv_pipe_hnd.c will take care */
3282 return true;
3285 if (DEBUGLEVEL >= 10) {
3286 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, r);
3289 push = ndr_push_init_ctx(r);
3290 if (push == NULL) {
3291 talloc_free(r);
3292 return false;
3295 ndr_err = call->ndr_push(push, NDR_OUT, r);
3296 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3297 talloc_free(r);
3298 return false;
3301 blob = ndr_push_blob(push);
3302 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3303 talloc_free(r);
3304 return false;
3307 talloc_free(r);
3309 return true;
3312 static bool api_netr_DsrDeregisterDNSHostRecords(pipes_struct *p)
3314 const struct ndr_interface_call *call;
3315 struct ndr_pull *pull;
3316 struct ndr_push *push;
3317 enum ndr_err_code ndr_err;
3318 DATA_BLOB blob;
3319 struct netr_DsrDeregisterDNSHostRecords *r;
3321 call = &ndr_table_netlogon.calls[NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS];
3323 r = talloc(talloc_tos(), struct netr_DsrDeregisterDNSHostRecords);
3324 if (r == NULL) {
3325 return false;
3328 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3329 talloc_free(r);
3330 return false;
3333 pull = ndr_pull_init_blob(&blob, r, NULL);
3334 if (pull == NULL) {
3335 talloc_free(r);
3336 return false;
3339 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3340 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3341 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3342 talloc_free(r);
3343 return false;
3346 if (DEBUGLEVEL >= 10) {
3347 NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords, r);
3350 r->out.result = _netr_DsrDeregisterDNSHostRecords(p, r);
3352 if (p->rng_fault_state) {
3353 talloc_free(r);
3354 /* Return true here, srv_pipe_hnd.c will take care */
3355 return true;
3358 if (DEBUGLEVEL >= 10) {
3359 NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, r);
3362 push = ndr_push_init_ctx(r);
3363 if (push == NULL) {
3364 talloc_free(r);
3365 return false;
3368 ndr_err = call->ndr_push(push, NDR_OUT, r);
3369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3370 talloc_free(r);
3371 return false;
3374 blob = ndr_push_blob(push);
3375 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3376 talloc_free(r);
3377 return false;
3380 talloc_free(r);
3382 return true;
3385 static bool api_netr_ServerTrustPasswordsGet(pipes_struct *p)
3387 const struct ndr_interface_call *call;
3388 struct ndr_pull *pull;
3389 struct ndr_push *push;
3390 enum ndr_err_code ndr_err;
3391 DATA_BLOB blob;
3392 struct netr_ServerTrustPasswordsGet *r;
3394 call = &ndr_table_netlogon.calls[NDR_NETR_SERVERTRUSTPASSWORDSGET];
3396 r = talloc(talloc_tos(), struct netr_ServerTrustPasswordsGet);
3397 if (r == NULL) {
3398 return false;
3401 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3402 talloc_free(r);
3403 return false;
3406 pull = ndr_pull_init_blob(&blob, r, NULL);
3407 if (pull == NULL) {
3408 talloc_free(r);
3409 return false;
3412 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3413 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3414 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3415 talloc_free(r);
3416 return false;
3419 if (DEBUGLEVEL >= 10) {
3420 NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, r);
3423 ZERO_STRUCT(r->out);
3424 r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator);
3425 if (r->out.return_authenticator == NULL) {
3426 talloc_free(r);
3427 return false;
3430 r->out.password = talloc_zero(r, struct samr_Password);
3431 if (r->out.password == NULL) {
3432 talloc_free(r);
3433 return false;
3436 r->out.password2 = talloc_zero(r, struct samr_Password);
3437 if (r->out.password2 == NULL) {
3438 talloc_free(r);
3439 return false;
3442 r->out.result = _netr_ServerTrustPasswordsGet(p, r);
3444 if (p->rng_fault_state) {
3445 talloc_free(r);
3446 /* Return true here, srv_pipe_hnd.c will take care */
3447 return true;
3450 if (DEBUGLEVEL >= 10) {
3451 NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, r);
3454 push = ndr_push_init_ctx(r);
3455 if (push == NULL) {
3456 talloc_free(r);
3457 return false;
3460 ndr_err = call->ndr_push(push, NDR_OUT, r);
3461 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3462 talloc_free(r);
3463 return false;
3466 blob = ndr_push_blob(push);
3467 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3468 talloc_free(r);
3469 return false;
3472 talloc_free(r);
3474 return true;
3477 static bool api_netr_DsRGetForestTrustInformation(pipes_struct *p)
3479 const struct ndr_interface_call *call;
3480 struct ndr_pull *pull;
3481 struct ndr_push *push;
3482 enum ndr_err_code ndr_err;
3483 DATA_BLOB blob;
3484 struct netr_DsRGetForestTrustInformation *r;
3486 call = &ndr_table_netlogon.calls[NDR_NETR_DSRGETFORESTTRUSTINFORMATION];
3488 r = talloc(talloc_tos(), struct netr_DsRGetForestTrustInformation);
3489 if (r == NULL) {
3490 return false;
3493 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3494 talloc_free(r);
3495 return false;
3498 pull = ndr_pull_init_blob(&blob, r, NULL);
3499 if (pull == NULL) {
3500 talloc_free(r);
3501 return false;
3504 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3505 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3506 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3507 talloc_free(r);
3508 return false;
3511 if (DEBUGLEVEL >= 10) {
3512 NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, r);
3515 ZERO_STRUCT(r->out);
3516 r->out.forest_trust_info = talloc_zero(r, struct lsa_ForestTrustInformation *);
3517 if (r->out.forest_trust_info == NULL) {
3518 talloc_free(r);
3519 return false;
3522 r->out.result = _netr_DsRGetForestTrustInformation(p, r);
3524 if (p->rng_fault_state) {
3525 talloc_free(r);
3526 /* Return true here, srv_pipe_hnd.c will take care */
3527 return true;
3530 if (DEBUGLEVEL >= 10) {
3531 NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, r);
3534 push = ndr_push_init_ctx(r);
3535 if (push == NULL) {
3536 talloc_free(r);
3537 return false;
3540 ndr_err = call->ndr_push(push, NDR_OUT, r);
3541 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3542 talloc_free(r);
3543 return false;
3546 blob = ndr_push_blob(push);
3547 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3548 talloc_free(r);
3549 return false;
3552 talloc_free(r);
3554 return true;
3557 static bool api_netr_GetForestTrustInformation(pipes_struct *p)
3559 const struct ndr_interface_call *call;
3560 struct ndr_pull *pull;
3561 struct ndr_push *push;
3562 enum ndr_err_code ndr_err;
3563 DATA_BLOB blob;
3564 struct netr_GetForestTrustInformation *r;
3566 call = &ndr_table_netlogon.calls[NDR_NETR_GETFORESTTRUSTINFORMATION];
3568 r = talloc(talloc_tos(), struct netr_GetForestTrustInformation);
3569 if (r == NULL) {
3570 return false;
3573 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3574 talloc_free(r);
3575 return false;
3578 pull = ndr_pull_init_blob(&blob, r, NULL);
3579 if (pull == NULL) {
3580 talloc_free(r);
3581 return false;
3584 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3585 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3586 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3587 talloc_free(r);
3588 return false;
3591 if (DEBUGLEVEL >= 10) {
3592 NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, r);
3595 ZERO_STRUCT(r->out);
3596 r->out.return_authenticator = talloc_zero(r, struct netr_Authenticator);
3597 if (r->out.return_authenticator == NULL) {
3598 talloc_free(r);
3599 return false;
3602 r->out.forest_trust_info = talloc_zero(r, struct lsa_ForestTrustInformation *);
3603 if (r->out.forest_trust_info == NULL) {
3604 talloc_free(r);
3605 return false;
3608 r->out.result = _netr_GetForestTrustInformation(p, r);
3610 if (p->rng_fault_state) {
3611 talloc_free(r);
3612 /* Return true here, srv_pipe_hnd.c will take care */
3613 return true;
3616 if (DEBUGLEVEL >= 10) {
3617 NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, r);
3620 push = ndr_push_init_ctx(r);
3621 if (push == NULL) {
3622 talloc_free(r);
3623 return false;
3626 ndr_err = call->ndr_push(push, NDR_OUT, r);
3627 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3628 talloc_free(r);
3629 return false;
3632 blob = ndr_push_blob(push);
3633 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3634 talloc_free(r);
3635 return false;
3638 talloc_free(r);
3640 return true;
3643 static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p)
3645 const struct ndr_interface_call *call;
3646 struct ndr_pull *pull;
3647 struct ndr_push *push;
3648 enum ndr_err_code ndr_err;
3649 DATA_BLOB blob;
3650 struct netr_LogonSamLogonWithFlags *r;
3652 call = &ndr_table_netlogon.calls[NDR_NETR_LOGONSAMLOGONWITHFLAGS];
3654 r = talloc(talloc_tos(), struct netr_LogonSamLogonWithFlags);
3655 if (r == NULL) {
3656 return false;
3659 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3660 talloc_free(r);
3661 return false;
3664 pull = ndr_pull_init_blob(&blob, r, NULL);
3665 if (pull == NULL) {
3666 talloc_free(r);
3667 return false;
3670 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3671 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3672 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3673 talloc_free(r);
3674 return false;
3677 if (DEBUGLEVEL >= 10) {
3678 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, r);
3681 ZERO_STRUCT(r->out);
3682 r->out.return_authenticator = r->in.return_authenticator;
3683 r->out.validation = talloc_zero(r, union netr_Validation);
3684 if (r->out.validation == NULL) {
3685 talloc_free(r);
3686 return false;
3689 r->out.authoritative = talloc_zero(r, uint8_t);
3690 if (r->out.authoritative == NULL) {
3691 talloc_free(r);
3692 return false;
3695 r->out.flags = r->in.flags;
3696 r->out.result = _netr_LogonSamLogonWithFlags(p, r);
3698 if (p->rng_fault_state) {
3699 talloc_free(r);
3700 /* Return true here, srv_pipe_hnd.c will take care */
3701 return true;
3704 if (DEBUGLEVEL >= 10) {
3705 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, r);
3708 push = ndr_push_init_ctx(r);
3709 if (push == NULL) {
3710 talloc_free(r);
3711 return false;
3714 ndr_err = call->ndr_push(push, NDR_OUT, r);
3715 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3716 talloc_free(r);
3717 return false;
3720 blob = ndr_push_blob(push);
3721 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3722 talloc_free(r);
3723 return false;
3726 talloc_free(r);
3728 return true;
3731 static bool api_netr_NETRSERVERGETTRUSTINFO(pipes_struct *p)
3733 const struct ndr_interface_call *call;
3734 struct ndr_pull *pull;
3735 struct ndr_push *push;
3736 enum ndr_err_code ndr_err;
3737 DATA_BLOB blob;
3738 struct netr_NETRSERVERGETTRUSTINFO *r;
3740 call = &ndr_table_netlogon.calls[NDR_NETR_NETRSERVERGETTRUSTINFO];
3742 r = talloc(talloc_tos(), struct netr_NETRSERVERGETTRUSTINFO);
3743 if (r == NULL) {
3744 return false;
3747 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3748 talloc_free(r);
3749 return false;
3752 pull = ndr_pull_init_blob(&blob, r, NULL);
3753 if (pull == NULL) {
3754 talloc_free(r);
3755 return false;
3758 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3759 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3760 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3761 talloc_free(r);
3762 return false;
3765 if (DEBUGLEVEL >= 10) {
3766 NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO, r);
3769 r->out.result = _netr_NETRSERVERGETTRUSTINFO(p, r);
3771 if (p->rng_fault_state) {
3772 talloc_free(r);
3773 /* Return true here, srv_pipe_hnd.c will take care */
3774 return true;
3777 if (DEBUGLEVEL >= 10) {
3778 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, r);
3781 push = ndr_push_init_ctx(r);
3782 if (push == NULL) {
3783 talloc_free(r);
3784 return false;
3787 ndr_err = call->ndr_push(push, NDR_OUT, r);
3788 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3789 talloc_free(r);
3790 return false;
3793 blob = ndr_push_blob(push);
3794 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3795 talloc_free(r);
3796 return false;
3799 talloc_free(r);
3801 return true;
3805 /* Tables */
3806 static struct api_struct api_netlogon_cmds[] =
3808 {"NETR_LOGONUASLOGON", NDR_NETR_LOGONUASLOGON, api_netr_LogonUasLogon},
3809 {"NETR_LOGONUASLOGOFF", NDR_NETR_LOGONUASLOGOFF, api_netr_LogonUasLogoff},
3810 {"NETR_LOGONSAMLOGON", NDR_NETR_LOGONSAMLOGON, api_netr_LogonSamLogon},
3811 {"NETR_LOGONSAMLOGOFF", NDR_NETR_LOGONSAMLOGOFF, api_netr_LogonSamLogoff},
3812 {"NETR_SERVERREQCHALLENGE", NDR_NETR_SERVERREQCHALLENGE, api_netr_ServerReqChallenge},
3813 {"NETR_SERVERAUTHENTICATE", NDR_NETR_SERVERAUTHENTICATE, api_netr_ServerAuthenticate},
3814 {"NETR_SERVERPASSWORDSET", NDR_NETR_SERVERPASSWORDSET, api_netr_ServerPasswordSet},
3815 {"NETR_DATABASEDELTAS", NDR_NETR_DATABASEDELTAS, api_netr_DatabaseDeltas},
3816 {"NETR_DATABASESYNC", NDR_NETR_DATABASESYNC, api_netr_DatabaseSync},
3817 {"NETR_ACCOUNTDELTAS", NDR_NETR_ACCOUNTDELTAS, api_netr_AccountDeltas},
3818 {"NETR_ACCOUNTSYNC", NDR_NETR_ACCOUNTSYNC, api_netr_AccountSync},
3819 {"NETR_GETDCNAME", NDR_NETR_GETDCNAME, api_netr_GetDcName},
3820 {"NETR_LOGONCONTROL", NDR_NETR_LOGONCONTROL, api_netr_LogonControl},
3821 {"NETR_GETANYDCNAME", NDR_NETR_GETANYDCNAME, api_netr_GetAnyDCName},
3822 {"NETR_LOGONCONTROL2", NDR_NETR_LOGONCONTROL2, api_netr_LogonControl2},
3823 {"NETR_SERVERAUTHENTICATE2", NDR_NETR_SERVERAUTHENTICATE2, api_netr_ServerAuthenticate2},
3824 {"NETR_DATABASESYNC2", NDR_NETR_DATABASESYNC2, api_netr_DatabaseSync2},
3825 {"NETR_DATABASEREDO", NDR_NETR_DATABASEREDO, api_netr_DatabaseRedo},
3826 {"NETR_LOGONCONTROL2EX", NDR_NETR_LOGONCONTROL2EX, api_netr_LogonControl2Ex},
3827 {"NETR_NETRENUMERATETRUSTEDDOMAINS", NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, api_netr_NetrEnumerateTrustedDomains},
3828 {"NETR_DSRGETDCNAME", NDR_NETR_DSRGETDCNAME, api_netr_DsRGetDCName},
3829 {"NETR_NETRLOGONDUMMYROUTINE1", NDR_NETR_NETRLOGONDUMMYROUTINE1, api_netr_NETRLOGONDUMMYROUTINE1},
3830 {"NETR_NETRLOGONSETSERVICEBITS", NDR_NETR_NETRLOGONSETSERVICEBITS, api_netr_NETRLOGONSETSERVICEBITS},
3831 {"NETR_LOGONGETTRUSTRID", NDR_NETR_LOGONGETTRUSTRID, api_netr_LogonGetTrustRid},
3832 {"NETR_NETRLOGONCOMPUTESERVERDIGEST", NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST, api_netr_NETRLOGONCOMPUTESERVERDIGEST},
3833 {"NETR_NETRLOGONCOMPUTECLIENTDIGEST", NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST, api_netr_NETRLOGONCOMPUTECLIENTDIGEST},
3834 {"NETR_SERVERAUTHENTICATE3", NDR_NETR_SERVERAUTHENTICATE3, api_netr_ServerAuthenticate3},
3835 {"NETR_DSRGETDCNAMEEX", NDR_NETR_DSRGETDCNAMEEX, api_netr_DsRGetDCNameEx},
3836 {"NETR_DSRGETSITENAME", NDR_NETR_DSRGETSITENAME, api_netr_DsRGetSiteName},
3837 {"NETR_LOGONGETDOMAININFO", NDR_NETR_LOGONGETDOMAININFO, api_netr_LogonGetDomainInfo},
3838 {"NETR_SERVERPASSWORDSET2", NDR_NETR_SERVERPASSWORDSET2, api_netr_ServerPasswordSet2},
3839 {"NETR_SERVERPASSWORDGET", NDR_NETR_SERVERPASSWORDGET, api_netr_ServerPasswordGet},
3840 {"NETR_NETRLOGONSENDTOSAM", NDR_NETR_NETRLOGONSENDTOSAM, api_netr_NETRLOGONSENDTOSAM},
3841 {"NETR_DSRADDRESSTOSITENAMESW", NDR_NETR_DSRADDRESSTOSITENAMESW, api_netr_DsRAddressToSitenamesW},
3842 {"NETR_DSRGETDCNAMEEX2", NDR_NETR_DSRGETDCNAMEEX2, api_netr_DsRGetDCNameEx2},
3843 {"NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN", NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN, api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN},
3844 {"NETR_NETRENUMERATETRUSTEDDOMAINSEX", NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX, api_netr_NetrEnumerateTrustedDomainsEx},
3845 {"NETR_DSRADDRESSTOSITENAMESEXW", NDR_NETR_DSRADDRESSTOSITENAMESEXW, api_netr_DsRAddressToSitenamesExW},
3846 {"NETR_DSRGETDCSITECOVERAGEW", NDR_NETR_DSRGETDCSITECOVERAGEW, api_netr_DsrGetDcSiteCoverageW},
3847 {"NETR_LOGONSAMLOGONEX", NDR_NETR_LOGONSAMLOGONEX, api_netr_LogonSamLogonEx},
3848 {"NETR_DSRENUMERATEDOMAINTRUSTS", NDR_NETR_DSRENUMERATEDOMAINTRUSTS, api_netr_DsrEnumerateDomainTrusts},
3849 {"NETR_DSRDEREGISTERDNSHOSTRECORDS", NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, api_netr_DsrDeregisterDNSHostRecords},
3850 {"NETR_SERVERTRUSTPASSWORDSGET", NDR_NETR_SERVERTRUSTPASSWORDSGET, api_netr_ServerTrustPasswordsGet},
3851 {"NETR_DSRGETFORESTTRUSTINFORMATION", NDR_NETR_DSRGETFORESTTRUSTINFORMATION, api_netr_DsRGetForestTrustInformation},
3852 {"NETR_GETFORESTTRUSTINFORMATION", NDR_NETR_GETFORESTTRUSTINFORMATION, api_netr_GetForestTrustInformation},
3853 {"NETR_LOGONSAMLOGONWITHFLAGS", NDR_NETR_LOGONSAMLOGONWITHFLAGS, api_netr_LogonSamLogonWithFlags},
3854 {"NETR_NETRSERVERGETTRUSTINFO", NDR_NETR_NETRSERVERGETTRUSTINFO, api_netr_NETRSERVERGETTRUSTINFO},
3857 void netlogon_get_pipe_fns(struct api_struct **fns, int *n_fns)
3859 *fns = api_netlogon_cmds;
3860 *n_fns = sizeof(api_netlogon_cmds) / sizeof(struct api_struct);
3863 NTSTATUS rpc_netlogon_init(void)
3865 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "netlogon", "netlogon", &ndr_table_netlogon.syntax_id, api_netlogon_cmds, sizeof(api_netlogon_cmds) / sizeof(struct api_struct));