2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_netlogon.h"
9 static BOOL
api_netr_LogonUasLogon(pipes_struct
*p
)
11 struct ndr_pull
*pull
;
12 struct ndr_push
*push
;
15 struct netr_LogonUasLogon r
;
16 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonUasLogon");
18 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
23 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
29 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
30 status
= ndr_pull_netr_LogonUasLogon(pull
, NDR_IN
, &r
);
31 if (NT_STATUS_IS_ERR(status
)) {
37 NDR_PRINT_IN_DEBUG(netr_LogonUasLogon
, &r
);
40 r
.out
.info
= talloc_zero(mem_ctx
, struct netr_UasInfo
);
41 if (r
.out
.info
== NULL
) {
46 r
.out
.result
= _netr_LogonUasLogon(p
, &r
);
48 if (p
->rng_fault_state
) {
50 /* Return True here, srv_pipe_hnd.c will take care */
55 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon
, &r
);
57 push
= ndr_push_init_ctx(mem_ctx
);
63 status
= ndr_push_netr_LogonUasLogon(push
, NDR_OUT
, &r
);
64 if (NT_STATUS_IS_ERR(status
)) {
69 blob
= ndr_push_blob(push
);
70 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
80 static BOOL
api_netr_LogonUasLogoff(pipes_struct
*p
)
82 struct ndr_pull
*pull
;
83 struct ndr_push
*push
;
86 struct netr_LogonUasLogoff r
;
87 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonUasLogoff");
89 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
94 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
100 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
101 status
= ndr_pull_netr_LogonUasLogoff(pull
, NDR_IN
, &r
);
102 if (NT_STATUS_IS_ERR(status
)) {
103 talloc_free(mem_ctx
);
107 if (DEBUGLEVEL
>= 10)
108 NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff
, &r
);
111 r
.out
.info
= talloc_zero(mem_ctx
, struct netr_UasLogoffInfo
);
112 if (r
.out
.info
== NULL
) {
113 talloc_free(mem_ctx
);
117 r
.out
.result
= _netr_LogonUasLogoff(p
, &r
);
119 if (p
->rng_fault_state
) {
120 talloc_free(mem_ctx
);
121 /* Return True here, srv_pipe_hnd.c will take care */
125 if (DEBUGLEVEL
>= 10)
126 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff
, &r
);
128 push
= ndr_push_init_ctx(mem_ctx
);
130 talloc_free(mem_ctx
);
134 status
= ndr_push_netr_LogonUasLogoff(push
, NDR_OUT
, &r
);
135 if (NT_STATUS_IS_ERR(status
)) {
136 talloc_free(mem_ctx
);
140 blob
= ndr_push_blob(push
);
141 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
142 talloc_free(mem_ctx
);
146 talloc_free(mem_ctx
);
151 static BOOL
api_netr_LogonSamLogon(pipes_struct
*p
)
153 struct ndr_pull
*pull
;
154 struct ndr_push
*push
;
157 struct netr_LogonSamLogon r
;
158 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonSamLogon");
160 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
161 talloc_free(mem_ctx
);
165 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
167 talloc_free(mem_ctx
);
171 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
172 status
= ndr_pull_netr_LogonSamLogon(pull
, NDR_IN
, &r
);
173 if (NT_STATUS_IS_ERR(status
)) {
174 talloc_free(mem_ctx
);
178 if (DEBUGLEVEL
>= 10)
179 NDR_PRINT_IN_DEBUG(netr_LogonSamLogon
, &r
);
182 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
183 r
.out
.validation
= talloc_zero(mem_ctx
, union netr_Validation
);
184 if (r
.out
.validation
== NULL
) {
185 talloc_free(mem_ctx
);
189 r
.out
.authoritative
= talloc_zero(mem_ctx
, uint8_t);
190 if (r
.out
.authoritative
== NULL
) {
191 talloc_free(mem_ctx
);
195 r
.out
.result
= _netr_LogonSamLogon(p
, &r
);
197 if (p
->rng_fault_state
) {
198 talloc_free(mem_ctx
);
199 /* Return True here, srv_pipe_hnd.c will take care */
203 if (DEBUGLEVEL
>= 10)
204 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon
, &r
);
206 push
= ndr_push_init_ctx(mem_ctx
);
208 talloc_free(mem_ctx
);
212 status
= ndr_push_netr_LogonSamLogon(push
, NDR_OUT
, &r
);
213 if (NT_STATUS_IS_ERR(status
)) {
214 talloc_free(mem_ctx
);
218 blob
= ndr_push_blob(push
);
219 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
220 talloc_free(mem_ctx
);
224 talloc_free(mem_ctx
);
229 static BOOL
api_netr_LogonSamLogoff(pipes_struct
*p
)
231 struct ndr_pull
*pull
;
232 struct ndr_push
*push
;
235 struct netr_LogonSamLogoff r
;
236 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonSamLogoff");
238 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
239 talloc_free(mem_ctx
);
243 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
245 talloc_free(mem_ctx
);
249 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
250 status
= ndr_pull_netr_LogonSamLogoff(pull
, NDR_IN
, &r
);
251 if (NT_STATUS_IS_ERR(status
)) {
252 talloc_free(mem_ctx
);
256 if (DEBUGLEVEL
>= 10)
257 NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff
, &r
);
260 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
261 r
.out
.result
= _netr_LogonSamLogoff(p
, &r
);
263 if (p
->rng_fault_state
) {
264 talloc_free(mem_ctx
);
265 /* Return True here, srv_pipe_hnd.c will take care */
269 if (DEBUGLEVEL
>= 10)
270 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff
, &r
);
272 push
= ndr_push_init_ctx(mem_ctx
);
274 talloc_free(mem_ctx
);
278 status
= ndr_push_netr_LogonSamLogoff(push
, NDR_OUT
, &r
);
279 if (NT_STATUS_IS_ERR(status
)) {
280 talloc_free(mem_ctx
);
284 blob
= ndr_push_blob(push
);
285 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
286 talloc_free(mem_ctx
);
290 talloc_free(mem_ctx
);
295 static BOOL
api_netr_ServerReqChallenge(pipes_struct
*p
)
297 struct ndr_pull
*pull
;
298 struct ndr_push
*push
;
301 struct netr_ServerReqChallenge r
;
302 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_ServerReqChallenge");
304 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
305 talloc_free(mem_ctx
);
309 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
311 talloc_free(mem_ctx
);
315 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
316 status
= ndr_pull_netr_ServerReqChallenge(pull
, NDR_IN
, &r
);
317 if (NT_STATUS_IS_ERR(status
)) {
318 talloc_free(mem_ctx
);
322 if (DEBUGLEVEL
>= 10)
323 NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge
, &r
);
326 r
.out
.credentials
= r
.in
.credentials
;
327 r
.out
.result
= _netr_ServerReqChallenge(p
, &r
);
329 if (p
->rng_fault_state
) {
330 talloc_free(mem_ctx
);
331 /* Return True here, srv_pipe_hnd.c will take care */
335 if (DEBUGLEVEL
>= 10)
336 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge
, &r
);
338 push
= ndr_push_init_ctx(mem_ctx
);
340 talloc_free(mem_ctx
);
344 status
= ndr_push_netr_ServerReqChallenge(push
, NDR_OUT
, &r
);
345 if (NT_STATUS_IS_ERR(status
)) {
346 talloc_free(mem_ctx
);
350 blob
= ndr_push_blob(push
);
351 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
352 talloc_free(mem_ctx
);
356 talloc_free(mem_ctx
);
361 static BOOL
api_netr_ServerAuthenticate(pipes_struct
*p
)
363 struct ndr_pull
*pull
;
364 struct ndr_push
*push
;
367 struct netr_ServerAuthenticate r
;
368 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_ServerAuthenticate");
370 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
371 talloc_free(mem_ctx
);
375 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
377 talloc_free(mem_ctx
);
381 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
382 status
= ndr_pull_netr_ServerAuthenticate(pull
, NDR_IN
, &r
);
383 if (NT_STATUS_IS_ERR(status
)) {
384 talloc_free(mem_ctx
);
388 if (DEBUGLEVEL
>= 10)
389 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate
, &r
);
392 r
.out
.credentials
= r
.in
.credentials
;
393 r
.out
.result
= _netr_ServerAuthenticate(p
, &r
);
395 if (p
->rng_fault_state
) {
396 talloc_free(mem_ctx
);
397 /* Return True here, srv_pipe_hnd.c will take care */
401 if (DEBUGLEVEL
>= 10)
402 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate
, &r
);
404 push
= ndr_push_init_ctx(mem_ctx
);
406 talloc_free(mem_ctx
);
410 status
= ndr_push_netr_ServerAuthenticate(push
, NDR_OUT
, &r
);
411 if (NT_STATUS_IS_ERR(status
)) {
412 talloc_free(mem_ctx
);
416 blob
= ndr_push_blob(push
);
417 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
418 talloc_free(mem_ctx
);
422 talloc_free(mem_ctx
);
427 static BOOL
api_netr_ServerPasswordSet(pipes_struct
*p
)
429 struct ndr_pull
*pull
;
430 struct ndr_push
*push
;
433 struct netr_ServerPasswordSet r
;
434 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_ServerPasswordSet");
436 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
437 talloc_free(mem_ctx
);
441 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
443 talloc_free(mem_ctx
);
447 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
448 status
= ndr_pull_netr_ServerPasswordSet(pull
, NDR_IN
, &r
);
449 if (NT_STATUS_IS_ERR(status
)) {
450 talloc_free(mem_ctx
);
454 if (DEBUGLEVEL
>= 10)
455 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet
, &r
);
458 r
.out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
459 if (r
.out
.return_authenticator
== NULL
) {
460 talloc_free(mem_ctx
);
464 r
.out
.result
= _netr_ServerPasswordSet(p
, &r
);
466 if (p
->rng_fault_state
) {
467 talloc_free(mem_ctx
);
468 /* Return True here, srv_pipe_hnd.c will take care */
472 if (DEBUGLEVEL
>= 10)
473 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet
, &r
);
475 push
= ndr_push_init_ctx(mem_ctx
);
477 talloc_free(mem_ctx
);
481 status
= ndr_push_netr_ServerPasswordSet(push
, NDR_OUT
, &r
);
482 if (NT_STATUS_IS_ERR(status
)) {
483 talloc_free(mem_ctx
);
487 blob
= ndr_push_blob(push
);
488 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
489 talloc_free(mem_ctx
);
493 talloc_free(mem_ctx
);
498 static BOOL
api_netr_DatabaseDeltas(pipes_struct
*p
)
500 struct ndr_pull
*pull
;
501 struct ndr_push
*push
;
504 struct netr_DatabaseDeltas r
;
505 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DatabaseDeltas");
507 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
508 talloc_free(mem_ctx
);
512 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
514 talloc_free(mem_ctx
);
518 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
519 status
= ndr_pull_netr_DatabaseDeltas(pull
, NDR_IN
, &r
);
520 if (NT_STATUS_IS_ERR(status
)) {
521 talloc_free(mem_ctx
);
525 if (DEBUGLEVEL
>= 10)
526 NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas
, &r
);
529 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
530 r
.out
.sequence_num
= r
.in
.sequence_num
;
531 r
.out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
);
532 if (r
.out
.delta_enum_array
== NULL
) {
533 talloc_free(mem_ctx
);
537 r
.out
.result
= _netr_DatabaseDeltas(p
, &r
);
539 if (p
->rng_fault_state
) {
540 talloc_free(mem_ctx
);
541 /* Return True here, srv_pipe_hnd.c will take care */
545 if (DEBUGLEVEL
>= 10)
546 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas
, &r
);
548 push
= ndr_push_init_ctx(mem_ctx
);
550 talloc_free(mem_ctx
);
554 status
= ndr_push_netr_DatabaseDeltas(push
, NDR_OUT
, &r
);
555 if (NT_STATUS_IS_ERR(status
)) {
556 talloc_free(mem_ctx
);
560 blob
= ndr_push_blob(push
);
561 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
562 talloc_free(mem_ctx
);
566 talloc_free(mem_ctx
);
571 static BOOL
api_netr_DatabaseSync(pipes_struct
*p
)
573 struct ndr_pull
*pull
;
574 struct ndr_push
*push
;
577 struct netr_DatabaseSync r
;
578 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DatabaseSync");
580 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
581 talloc_free(mem_ctx
);
585 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
587 talloc_free(mem_ctx
);
591 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
592 status
= ndr_pull_netr_DatabaseSync(pull
, NDR_IN
, &r
);
593 if (NT_STATUS_IS_ERR(status
)) {
594 talloc_free(mem_ctx
);
598 if (DEBUGLEVEL
>= 10)
599 NDR_PRINT_IN_DEBUG(netr_DatabaseSync
, &r
);
602 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
603 r
.out
.sync_context
= r
.in
.sync_context
;
604 r
.out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
);
605 if (r
.out
.delta_enum_array
== NULL
) {
606 talloc_free(mem_ctx
);
610 r
.out
.result
= _netr_DatabaseSync(p
, &r
);
612 if (p
->rng_fault_state
) {
613 talloc_free(mem_ctx
);
614 /* Return True here, srv_pipe_hnd.c will take care */
618 if (DEBUGLEVEL
>= 10)
619 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync
, &r
);
621 push
= ndr_push_init_ctx(mem_ctx
);
623 talloc_free(mem_ctx
);
627 status
= ndr_push_netr_DatabaseSync(push
, NDR_OUT
, &r
);
628 if (NT_STATUS_IS_ERR(status
)) {
629 talloc_free(mem_ctx
);
633 blob
= ndr_push_blob(push
);
634 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
635 talloc_free(mem_ctx
);
639 talloc_free(mem_ctx
);
644 static BOOL
api_netr_AccountDeltas(pipes_struct
*p
)
646 struct ndr_pull
*pull
;
647 struct ndr_push
*push
;
650 struct netr_AccountDeltas r
;
651 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_AccountDeltas");
653 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
654 talloc_free(mem_ctx
);
658 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
660 talloc_free(mem_ctx
);
664 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
665 status
= ndr_pull_netr_AccountDeltas(pull
, NDR_IN
, &r
);
666 if (NT_STATUS_IS_ERR(status
)) {
667 talloc_free(mem_ctx
);
671 if (DEBUGLEVEL
>= 10)
672 NDR_PRINT_IN_DEBUG(netr_AccountDeltas
, &r
);
675 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
676 r
.out
.buffer
= talloc_zero(mem_ctx
, struct netr_AccountBuffer
);
677 if (r
.out
.buffer
== NULL
) {
678 talloc_free(mem_ctx
);
682 r
.out
.count_returned
= talloc_zero(mem_ctx
, uint32_t);
683 if (r
.out
.count_returned
== NULL
) {
684 talloc_free(mem_ctx
);
688 r
.out
.total_entries
= talloc_zero(mem_ctx
, uint32_t);
689 if (r
.out
.total_entries
== NULL
) {
690 talloc_free(mem_ctx
);
694 r
.out
.recordid
= talloc_zero(mem_ctx
, struct netr_UAS_INFO_0
);
695 if (r
.out
.recordid
== NULL
) {
696 talloc_free(mem_ctx
);
700 r
.out
.result
= _netr_AccountDeltas(p
, &r
);
702 if (p
->rng_fault_state
) {
703 talloc_free(mem_ctx
);
704 /* Return True here, srv_pipe_hnd.c will take care */
708 if (DEBUGLEVEL
>= 10)
709 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas
, &r
);
711 push
= ndr_push_init_ctx(mem_ctx
);
713 talloc_free(mem_ctx
);
717 status
= ndr_push_netr_AccountDeltas(push
, NDR_OUT
, &r
);
718 if (NT_STATUS_IS_ERR(status
)) {
719 talloc_free(mem_ctx
);
723 blob
= ndr_push_blob(push
);
724 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
725 talloc_free(mem_ctx
);
729 talloc_free(mem_ctx
);
734 static BOOL
api_netr_AccountSync(pipes_struct
*p
)
736 struct ndr_pull
*pull
;
737 struct ndr_push
*push
;
740 struct netr_AccountSync r
;
741 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_AccountSync");
743 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
744 talloc_free(mem_ctx
);
748 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
750 talloc_free(mem_ctx
);
754 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
755 status
= ndr_pull_netr_AccountSync(pull
, NDR_IN
, &r
);
756 if (NT_STATUS_IS_ERR(status
)) {
757 talloc_free(mem_ctx
);
761 if (DEBUGLEVEL
>= 10)
762 NDR_PRINT_IN_DEBUG(netr_AccountSync
, &r
);
765 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
766 r
.out
.buffer
= talloc_zero(mem_ctx
, struct netr_AccountBuffer
);
767 if (r
.out
.buffer
== NULL
) {
768 talloc_free(mem_ctx
);
772 r
.out
.count_returned
= talloc_zero(mem_ctx
, uint32_t);
773 if (r
.out
.count_returned
== NULL
) {
774 talloc_free(mem_ctx
);
778 r
.out
.total_entries
= talloc_zero(mem_ctx
, uint32_t);
779 if (r
.out
.total_entries
== NULL
) {
780 talloc_free(mem_ctx
);
784 r
.out
.next_reference
= talloc_zero(mem_ctx
, uint32_t);
785 if (r
.out
.next_reference
== NULL
) {
786 talloc_free(mem_ctx
);
790 r
.out
.recordid
= r
.in
.recordid
;
791 r
.out
.result
= _netr_AccountSync(p
, &r
);
793 if (p
->rng_fault_state
) {
794 talloc_free(mem_ctx
);
795 /* Return True here, srv_pipe_hnd.c will take care */
799 if (DEBUGLEVEL
>= 10)
800 NDR_PRINT_OUT_DEBUG(netr_AccountSync
, &r
);
802 push
= ndr_push_init_ctx(mem_ctx
);
804 talloc_free(mem_ctx
);
808 status
= ndr_push_netr_AccountSync(push
, NDR_OUT
, &r
);
809 if (NT_STATUS_IS_ERR(status
)) {
810 talloc_free(mem_ctx
);
814 blob
= ndr_push_blob(push
);
815 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
816 talloc_free(mem_ctx
);
820 talloc_free(mem_ctx
);
825 static BOOL
api_netr_GetDcName(pipes_struct
*p
)
827 struct ndr_pull
*pull
;
828 struct ndr_push
*push
;
831 struct netr_GetDcName r
;
832 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_GetDcName");
834 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
835 talloc_free(mem_ctx
);
839 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
841 talloc_free(mem_ctx
);
845 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
846 status
= ndr_pull_netr_GetDcName(pull
, NDR_IN
, &r
);
847 if (NT_STATUS_IS_ERR(status
)) {
848 talloc_free(mem_ctx
);
852 if (DEBUGLEVEL
>= 10)
853 NDR_PRINT_IN_DEBUG(netr_GetDcName
, &r
);
856 r
.out
.dcname
= talloc_zero(mem_ctx
, const char *);
857 if (r
.out
.dcname
== NULL
) {
858 talloc_free(mem_ctx
);
862 r
.out
.result
= _netr_GetDcName(p
, &r
);
864 if (p
->rng_fault_state
) {
865 talloc_free(mem_ctx
);
866 /* Return True here, srv_pipe_hnd.c will take care */
870 if (DEBUGLEVEL
>= 10)
871 NDR_PRINT_OUT_DEBUG(netr_GetDcName
, &r
);
873 push
= ndr_push_init_ctx(mem_ctx
);
875 talloc_free(mem_ctx
);
879 status
= ndr_push_netr_GetDcName(push
, NDR_OUT
, &r
);
880 if (NT_STATUS_IS_ERR(status
)) {
881 talloc_free(mem_ctx
);
885 blob
= ndr_push_blob(push
);
886 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
887 talloc_free(mem_ctx
);
891 talloc_free(mem_ctx
);
896 static BOOL
api_netr_LogonControl(pipes_struct
*p
)
898 struct ndr_pull
*pull
;
899 struct ndr_push
*push
;
902 struct netr_LogonControl r
;
903 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonControl");
905 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
906 talloc_free(mem_ctx
);
910 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
912 talloc_free(mem_ctx
);
916 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
917 status
= ndr_pull_netr_LogonControl(pull
, NDR_IN
, &r
);
918 if (NT_STATUS_IS_ERR(status
)) {
919 talloc_free(mem_ctx
);
923 if (DEBUGLEVEL
>= 10)
924 NDR_PRINT_IN_DEBUG(netr_LogonControl
, &r
);
927 r
.out
.info
= talloc_zero(mem_ctx
, union netr_CONTROL_QUERY_INFORMATION
);
928 if (r
.out
.info
== NULL
) {
929 talloc_free(mem_ctx
);
933 r
.out
.result
= _netr_LogonControl(p
, &r
);
935 if (p
->rng_fault_state
) {
936 talloc_free(mem_ctx
);
937 /* Return True here, srv_pipe_hnd.c will take care */
941 if (DEBUGLEVEL
>= 10)
942 NDR_PRINT_OUT_DEBUG(netr_LogonControl
, &r
);
944 push
= ndr_push_init_ctx(mem_ctx
);
946 talloc_free(mem_ctx
);
950 status
= ndr_push_netr_LogonControl(push
, NDR_OUT
, &r
);
951 if (NT_STATUS_IS_ERR(status
)) {
952 talloc_free(mem_ctx
);
956 blob
= ndr_push_blob(push
);
957 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
958 talloc_free(mem_ctx
);
962 talloc_free(mem_ctx
);
967 static BOOL
api_netr_GetAnyDCName(pipes_struct
*p
)
969 struct ndr_pull
*pull
;
970 struct ndr_push
*push
;
973 struct netr_GetAnyDCName r
;
974 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_GetAnyDCName");
976 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
977 talloc_free(mem_ctx
);
981 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
983 talloc_free(mem_ctx
);
987 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
988 status
= ndr_pull_netr_GetAnyDCName(pull
, NDR_IN
, &r
);
989 if (NT_STATUS_IS_ERR(status
)) {
990 talloc_free(mem_ctx
);
994 if (DEBUGLEVEL
>= 10)
995 NDR_PRINT_IN_DEBUG(netr_GetAnyDCName
, &r
);
998 r
.out
.dcname
= talloc_zero(mem_ctx
, const char *);
999 if (r
.out
.dcname
== NULL
) {
1000 talloc_free(mem_ctx
);
1004 r
.out
.result
= _netr_GetAnyDCName(p
, &r
);
1006 if (p
->rng_fault_state
) {
1007 talloc_free(mem_ctx
);
1008 /* Return True here, srv_pipe_hnd.c will take care */
1012 if (DEBUGLEVEL
>= 10)
1013 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName
, &r
);
1015 push
= ndr_push_init_ctx(mem_ctx
);
1017 talloc_free(mem_ctx
);
1021 status
= ndr_push_netr_GetAnyDCName(push
, NDR_OUT
, &r
);
1022 if (NT_STATUS_IS_ERR(status
)) {
1023 talloc_free(mem_ctx
);
1027 blob
= ndr_push_blob(push
);
1028 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1029 talloc_free(mem_ctx
);
1033 talloc_free(mem_ctx
);
1038 static BOOL
api_netr_LogonControl2(pipes_struct
*p
)
1040 struct ndr_pull
*pull
;
1041 struct ndr_push
*push
;
1044 struct netr_LogonControl2 r
;
1045 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonControl2");
1047 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1048 talloc_free(mem_ctx
);
1052 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1054 talloc_free(mem_ctx
);
1058 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1059 status
= ndr_pull_netr_LogonControl2(pull
, NDR_IN
, &r
);
1060 if (NT_STATUS_IS_ERR(status
)) {
1061 talloc_free(mem_ctx
);
1065 if (DEBUGLEVEL
>= 10)
1066 NDR_PRINT_IN_DEBUG(netr_LogonControl2
, &r
);
1069 r
.out
.query
= talloc_zero(mem_ctx
, union netr_CONTROL_QUERY_INFORMATION
);
1070 if (r
.out
.query
== NULL
) {
1071 talloc_free(mem_ctx
);
1075 r
.out
.result
= _netr_LogonControl2(p
, &r
);
1077 if (p
->rng_fault_state
) {
1078 talloc_free(mem_ctx
);
1079 /* Return True here, srv_pipe_hnd.c will take care */
1083 if (DEBUGLEVEL
>= 10)
1084 NDR_PRINT_OUT_DEBUG(netr_LogonControl2
, &r
);
1086 push
= ndr_push_init_ctx(mem_ctx
);
1088 talloc_free(mem_ctx
);
1092 status
= ndr_push_netr_LogonControl2(push
, NDR_OUT
, &r
);
1093 if (NT_STATUS_IS_ERR(status
)) {
1094 talloc_free(mem_ctx
);
1098 blob
= ndr_push_blob(push
);
1099 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1100 talloc_free(mem_ctx
);
1104 talloc_free(mem_ctx
);
1109 static BOOL
api_netr_ServerAuthenticate2(pipes_struct
*p
)
1111 struct ndr_pull
*pull
;
1112 struct ndr_push
*push
;
1115 struct netr_ServerAuthenticate2 r
;
1116 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_ServerAuthenticate2");
1118 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1119 talloc_free(mem_ctx
);
1123 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1125 talloc_free(mem_ctx
);
1129 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1130 status
= ndr_pull_netr_ServerAuthenticate2(pull
, NDR_IN
, &r
);
1131 if (NT_STATUS_IS_ERR(status
)) {
1132 talloc_free(mem_ctx
);
1136 if (DEBUGLEVEL
>= 10)
1137 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2
, &r
);
1140 r
.out
.credentials
= r
.in
.credentials
;
1141 r
.out
.negotiate_flags
= r
.in
.negotiate_flags
;
1142 r
.out
.result
= _netr_ServerAuthenticate2(p
, &r
);
1144 if (p
->rng_fault_state
) {
1145 talloc_free(mem_ctx
);
1146 /* Return True here, srv_pipe_hnd.c will take care */
1150 if (DEBUGLEVEL
>= 10)
1151 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2
, &r
);
1153 push
= ndr_push_init_ctx(mem_ctx
);
1155 talloc_free(mem_ctx
);
1159 status
= ndr_push_netr_ServerAuthenticate2(push
, NDR_OUT
, &r
);
1160 if (NT_STATUS_IS_ERR(status
)) {
1161 talloc_free(mem_ctx
);
1165 blob
= ndr_push_blob(push
);
1166 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1167 talloc_free(mem_ctx
);
1171 talloc_free(mem_ctx
);
1176 static BOOL
api_netr_DatabaseSync2(pipes_struct
*p
)
1178 struct ndr_pull
*pull
;
1179 struct ndr_push
*push
;
1182 struct netr_DatabaseSync2 r
;
1183 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DatabaseSync2");
1185 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1186 talloc_free(mem_ctx
);
1190 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1192 talloc_free(mem_ctx
);
1196 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1197 status
= ndr_pull_netr_DatabaseSync2(pull
, NDR_IN
, &r
);
1198 if (NT_STATUS_IS_ERR(status
)) {
1199 talloc_free(mem_ctx
);
1203 if (DEBUGLEVEL
>= 10)
1204 NDR_PRINT_IN_DEBUG(netr_DatabaseSync2
, &r
);
1207 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
1208 r
.out
.sync_context
= r
.in
.sync_context
;
1209 r
.out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
);
1210 if (r
.out
.delta_enum_array
== NULL
) {
1211 talloc_free(mem_ctx
);
1215 r
.out
.result
= _netr_DatabaseSync2(p
, &r
);
1217 if (p
->rng_fault_state
) {
1218 talloc_free(mem_ctx
);
1219 /* Return True here, srv_pipe_hnd.c will take care */
1223 if (DEBUGLEVEL
>= 10)
1224 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2
, &r
);
1226 push
= ndr_push_init_ctx(mem_ctx
);
1228 talloc_free(mem_ctx
);
1232 status
= ndr_push_netr_DatabaseSync2(push
, NDR_OUT
, &r
);
1233 if (NT_STATUS_IS_ERR(status
)) {
1234 talloc_free(mem_ctx
);
1238 blob
= ndr_push_blob(push
);
1239 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1240 talloc_free(mem_ctx
);
1244 talloc_free(mem_ctx
);
1249 static BOOL
api_netr_DatabaseRedo(pipes_struct
*p
)
1251 struct ndr_pull
*pull
;
1252 struct ndr_push
*push
;
1255 struct netr_DatabaseRedo r
;
1256 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DatabaseRedo");
1258 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1259 talloc_free(mem_ctx
);
1263 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1265 talloc_free(mem_ctx
);
1269 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1270 status
= ndr_pull_netr_DatabaseRedo(pull
, NDR_IN
, &r
);
1271 if (NT_STATUS_IS_ERR(status
)) {
1272 talloc_free(mem_ctx
);
1276 if (DEBUGLEVEL
>= 10)
1277 NDR_PRINT_IN_DEBUG(netr_DatabaseRedo
, &r
);
1280 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
1281 r
.out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
);
1282 if (r
.out
.delta_enum_array
== NULL
) {
1283 talloc_free(mem_ctx
);
1287 r
.out
.result
= _netr_DatabaseRedo(p
, &r
);
1289 if (p
->rng_fault_state
) {
1290 talloc_free(mem_ctx
);
1291 /* Return True here, srv_pipe_hnd.c will take care */
1295 if (DEBUGLEVEL
>= 10)
1296 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo
, &r
);
1298 push
= ndr_push_init_ctx(mem_ctx
);
1300 talloc_free(mem_ctx
);
1304 status
= ndr_push_netr_DatabaseRedo(push
, NDR_OUT
, &r
);
1305 if (NT_STATUS_IS_ERR(status
)) {
1306 talloc_free(mem_ctx
);
1310 blob
= ndr_push_blob(push
);
1311 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1312 talloc_free(mem_ctx
);
1316 talloc_free(mem_ctx
);
1321 static BOOL
api_netr_LogonControl2Ex(pipes_struct
*p
)
1323 struct ndr_pull
*pull
;
1324 struct ndr_push
*push
;
1327 struct netr_LogonControl2Ex r
;
1328 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonControl2Ex");
1330 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1331 talloc_free(mem_ctx
);
1335 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1337 talloc_free(mem_ctx
);
1341 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1342 status
= ndr_pull_netr_LogonControl2Ex(pull
, NDR_IN
, &r
);
1343 if (NT_STATUS_IS_ERR(status
)) {
1344 talloc_free(mem_ctx
);
1348 if (DEBUGLEVEL
>= 10)
1349 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex
, &r
);
1352 r
.out
.query
= talloc_zero(mem_ctx
, union netr_CONTROL_QUERY_INFORMATION
);
1353 if (r
.out
.query
== NULL
) {
1354 talloc_free(mem_ctx
);
1358 r
.out
.result
= _netr_LogonControl2Ex(p
, &r
);
1360 if (p
->rng_fault_state
) {
1361 talloc_free(mem_ctx
);
1362 /* Return True here, srv_pipe_hnd.c will take care */
1366 if (DEBUGLEVEL
>= 10)
1367 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex
, &r
);
1369 push
= ndr_push_init_ctx(mem_ctx
);
1371 talloc_free(mem_ctx
);
1375 status
= ndr_push_netr_LogonControl2Ex(push
, NDR_OUT
, &r
);
1376 if (NT_STATUS_IS_ERR(status
)) {
1377 talloc_free(mem_ctx
);
1381 blob
= ndr_push_blob(push
);
1382 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1383 talloc_free(mem_ctx
);
1387 talloc_free(mem_ctx
);
1392 static BOOL
api_netr_NETRENUMERATETRUSTEDDOMAINS(pipes_struct
*p
)
1394 struct ndr_pull
*pull
;
1395 struct ndr_push
*push
;
1398 struct netr_NETRENUMERATETRUSTEDDOMAINS r
;
1399 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRENUMERATETRUSTEDDOMAINS");
1401 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1402 talloc_free(mem_ctx
);
1406 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1408 talloc_free(mem_ctx
);
1412 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1413 status
= ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS(pull
, NDR_IN
, &r
);
1414 if (NT_STATUS_IS_ERR(status
)) {
1415 talloc_free(mem_ctx
);
1419 if (DEBUGLEVEL
>= 10)
1420 NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS
, &r
);
1422 r
.out
.result
= _netr_NETRENUMERATETRUSTEDDOMAINS(p
, &r
);
1424 if (p
->rng_fault_state
) {
1425 talloc_free(mem_ctx
);
1426 /* Return True here, srv_pipe_hnd.c will take care */
1430 if (DEBUGLEVEL
>= 10)
1431 NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS
, &r
);
1433 push
= ndr_push_init_ctx(mem_ctx
);
1435 talloc_free(mem_ctx
);
1439 status
= ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS(push
, NDR_OUT
, &r
);
1440 if (NT_STATUS_IS_ERR(status
)) {
1441 talloc_free(mem_ctx
);
1445 blob
= ndr_push_blob(push
);
1446 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1447 talloc_free(mem_ctx
);
1451 talloc_free(mem_ctx
);
1456 static BOOL
api_netr_DsRGetDCName(pipes_struct
*p
)
1458 struct ndr_pull
*pull
;
1459 struct ndr_push
*push
;
1462 struct netr_DsRGetDCName r
;
1463 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DsRGetDCName");
1465 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1466 talloc_free(mem_ctx
);
1470 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1472 talloc_free(mem_ctx
);
1476 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1477 status
= ndr_pull_netr_DsRGetDCName(pull
, NDR_IN
, &r
);
1478 if (NT_STATUS_IS_ERR(status
)) {
1479 talloc_free(mem_ctx
);
1483 if (DEBUGLEVEL
>= 10)
1484 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName
, &r
);
1487 r
.out
.info
= talloc_zero(mem_ctx
, struct netr_DsRGetDCNameInfo
);
1488 if (r
.out
.info
== NULL
) {
1489 talloc_free(mem_ctx
);
1493 r
.out
.result
= _netr_DsRGetDCName(p
, &r
);
1495 if (p
->rng_fault_state
) {
1496 talloc_free(mem_ctx
);
1497 /* Return True here, srv_pipe_hnd.c will take care */
1501 if (DEBUGLEVEL
>= 10)
1502 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName
, &r
);
1504 push
= ndr_push_init_ctx(mem_ctx
);
1506 talloc_free(mem_ctx
);
1510 status
= ndr_push_netr_DsRGetDCName(push
, NDR_OUT
, &r
);
1511 if (NT_STATUS_IS_ERR(status
)) {
1512 talloc_free(mem_ctx
);
1516 blob
= ndr_push_blob(push
);
1517 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1518 talloc_free(mem_ctx
);
1522 talloc_free(mem_ctx
);
1527 static BOOL
api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct
*p
)
1529 struct ndr_pull
*pull
;
1530 struct ndr_push
*push
;
1533 struct netr_NETRLOGONDUMMYROUTINE1 r
;
1534 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRLOGONDUMMYROUTINE1");
1536 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1537 talloc_free(mem_ctx
);
1541 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1543 talloc_free(mem_ctx
);
1547 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1548 status
= ndr_pull_netr_NETRLOGONDUMMYROUTINE1(pull
, NDR_IN
, &r
);
1549 if (NT_STATUS_IS_ERR(status
)) {
1550 talloc_free(mem_ctx
);
1554 if (DEBUGLEVEL
>= 10)
1555 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1
, &r
);
1557 r
.out
.result
= _netr_NETRLOGONDUMMYROUTINE1(p
, &r
);
1559 if (p
->rng_fault_state
) {
1560 talloc_free(mem_ctx
);
1561 /* Return True here, srv_pipe_hnd.c will take care */
1565 if (DEBUGLEVEL
>= 10)
1566 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1
, &r
);
1568 push
= ndr_push_init_ctx(mem_ctx
);
1570 talloc_free(mem_ctx
);
1574 status
= ndr_push_netr_NETRLOGONDUMMYROUTINE1(push
, NDR_OUT
, &r
);
1575 if (NT_STATUS_IS_ERR(status
)) {
1576 talloc_free(mem_ctx
);
1580 blob
= ndr_push_blob(push
);
1581 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1582 talloc_free(mem_ctx
);
1586 talloc_free(mem_ctx
);
1591 static BOOL
api_netr_NETRLOGONSETSERVICEBITS(pipes_struct
*p
)
1593 struct ndr_pull
*pull
;
1594 struct ndr_push
*push
;
1597 struct netr_NETRLOGONSETSERVICEBITS r
;
1598 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRLOGONSETSERVICEBITS");
1600 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1601 talloc_free(mem_ctx
);
1605 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1607 talloc_free(mem_ctx
);
1611 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1612 status
= ndr_pull_netr_NETRLOGONSETSERVICEBITS(pull
, NDR_IN
, &r
);
1613 if (NT_STATUS_IS_ERR(status
)) {
1614 talloc_free(mem_ctx
);
1618 if (DEBUGLEVEL
>= 10)
1619 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS
, &r
);
1621 r
.out
.result
= _netr_NETRLOGONSETSERVICEBITS(p
, &r
);
1623 if (p
->rng_fault_state
) {
1624 talloc_free(mem_ctx
);
1625 /* Return True here, srv_pipe_hnd.c will take care */
1629 if (DEBUGLEVEL
>= 10)
1630 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS
, &r
);
1632 push
= ndr_push_init_ctx(mem_ctx
);
1634 talloc_free(mem_ctx
);
1638 status
= ndr_push_netr_NETRLOGONSETSERVICEBITS(push
, NDR_OUT
, &r
);
1639 if (NT_STATUS_IS_ERR(status
)) {
1640 talloc_free(mem_ctx
);
1644 blob
= ndr_push_blob(push
);
1645 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1646 talloc_free(mem_ctx
);
1650 talloc_free(mem_ctx
);
1655 static BOOL
api_netr_NETRLOGONGETTRUSTRID(pipes_struct
*p
)
1657 struct ndr_pull
*pull
;
1658 struct ndr_push
*push
;
1661 struct netr_NETRLOGONGETTRUSTRID r
;
1662 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRLOGONGETTRUSTRID");
1664 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1665 talloc_free(mem_ctx
);
1669 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1671 talloc_free(mem_ctx
);
1675 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1676 status
= ndr_pull_netr_NETRLOGONGETTRUSTRID(pull
, NDR_IN
, &r
);
1677 if (NT_STATUS_IS_ERR(status
)) {
1678 talloc_free(mem_ctx
);
1682 if (DEBUGLEVEL
>= 10)
1683 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTRUSTRID
, &r
);
1685 r
.out
.result
= _netr_NETRLOGONGETTRUSTRID(p
, &r
);
1687 if (p
->rng_fault_state
) {
1688 talloc_free(mem_ctx
);
1689 /* Return True here, srv_pipe_hnd.c will take care */
1693 if (DEBUGLEVEL
>= 10)
1694 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTRUSTRID
, &r
);
1696 push
= ndr_push_init_ctx(mem_ctx
);
1698 talloc_free(mem_ctx
);
1702 status
= ndr_push_netr_NETRLOGONGETTRUSTRID(push
, NDR_OUT
, &r
);
1703 if (NT_STATUS_IS_ERR(status
)) {
1704 talloc_free(mem_ctx
);
1708 blob
= ndr_push_blob(push
);
1709 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1710 talloc_free(mem_ctx
);
1714 talloc_free(mem_ctx
);
1719 static BOOL
api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct
*p
)
1721 struct ndr_pull
*pull
;
1722 struct ndr_push
*push
;
1725 struct netr_NETRLOGONCOMPUTESERVERDIGEST r
;
1726 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRLOGONCOMPUTESERVERDIGEST");
1728 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1729 talloc_free(mem_ctx
);
1733 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1735 talloc_free(mem_ctx
);
1739 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1740 status
= ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST(pull
, NDR_IN
, &r
);
1741 if (NT_STATUS_IS_ERR(status
)) {
1742 talloc_free(mem_ctx
);
1746 if (DEBUGLEVEL
>= 10)
1747 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST
, &r
);
1749 r
.out
.result
= _netr_NETRLOGONCOMPUTESERVERDIGEST(p
, &r
);
1751 if (p
->rng_fault_state
) {
1752 talloc_free(mem_ctx
);
1753 /* Return True here, srv_pipe_hnd.c will take care */
1757 if (DEBUGLEVEL
>= 10)
1758 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST
, &r
);
1760 push
= ndr_push_init_ctx(mem_ctx
);
1762 talloc_free(mem_ctx
);
1766 status
= ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST(push
, NDR_OUT
, &r
);
1767 if (NT_STATUS_IS_ERR(status
)) {
1768 talloc_free(mem_ctx
);
1772 blob
= ndr_push_blob(push
);
1773 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1774 talloc_free(mem_ctx
);
1778 talloc_free(mem_ctx
);
1783 static BOOL
api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct
*p
)
1785 struct ndr_pull
*pull
;
1786 struct ndr_push
*push
;
1789 struct netr_NETRLOGONCOMPUTECLIENTDIGEST r
;
1790 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRLOGONCOMPUTECLIENTDIGEST");
1792 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1793 talloc_free(mem_ctx
);
1797 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1799 talloc_free(mem_ctx
);
1803 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1804 status
= ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST(pull
, NDR_IN
, &r
);
1805 if (NT_STATUS_IS_ERR(status
)) {
1806 talloc_free(mem_ctx
);
1810 if (DEBUGLEVEL
>= 10)
1811 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST
, &r
);
1813 r
.out
.result
= _netr_NETRLOGONCOMPUTECLIENTDIGEST(p
, &r
);
1815 if (p
->rng_fault_state
) {
1816 talloc_free(mem_ctx
);
1817 /* Return True here, srv_pipe_hnd.c will take care */
1821 if (DEBUGLEVEL
>= 10)
1822 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST
, &r
);
1824 push
= ndr_push_init_ctx(mem_ctx
);
1826 talloc_free(mem_ctx
);
1830 status
= ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST(push
, NDR_OUT
, &r
);
1831 if (NT_STATUS_IS_ERR(status
)) {
1832 talloc_free(mem_ctx
);
1836 blob
= ndr_push_blob(push
);
1837 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1838 talloc_free(mem_ctx
);
1842 talloc_free(mem_ctx
);
1847 static BOOL
api_netr_ServerAuthenticate3(pipes_struct
*p
)
1849 struct ndr_pull
*pull
;
1850 struct ndr_push
*push
;
1853 struct netr_ServerAuthenticate3 r
;
1854 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_ServerAuthenticate3");
1856 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1857 talloc_free(mem_ctx
);
1861 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1863 talloc_free(mem_ctx
);
1867 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1868 status
= ndr_pull_netr_ServerAuthenticate3(pull
, NDR_IN
, &r
);
1869 if (NT_STATUS_IS_ERR(status
)) {
1870 talloc_free(mem_ctx
);
1874 if (DEBUGLEVEL
>= 10)
1875 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3
, &r
);
1878 r
.out
.credentials
= r
.in
.credentials
;
1879 r
.out
.negotiate_flags
= r
.in
.negotiate_flags
;
1880 r
.out
.rid
= talloc_zero(mem_ctx
, uint32_t);
1881 if (r
.out
.rid
== NULL
) {
1882 talloc_free(mem_ctx
);
1886 r
.out
.result
= _netr_ServerAuthenticate3(p
, &r
);
1888 if (p
->rng_fault_state
) {
1889 talloc_free(mem_ctx
);
1890 /* Return True here, srv_pipe_hnd.c will take care */
1894 if (DEBUGLEVEL
>= 10)
1895 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3
, &r
);
1897 push
= ndr_push_init_ctx(mem_ctx
);
1899 talloc_free(mem_ctx
);
1903 status
= ndr_push_netr_ServerAuthenticate3(push
, NDR_OUT
, &r
);
1904 if (NT_STATUS_IS_ERR(status
)) {
1905 talloc_free(mem_ctx
);
1909 blob
= ndr_push_blob(push
);
1910 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1911 talloc_free(mem_ctx
);
1915 talloc_free(mem_ctx
);
1920 static BOOL
api_netr_DsRGetDCNameEx(pipes_struct
*p
)
1922 struct ndr_pull
*pull
;
1923 struct ndr_push
*push
;
1926 struct netr_DsRGetDCNameEx r
;
1927 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DsRGetDCNameEx");
1929 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1930 talloc_free(mem_ctx
);
1934 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1936 talloc_free(mem_ctx
);
1940 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1941 status
= ndr_pull_netr_DsRGetDCNameEx(pull
, NDR_IN
, &r
);
1942 if (NT_STATUS_IS_ERR(status
)) {
1943 talloc_free(mem_ctx
);
1947 if (DEBUGLEVEL
>= 10)
1948 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx
, &r
);
1951 r
.out
.info
= talloc_zero(mem_ctx
, struct netr_DsRGetDCNameInfo
);
1952 if (r
.out
.info
== NULL
) {
1953 talloc_free(mem_ctx
);
1957 r
.out
.result
= _netr_DsRGetDCNameEx(p
, &r
);
1959 if (p
->rng_fault_state
) {
1960 talloc_free(mem_ctx
);
1961 /* Return True here, srv_pipe_hnd.c will take care */
1965 if (DEBUGLEVEL
>= 10)
1966 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx
, &r
);
1968 push
= ndr_push_init_ctx(mem_ctx
);
1970 talloc_free(mem_ctx
);
1974 status
= ndr_push_netr_DsRGetDCNameEx(push
, NDR_OUT
, &r
);
1975 if (NT_STATUS_IS_ERR(status
)) {
1976 talloc_free(mem_ctx
);
1980 blob
= ndr_push_blob(push
);
1981 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
1982 talloc_free(mem_ctx
);
1986 talloc_free(mem_ctx
);
1991 static BOOL
api_netr_DsRGetSiteName(pipes_struct
*p
)
1993 struct ndr_pull
*pull
;
1994 struct ndr_push
*push
;
1997 struct netr_DsRGetSiteName r
;
1998 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DsRGetSiteName");
2000 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2001 talloc_free(mem_ctx
);
2005 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2007 talloc_free(mem_ctx
);
2011 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2012 status
= ndr_pull_netr_DsRGetSiteName(pull
, NDR_IN
, &r
);
2013 if (NT_STATUS_IS_ERR(status
)) {
2014 talloc_free(mem_ctx
);
2018 if (DEBUGLEVEL
>= 10)
2019 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName
, &r
);
2022 r
.out
.site
= talloc_zero(mem_ctx
, const char *);
2023 if (r
.out
.site
== NULL
) {
2024 talloc_free(mem_ctx
);
2028 r
.out
.result
= _netr_DsRGetSiteName(p
, &r
);
2030 if (p
->rng_fault_state
) {
2031 talloc_free(mem_ctx
);
2032 /* Return True here, srv_pipe_hnd.c will take care */
2036 if (DEBUGLEVEL
>= 10)
2037 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName
, &r
);
2039 push
= ndr_push_init_ctx(mem_ctx
);
2041 talloc_free(mem_ctx
);
2045 status
= ndr_push_netr_DsRGetSiteName(push
, NDR_OUT
, &r
);
2046 if (NT_STATUS_IS_ERR(status
)) {
2047 talloc_free(mem_ctx
);
2051 blob
= ndr_push_blob(push
);
2052 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2053 talloc_free(mem_ctx
);
2057 talloc_free(mem_ctx
);
2062 static BOOL
api_netr_LogonGetDomainInfo(pipes_struct
*p
)
2064 struct ndr_pull
*pull
;
2065 struct ndr_push
*push
;
2068 struct netr_LogonGetDomainInfo r
;
2069 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonGetDomainInfo");
2071 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2072 talloc_free(mem_ctx
);
2076 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2078 talloc_free(mem_ctx
);
2082 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2083 status
= ndr_pull_netr_LogonGetDomainInfo(pull
, NDR_IN
, &r
);
2084 if (NT_STATUS_IS_ERR(status
)) {
2085 talloc_free(mem_ctx
);
2089 if (DEBUGLEVEL
>= 10)
2090 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo
, &r
);
2093 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
2094 r
.out
.info
= talloc_zero(mem_ctx
, union netr_DomainInfo
);
2095 if (r
.out
.info
== NULL
) {
2096 talloc_free(mem_ctx
);
2100 r
.out
.result
= _netr_LogonGetDomainInfo(p
, &r
);
2102 if (p
->rng_fault_state
) {
2103 talloc_free(mem_ctx
);
2104 /* Return True here, srv_pipe_hnd.c will take care */
2108 if (DEBUGLEVEL
>= 10)
2109 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo
, &r
);
2111 push
= ndr_push_init_ctx(mem_ctx
);
2113 talloc_free(mem_ctx
);
2117 status
= ndr_push_netr_LogonGetDomainInfo(push
, NDR_OUT
, &r
);
2118 if (NT_STATUS_IS_ERR(status
)) {
2119 talloc_free(mem_ctx
);
2123 blob
= ndr_push_blob(push
);
2124 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2125 talloc_free(mem_ctx
);
2129 talloc_free(mem_ctx
);
2134 static BOOL
api_netr_ServerPasswordSet2(pipes_struct
*p
)
2136 struct ndr_pull
*pull
;
2137 struct ndr_push
*push
;
2140 struct netr_ServerPasswordSet2 r
;
2141 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_ServerPasswordSet2");
2143 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2144 talloc_free(mem_ctx
);
2148 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2150 talloc_free(mem_ctx
);
2154 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2155 status
= ndr_pull_netr_ServerPasswordSet2(pull
, NDR_IN
, &r
);
2156 if (NT_STATUS_IS_ERR(status
)) {
2157 talloc_free(mem_ctx
);
2161 if (DEBUGLEVEL
>= 10)
2162 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2
, &r
);
2165 r
.out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
2166 if (r
.out
.return_authenticator
== NULL
) {
2167 talloc_free(mem_ctx
);
2171 r
.out
.result
= _netr_ServerPasswordSet2(p
, &r
);
2173 if (p
->rng_fault_state
) {
2174 talloc_free(mem_ctx
);
2175 /* Return True here, srv_pipe_hnd.c will take care */
2179 if (DEBUGLEVEL
>= 10)
2180 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2
, &r
);
2182 push
= ndr_push_init_ctx(mem_ctx
);
2184 talloc_free(mem_ctx
);
2188 status
= ndr_push_netr_ServerPasswordSet2(push
, NDR_OUT
, &r
);
2189 if (NT_STATUS_IS_ERR(status
)) {
2190 talloc_free(mem_ctx
);
2194 blob
= ndr_push_blob(push
);
2195 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2196 talloc_free(mem_ctx
);
2200 talloc_free(mem_ctx
);
2205 static BOOL
api_netr_NETRSERVERPASSWORDGET(pipes_struct
*p
)
2207 struct ndr_pull
*pull
;
2208 struct ndr_push
*push
;
2211 struct netr_NETRSERVERPASSWORDGET r
;
2212 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRSERVERPASSWORDGET");
2214 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2215 talloc_free(mem_ctx
);
2219 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2221 talloc_free(mem_ctx
);
2225 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2226 status
= ndr_pull_netr_NETRSERVERPASSWORDGET(pull
, NDR_IN
, &r
);
2227 if (NT_STATUS_IS_ERR(status
)) {
2228 talloc_free(mem_ctx
);
2232 if (DEBUGLEVEL
>= 10)
2233 NDR_PRINT_IN_DEBUG(netr_NETRSERVERPASSWORDGET
, &r
);
2235 r
.out
.result
= _netr_NETRSERVERPASSWORDGET(p
, &r
);
2237 if (p
->rng_fault_state
) {
2238 talloc_free(mem_ctx
);
2239 /* Return True here, srv_pipe_hnd.c will take care */
2243 if (DEBUGLEVEL
>= 10)
2244 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERPASSWORDGET
, &r
);
2246 push
= ndr_push_init_ctx(mem_ctx
);
2248 talloc_free(mem_ctx
);
2252 status
= ndr_push_netr_NETRSERVERPASSWORDGET(push
, NDR_OUT
, &r
);
2253 if (NT_STATUS_IS_ERR(status
)) {
2254 talloc_free(mem_ctx
);
2258 blob
= ndr_push_blob(push
);
2259 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2260 talloc_free(mem_ctx
);
2264 talloc_free(mem_ctx
);
2269 static BOOL
api_netr_NETRLOGONSENDTOSAM(pipes_struct
*p
)
2271 struct ndr_pull
*pull
;
2272 struct ndr_push
*push
;
2275 struct netr_NETRLOGONSENDTOSAM r
;
2276 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRLOGONSENDTOSAM");
2278 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2279 talloc_free(mem_ctx
);
2283 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2285 talloc_free(mem_ctx
);
2289 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2290 status
= ndr_pull_netr_NETRLOGONSENDTOSAM(pull
, NDR_IN
, &r
);
2291 if (NT_STATUS_IS_ERR(status
)) {
2292 talloc_free(mem_ctx
);
2296 if (DEBUGLEVEL
>= 10)
2297 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM
, &r
);
2299 r
.out
.result
= _netr_NETRLOGONSENDTOSAM(p
, &r
);
2301 if (p
->rng_fault_state
) {
2302 talloc_free(mem_ctx
);
2303 /* Return True here, srv_pipe_hnd.c will take care */
2307 if (DEBUGLEVEL
>= 10)
2308 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM
, &r
);
2310 push
= ndr_push_init_ctx(mem_ctx
);
2312 talloc_free(mem_ctx
);
2316 status
= ndr_push_netr_NETRLOGONSENDTOSAM(push
, NDR_OUT
, &r
);
2317 if (NT_STATUS_IS_ERR(status
)) {
2318 talloc_free(mem_ctx
);
2322 blob
= ndr_push_blob(push
);
2323 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2324 talloc_free(mem_ctx
);
2328 talloc_free(mem_ctx
);
2333 static BOOL
api_netr_DSRADDRESSTOSITENAMESW(pipes_struct
*p
)
2335 struct ndr_pull
*pull
;
2336 struct ndr_push
*push
;
2339 struct netr_DSRADDRESSTOSITENAMESW r
;
2340 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DSRADDRESSTOSITENAMESW");
2342 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2343 talloc_free(mem_ctx
);
2347 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2349 talloc_free(mem_ctx
);
2353 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2354 status
= ndr_pull_netr_DSRADDRESSTOSITENAMESW(pull
, NDR_IN
, &r
);
2355 if (NT_STATUS_IS_ERR(status
)) {
2356 talloc_free(mem_ctx
);
2360 if (DEBUGLEVEL
>= 10)
2361 NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESW
, &r
);
2363 r
.out
.result
= _netr_DSRADDRESSTOSITENAMESW(p
, &r
);
2365 if (p
->rng_fault_state
) {
2366 talloc_free(mem_ctx
);
2367 /* Return True here, srv_pipe_hnd.c will take care */
2371 if (DEBUGLEVEL
>= 10)
2372 NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESW
, &r
);
2374 push
= ndr_push_init_ctx(mem_ctx
);
2376 talloc_free(mem_ctx
);
2380 status
= ndr_push_netr_DSRADDRESSTOSITENAMESW(push
, NDR_OUT
, &r
);
2381 if (NT_STATUS_IS_ERR(status
)) {
2382 talloc_free(mem_ctx
);
2386 blob
= ndr_push_blob(push
);
2387 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2388 talloc_free(mem_ctx
);
2392 talloc_free(mem_ctx
);
2397 static BOOL
api_netr_DsRGetDCNameEx2(pipes_struct
*p
)
2399 struct ndr_pull
*pull
;
2400 struct ndr_push
*push
;
2403 struct netr_DsRGetDCNameEx2 r
;
2404 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DsRGetDCNameEx2");
2406 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2407 talloc_free(mem_ctx
);
2411 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2413 talloc_free(mem_ctx
);
2417 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2418 status
= ndr_pull_netr_DsRGetDCNameEx2(pull
, NDR_IN
, &r
);
2419 if (NT_STATUS_IS_ERR(status
)) {
2420 talloc_free(mem_ctx
);
2424 if (DEBUGLEVEL
>= 10)
2425 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2
, &r
);
2428 r
.out
.info
= talloc_zero(mem_ctx
, struct netr_DsRGetDCNameInfo
);
2429 if (r
.out
.info
== NULL
) {
2430 talloc_free(mem_ctx
);
2434 r
.out
.result
= _netr_DsRGetDCNameEx2(p
, &r
);
2436 if (p
->rng_fault_state
) {
2437 talloc_free(mem_ctx
);
2438 /* Return True here, srv_pipe_hnd.c will take care */
2442 if (DEBUGLEVEL
>= 10)
2443 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2
, &r
);
2445 push
= ndr_push_init_ctx(mem_ctx
);
2447 talloc_free(mem_ctx
);
2451 status
= ndr_push_netr_DsRGetDCNameEx2(push
, NDR_OUT
, &r
);
2452 if (NT_STATUS_IS_ERR(status
)) {
2453 talloc_free(mem_ctx
);
2457 blob
= ndr_push_blob(push
);
2458 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2459 talloc_free(mem_ctx
);
2463 talloc_free(mem_ctx
);
2468 static BOOL
api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct
*p
)
2470 struct ndr_pull
*pull
;
2471 struct ndr_push
*push
;
2474 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r
;
2475 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN");
2477 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2478 talloc_free(mem_ctx
);
2482 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2484 talloc_free(mem_ctx
);
2488 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2489 status
= ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pull
, NDR_IN
, &r
);
2490 if (NT_STATUS_IS_ERR(status
)) {
2491 talloc_free(mem_ctx
);
2495 if (DEBUGLEVEL
>= 10)
2496 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, &r
);
2498 r
.out
.result
= _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(p
, &r
);
2500 if (p
->rng_fault_state
) {
2501 talloc_free(mem_ctx
);
2502 /* Return True here, srv_pipe_hnd.c will take care */
2506 if (DEBUGLEVEL
>= 10)
2507 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, &r
);
2509 push
= ndr_push_init_ctx(mem_ctx
);
2511 talloc_free(mem_ctx
);
2515 status
= ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(push
, NDR_OUT
, &r
);
2516 if (NT_STATUS_IS_ERR(status
)) {
2517 talloc_free(mem_ctx
);
2521 blob
= ndr_push_blob(push
);
2522 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2523 talloc_free(mem_ctx
);
2527 talloc_free(mem_ctx
);
2532 static BOOL
api_netr_NETRENUMERATETRUSTEDDOMAINSEX(pipes_struct
*p
)
2534 struct ndr_pull
*pull
;
2535 struct ndr_push
*push
;
2538 struct netr_NETRENUMERATETRUSTEDDOMAINSEX r
;
2539 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRENUMERATETRUSTEDDOMAINSEX");
2541 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2542 talloc_free(mem_ctx
);
2546 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2548 talloc_free(mem_ctx
);
2552 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2553 status
= ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX(pull
, NDR_IN
, &r
);
2554 if (NT_STATUS_IS_ERR(status
)) {
2555 talloc_free(mem_ctx
);
2559 if (DEBUGLEVEL
>= 10)
2560 NDR_PRINT_IN_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX
, &r
);
2562 r
.out
.result
= _netr_NETRENUMERATETRUSTEDDOMAINSEX(p
, &r
);
2564 if (p
->rng_fault_state
) {
2565 talloc_free(mem_ctx
);
2566 /* Return True here, srv_pipe_hnd.c will take care */
2570 if (DEBUGLEVEL
>= 10)
2571 NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX
, &r
);
2573 push
= ndr_push_init_ctx(mem_ctx
);
2575 talloc_free(mem_ctx
);
2579 status
= ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX(push
, NDR_OUT
, &r
);
2580 if (NT_STATUS_IS_ERR(status
)) {
2581 talloc_free(mem_ctx
);
2585 blob
= ndr_push_blob(push
);
2586 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2587 talloc_free(mem_ctx
);
2591 talloc_free(mem_ctx
);
2596 static BOOL
api_netr_DSRADDRESSTOSITENAMESEXW(pipes_struct
*p
)
2598 struct ndr_pull
*pull
;
2599 struct ndr_push
*push
;
2602 struct netr_DSRADDRESSTOSITENAMESEXW r
;
2603 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DSRADDRESSTOSITENAMESEXW");
2605 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2606 talloc_free(mem_ctx
);
2610 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2612 talloc_free(mem_ctx
);
2616 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2617 status
= ndr_pull_netr_DSRADDRESSTOSITENAMESEXW(pull
, NDR_IN
, &r
);
2618 if (NT_STATUS_IS_ERR(status
)) {
2619 talloc_free(mem_ctx
);
2623 if (DEBUGLEVEL
>= 10)
2624 NDR_PRINT_IN_DEBUG(netr_DSRADDRESSTOSITENAMESEXW
, &r
);
2626 r
.out
.result
= _netr_DSRADDRESSTOSITENAMESEXW(p
, &r
);
2628 if (p
->rng_fault_state
) {
2629 talloc_free(mem_ctx
);
2630 /* Return True here, srv_pipe_hnd.c will take care */
2634 if (DEBUGLEVEL
>= 10)
2635 NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESEXW
, &r
);
2637 push
= ndr_push_init_ctx(mem_ctx
);
2639 talloc_free(mem_ctx
);
2643 status
= ndr_push_netr_DSRADDRESSTOSITENAMESEXW(push
, NDR_OUT
, &r
);
2644 if (NT_STATUS_IS_ERR(status
)) {
2645 talloc_free(mem_ctx
);
2649 blob
= ndr_push_blob(push
);
2650 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2651 talloc_free(mem_ctx
);
2655 talloc_free(mem_ctx
);
2660 static BOOL
api_netr_DSRGETDCSITECOVERAGEW(pipes_struct
*p
)
2662 struct ndr_pull
*pull
;
2663 struct ndr_push
*push
;
2666 struct netr_DSRGETDCSITECOVERAGEW r
;
2667 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DSRGETDCSITECOVERAGEW");
2669 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2670 talloc_free(mem_ctx
);
2674 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2676 talloc_free(mem_ctx
);
2680 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2681 status
= ndr_pull_netr_DSRGETDCSITECOVERAGEW(pull
, NDR_IN
, &r
);
2682 if (NT_STATUS_IS_ERR(status
)) {
2683 talloc_free(mem_ctx
);
2687 if (DEBUGLEVEL
>= 10)
2688 NDR_PRINT_IN_DEBUG(netr_DSRGETDCSITECOVERAGEW
, &r
);
2690 r
.out
.result
= _netr_DSRGETDCSITECOVERAGEW(p
, &r
);
2692 if (p
->rng_fault_state
) {
2693 talloc_free(mem_ctx
);
2694 /* Return True here, srv_pipe_hnd.c will take care */
2698 if (DEBUGLEVEL
>= 10)
2699 NDR_PRINT_OUT_DEBUG(netr_DSRGETDCSITECOVERAGEW
, &r
);
2701 push
= ndr_push_init_ctx(mem_ctx
);
2703 talloc_free(mem_ctx
);
2707 status
= ndr_push_netr_DSRGETDCSITECOVERAGEW(push
, NDR_OUT
, &r
);
2708 if (NT_STATUS_IS_ERR(status
)) {
2709 talloc_free(mem_ctx
);
2713 blob
= ndr_push_blob(push
);
2714 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2715 talloc_free(mem_ctx
);
2719 talloc_free(mem_ctx
);
2724 static BOOL
api_netr_LogonSamLogonEx(pipes_struct
*p
)
2726 struct ndr_pull
*pull
;
2727 struct ndr_push
*push
;
2730 struct netr_LogonSamLogonEx r
;
2731 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonSamLogonEx");
2733 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2734 talloc_free(mem_ctx
);
2738 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2740 talloc_free(mem_ctx
);
2744 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2745 status
= ndr_pull_netr_LogonSamLogonEx(pull
, NDR_IN
, &r
);
2746 if (NT_STATUS_IS_ERR(status
)) {
2747 talloc_free(mem_ctx
);
2751 if (DEBUGLEVEL
>= 10)
2752 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx
, &r
);
2755 r
.out
.validation
= talloc_zero(mem_ctx
, union netr_Validation
);
2756 if (r
.out
.validation
== NULL
) {
2757 talloc_free(mem_ctx
);
2761 r
.out
.authoritative
= talloc_zero(mem_ctx
, uint8_t);
2762 if (r
.out
.authoritative
== NULL
) {
2763 talloc_free(mem_ctx
);
2767 r
.out
.flags
= r
.in
.flags
;
2768 r
.out
.result
= _netr_LogonSamLogonEx(p
, &r
);
2770 if (p
->rng_fault_state
) {
2771 talloc_free(mem_ctx
);
2772 /* Return True here, srv_pipe_hnd.c will take care */
2776 if (DEBUGLEVEL
>= 10)
2777 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx
, &r
);
2779 push
= ndr_push_init_ctx(mem_ctx
);
2781 talloc_free(mem_ctx
);
2785 status
= ndr_push_netr_LogonSamLogonEx(push
, NDR_OUT
, &r
);
2786 if (NT_STATUS_IS_ERR(status
)) {
2787 talloc_free(mem_ctx
);
2791 blob
= ndr_push_blob(push
);
2792 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2793 talloc_free(mem_ctx
);
2797 talloc_free(mem_ctx
);
2802 static BOOL
api_netr_DsrEnumerateDomainTrusts(pipes_struct
*p
)
2804 struct ndr_pull
*pull
;
2805 struct ndr_push
*push
;
2808 struct netr_DsrEnumerateDomainTrusts r
;
2809 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DsrEnumerateDomainTrusts");
2811 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2812 talloc_free(mem_ctx
);
2816 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2818 talloc_free(mem_ctx
);
2822 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2823 status
= ndr_pull_netr_DsrEnumerateDomainTrusts(pull
, NDR_IN
, &r
);
2824 if (NT_STATUS_IS_ERR(status
)) {
2825 talloc_free(mem_ctx
);
2829 if (DEBUGLEVEL
>= 10)
2830 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts
, &r
);
2833 r
.out
.count
= talloc_zero(mem_ctx
, uint32_t);
2834 if (r
.out
.count
== NULL
) {
2835 talloc_free(mem_ctx
);
2839 r
.out
.trusts
= talloc_zero_array(mem_ctx
, struct netr_DomainTrust
*, count
);
2840 if (r
.out
.trusts
== NULL
) {
2841 talloc_free(mem_ctx
);
2845 r
.out
.result
= _netr_DsrEnumerateDomainTrusts(p
, &r
);
2847 if (p
->rng_fault_state
) {
2848 talloc_free(mem_ctx
);
2849 /* Return True here, srv_pipe_hnd.c will take care */
2853 if (DEBUGLEVEL
>= 10)
2854 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts
, &r
);
2856 push
= ndr_push_init_ctx(mem_ctx
);
2858 talloc_free(mem_ctx
);
2862 status
= ndr_push_netr_DsrEnumerateDomainTrusts(push
, NDR_OUT
, &r
);
2863 if (NT_STATUS_IS_ERR(status
)) {
2864 talloc_free(mem_ctx
);
2868 blob
= ndr_push_blob(push
);
2869 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2870 talloc_free(mem_ctx
);
2874 talloc_free(mem_ctx
);
2879 static BOOL
api_netr_DSRDEREGISTERDNSHOSTRECORDS(pipes_struct
*p
)
2881 struct ndr_pull
*pull
;
2882 struct ndr_push
*push
;
2885 struct netr_DSRDEREGISTERDNSHOSTRECORDS r
;
2886 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DSRDEREGISTERDNSHOSTRECORDS");
2888 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2889 talloc_free(mem_ctx
);
2893 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2895 talloc_free(mem_ctx
);
2899 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2900 status
= ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS(pull
, NDR_IN
, &r
);
2901 if (NT_STATUS_IS_ERR(status
)) {
2902 talloc_free(mem_ctx
);
2906 if (DEBUGLEVEL
>= 10)
2907 NDR_PRINT_IN_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS
, &r
);
2909 r
.out
.result
= _netr_DSRDEREGISTERDNSHOSTRECORDS(p
, &r
);
2911 if (p
->rng_fault_state
) {
2912 talloc_free(mem_ctx
);
2913 /* Return True here, srv_pipe_hnd.c will take care */
2917 if (DEBUGLEVEL
>= 10)
2918 NDR_PRINT_OUT_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS
, &r
);
2920 push
= ndr_push_init_ctx(mem_ctx
);
2922 talloc_free(mem_ctx
);
2926 status
= ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS(push
, NDR_OUT
, &r
);
2927 if (NT_STATUS_IS_ERR(status
)) {
2928 talloc_free(mem_ctx
);
2932 blob
= ndr_push_blob(push
);
2933 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2934 talloc_free(mem_ctx
);
2938 talloc_free(mem_ctx
);
2943 static BOOL
api_netr_NETRSERVERTRUSTPASSWORDSGET(pipes_struct
*p
)
2945 struct ndr_pull
*pull
;
2946 struct ndr_push
*push
;
2949 struct netr_NETRSERVERTRUSTPASSWORDSGET r
;
2950 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRSERVERTRUSTPASSWORDSGET");
2952 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
2953 talloc_free(mem_ctx
);
2957 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2959 talloc_free(mem_ctx
);
2963 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2964 status
= ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET(pull
, NDR_IN
, &r
);
2965 if (NT_STATUS_IS_ERR(status
)) {
2966 talloc_free(mem_ctx
);
2970 if (DEBUGLEVEL
>= 10)
2971 NDR_PRINT_IN_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET
, &r
);
2973 r
.out
.result
= _netr_NETRSERVERTRUSTPASSWORDSGET(p
, &r
);
2975 if (p
->rng_fault_state
) {
2976 talloc_free(mem_ctx
);
2977 /* Return True here, srv_pipe_hnd.c will take care */
2981 if (DEBUGLEVEL
>= 10)
2982 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET
, &r
);
2984 push
= ndr_push_init_ctx(mem_ctx
);
2986 talloc_free(mem_ctx
);
2990 status
= ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET(push
, NDR_OUT
, &r
);
2991 if (NT_STATUS_IS_ERR(status
)) {
2992 talloc_free(mem_ctx
);
2996 blob
= ndr_push_blob(push
);
2997 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
2998 talloc_free(mem_ctx
);
3002 talloc_free(mem_ctx
);
3007 static BOOL
api_netr_DSRGETFORESTTRUSTINFORMATION(pipes_struct
*p
)
3009 struct ndr_pull
*pull
;
3010 struct ndr_push
*push
;
3013 struct netr_DSRGETFORESTTRUSTINFORMATION r
;
3014 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_DSRGETFORESTTRUSTINFORMATION");
3016 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
3017 talloc_free(mem_ctx
);
3021 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3023 talloc_free(mem_ctx
);
3027 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3028 status
= ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION(pull
, NDR_IN
, &r
);
3029 if (NT_STATUS_IS_ERR(status
)) {
3030 talloc_free(mem_ctx
);
3034 if (DEBUGLEVEL
>= 10)
3035 NDR_PRINT_IN_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION
, &r
);
3037 r
.out
.result
= _netr_DSRGETFORESTTRUSTINFORMATION(p
, &r
);
3039 if (p
->rng_fault_state
) {
3040 talloc_free(mem_ctx
);
3041 /* Return True here, srv_pipe_hnd.c will take care */
3045 if (DEBUGLEVEL
>= 10)
3046 NDR_PRINT_OUT_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION
, &r
);
3048 push
= ndr_push_init_ctx(mem_ctx
);
3050 talloc_free(mem_ctx
);
3054 status
= ndr_push_netr_DSRGETFORESTTRUSTINFORMATION(push
, NDR_OUT
, &r
);
3055 if (NT_STATUS_IS_ERR(status
)) {
3056 talloc_free(mem_ctx
);
3060 blob
= ndr_push_blob(push
);
3061 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
3062 talloc_free(mem_ctx
);
3066 talloc_free(mem_ctx
);
3071 static BOOL
api_netr_NETRGETFORESTTRUSTINFORMATION(pipes_struct
*p
)
3073 struct ndr_pull
*pull
;
3074 struct ndr_push
*push
;
3077 struct netr_NETRGETFORESTTRUSTINFORMATION r
;
3078 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRGETFORESTTRUSTINFORMATION");
3080 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
3081 talloc_free(mem_ctx
);
3085 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3087 talloc_free(mem_ctx
);
3091 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3092 status
= ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION(pull
, NDR_IN
, &r
);
3093 if (NT_STATUS_IS_ERR(status
)) {
3094 talloc_free(mem_ctx
);
3098 if (DEBUGLEVEL
>= 10)
3099 NDR_PRINT_IN_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION
, &r
);
3101 r
.out
.result
= _netr_NETRGETFORESTTRUSTINFORMATION(p
, &r
);
3103 if (p
->rng_fault_state
) {
3104 talloc_free(mem_ctx
);
3105 /* Return True here, srv_pipe_hnd.c will take care */
3109 if (DEBUGLEVEL
>= 10)
3110 NDR_PRINT_OUT_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION
, &r
);
3112 push
= ndr_push_init_ctx(mem_ctx
);
3114 talloc_free(mem_ctx
);
3118 status
= ndr_push_netr_NETRGETFORESTTRUSTINFORMATION(push
, NDR_OUT
, &r
);
3119 if (NT_STATUS_IS_ERR(status
)) {
3120 talloc_free(mem_ctx
);
3124 blob
= ndr_push_blob(push
);
3125 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
3126 talloc_free(mem_ctx
);
3130 talloc_free(mem_ctx
);
3135 static BOOL
api_netr_LogonSamLogonWithFlags(pipes_struct
*p
)
3137 struct ndr_pull
*pull
;
3138 struct ndr_push
*push
;
3141 struct netr_LogonSamLogonWithFlags r
;
3142 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_LogonSamLogonWithFlags");
3144 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
3145 talloc_free(mem_ctx
);
3149 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3151 talloc_free(mem_ctx
);
3155 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3156 status
= ndr_pull_netr_LogonSamLogonWithFlags(pull
, NDR_IN
, &r
);
3157 if (NT_STATUS_IS_ERR(status
)) {
3158 talloc_free(mem_ctx
);
3162 if (DEBUGLEVEL
>= 10)
3163 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags
, &r
);
3166 r
.out
.return_authenticator
= r
.in
.return_authenticator
;
3167 r
.out
.validation
= talloc_zero(mem_ctx
, union netr_Validation
);
3168 if (r
.out
.validation
== NULL
) {
3169 talloc_free(mem_ctx
);
3173 r
.out
.authoritative
= talloc_zero(mem_ctx
, uint8_t);
3174 if (r
.out
.authoritative
== NULL
) {
3175 talloc_free(mem_ctx
);
3179 r
.out
.flags
= r
.in
.flags
;
3180 r
.out
.result
= _netr_LogonSamLogonWithFlags(p
, &r
);
3182 if (p
->rng_fault_state
) {
3183 talloc_free(mem_ctx
);
3184 /* Return True here, srv_pipe_hnd.c will take care */
3188 if (DEBUGLEVEL
>= 10)
3189 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags
, &r
);
3191 push
= ndr_push_init_ctx(mem_ctx
);
3193 talloc_free(mem_ctx
);
3197 status
= ndr_push_netr_LogonSamLogonWithFlags(push
, NDR_OUT
, &r
);
3198 if (NT_STATUS_IS_ERR(status
)) {
3199 talloc_free(mem_ctx
);
3203 blob
= ndr_push_blob(push
);
3204 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
3205 talloc_free(mem_ctx
);
3209 talloc_free(mem_ctx
);
3214 static BOOL
api_netr_NETRSERVERGETTRUSTINFO(pipes_struct
*p
)
3216 struct ndr_pull
*pull
;
3217 struct ndr_push
*push
;
3220 struct netr_NETRSERVERGETTRUSTINFO r
;
3221 TALLOC_CTX
*mem_ctx
= talloc_init("api_netr_NETRSERVERGETTRUSTINFO");
3223 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
3224 talloc_free(mem_ctx
);
3228 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3230 talloc_free(mem_ctx
);
3234 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3235 status
= ndr_pull_netr_NETRSERVERGETTRUSTINFO(pull
, NDR_IN
, &r
);
3236 if (NT_STATUS_IS_ERR(status
)) {
3237 talloc_free(mem_ctx
);
3241 if (DEBUGLEVEL
>= 10)
3242 NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO
, &r
);
3244 r
.out
.result
= _netr_NETRSERVERGETTRUSTINFO(p
, &r
);
3246 if (p
->rng_fault_state
) {
3247 talloc_free(mem_ctx
);
3248 /* Return True here, srv_pipe_hnd.c will take care */
3252 if (DEBUGLEVEL
>= 10)
3253 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO
, &r
);
3255 push
= ndr_push_init_ctx(mem_ctx
);
3257 talloc_free(mem_ctx
);
3261 status
= ndr_push_netr_NETRSERVERGETTRUSTINFO(push
, NDR_OUT
, &r
);
3262 if (NT_STATUS_IS_ERR(status
)) {
3263 talloc_free(mem_ctx
);
3267 blob
= ndr_push_blob(push
);
3268 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
3269 talloc_free(mem_ctx
);
3273 talloc_free(mem_ctx
);
3280 static struct api_struct api_netlogon_cmds
[] =
3282 {"NETR_LOGONUASLOGON", DCERPC_NETR_LOGONUASLOGON
, api_netr_LogonUasLogon
},
3283 {"NETR_LOGONUASLOGOFF", DCERPC_NETR_LOGONUASLOGOFF
, api_netr_LogonUasLogoff
},
3284 {"NETR_LOGONSAMLOGON", DCERPC_NETR_LOGONSAMLOGON
, api_netr_LogonSamLogon
},
3285 {"NETR_LOGONSAMLOGOFF", DCERPC_NETR_LOGONSAMLOGOFF
, api_netr_LogonSamLogoff
},
3286 {"NETR_SERVERREQCHALLENGE", DCERPC_NETR_SERVERREQCHALLENGE
, api_netr_ServerReqChallenge
},
3287 {"NETR_SERVERAUTHENTICATE", DCERPC_NETR_SERVERAUTHENTICATE
, api_netr_ServerAuthenticate
},
3288 {"NETR_SERVERPASSWORDSET", DCERPC_NETR_SERVERPASSWORDSET
, api_netr_ServerPasswordSet
},
3289 {"NETR_DATABASEDELTAS", DCERPC_NETR_DATABASEDELTAS
, api_netr_DatabaseDeltas
},
3290 {"NETR_DATABASESYNC", DCERPC_NETR_DATABASESYNC
, api_netr_DatabaseSync
},
3291 {"NETR_ACCOUNTDELTAS", DCERPC_NETR_ACCOUNTDELTAS
, api_netr_AccountDeltas
},
3292 {"NETR_ACCOUNTSYNC", DCERPC_NETR_ACCOUNTSYNC
, api_netr_AccountSync
},
3293 {"NETR_GETDCNAME", DCERPC_NETR_GETDCNAME
, api_netr_GetDcName
},
3294 {"NETR_LOGONCONTROL", DCERPC_NETR_LOGONCONTROL
, api_netr_LogonControl
},
3295 {"NETR_GETANYDCNAME", DCERPC_NETR_GETANYDCNAME
, api_netr_GetAnyDCName
},
3296 {"NETR_LOGONCONTROL2", DCERPC_NETR_LOGONCONTROL2
, api_netr_LogonControl2
},
3297 {"NETR_SERVERAUTHENTICATE2", DCERPC_NETR_SERVERAUTHENTICATE2
, api_netr_ServerAuthenticate2
},
3298 {"NETR_DATABASESYNC2", DCERPC_NETR_DATABASESYNC2
, api_netr_DatabaseSync2
},
3299 {"NETR_DATABASEREDO", DCERPC_NETR_DATABASEREDO
, api_netr_DatabaseRedo
},
3300 {"NETR_LOGONCONTROL2EX", DCERPC_NETR_LOGONCONTROL2EX
, api_netr_LogonControl2Ex
},
3301 {"NETR_NETRENUMERATETRUSTEDDOMAINS", DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINS
, api_netr_NETRENUMERATETRUSTEDDOMAINS
},
3302 {"NETR_DSRGETDCNAME", DCERPC_NETR_DSRGETDCNAME
, api_netr_DsRGetDCName
},
3303 {"NETR_NETRLOGONDUMMYROUTINE1", DCERPC_NETR_NETRLOGONDUMMYROUTINE1
, api_netr_NETRLOGONDUMMYROUTINE1
},
3304 {"NETR_NETRLOGONSETSERVICEBITS", DCERPC_NETR_NETRLOGONSETSERVICEBITS
, api_netr_NETRLOGONSETSERVICEBITS
},
3305 {"NETR_NETRLOGONGETTRUSTRID", DCERPC_NETR_NETRLOGONGETTRUSTRID
, api_netr_NETRLOGONGETTRUSTRID
},
3306 {"NETR_NETRLOGONCOMPUTESERVERDIGEST", DCERPC_NETR_NETRLOGONCOMPUTESERVERDIGEST
, api_netr_NETRLOGONCOMPUTESERVERDIGEST
},
3307 {"NETR_NETRLOGONCOMPUTECLIENTDIGEST", DCERPC_NETR_NETRLOGONCOMPUTECLIENTDIGEST
, api_netr_NETRLOGONCOMPUTECLIENTDIGEST
},
3308 {"NETR_SERVERAUTHENTICATE3", DCERPC_NETR_SERVERAUTHENTICATE3
, api_netr_ServerAuthenticate3
},
3309 {"NETR_DSRGETDCNAMEEX", DCERPC_NETR_DSRGETDCNAMEEX
, api_netr_DsRGetDCNameEx
},
3310 {"NETR_DSRGETSITENAME", DCERPC_NETR_DSRGETSITENAME
, api_netr_DsRGetSiteName
},
3311 {"NETR_LOGONGETDOMAININFO", DCERPC_NETR_LOGONGETDOMAININFO
, api_netr_LogonGetDomainInfo
},
3312 {"NETR_SERVERPASSWORDSET2", DCERPC_NETR_SERVERPASSWORDSET2
, api_netr_ServerPasswordSet2
},
3313 {"NETR_NETRSERVERPASSWORDGET", DCERPC_NETR_NETRSERVERPASSWORDGET
, api_netr_NETRSERVERPASSWORDGET
},
3314 {"NETR_NETRLOGONSENDTOSAM", DCERPC_NETR_NETRLOGONSENDTOSAM
, api_netr_NETRLOGONSENDTOSAM
},
3315 {"NETR_DSRADDRESSTOSITENAMESW", DCERPC_NETR_DSRADDRESSTOSITENAMESW
, api_netr_DSRADDRESSTOSITENAMESW
},
3316 {"NETR_DSRGETDCNAMEEX2", DCERPC_NETR_DSRGETDCNAMEEX2
, api_netr_DsRGetDCNameEx2
},
3317 {"NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN", DCERPC_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
},
3318 {"NETR_NETRENUMERATETRUSTEDDOMAINSEX", DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINSEX
, api_netr_NETRENUMERATETRUSTEDDOMAINSEX
},
3319 {"NETR_DSRADDRESSTOSITENAMESEXW", DCERPC_NETR_DSRADDRESSTOSITENAMESEXW
, api_netr_DSRADDRESSTOSITENAMESEXW
},
3320 {"NETR_DSRGETDCSITECOVERAGEW", DCERPC_NETR_DSRGETDCSITECOVERAGEW
, api_netr_DSRGETDCSITECOVERAGEW
},
3321 {"NETR_LOGONSAMLOGONEX", DCERPC_NETR_LOGONSAMLOGONEX
, api_netr_LogonSamLogonEx
},
3322 {"NETR_DSRENUMERATEDOMAINTRUSTS", DCERPC_NETR_DSRENUMERATEDOMAINTRUSTS
, api_netr_DsrEnumerateDomainTrusts
},
3323 {"NETR_DSRDEREGISTERDNSHOSTRECORDS", DCERPC_NETR_DSRDEREGISTERDNSHOSTRECORDS
, api_netr_DSRDEREGISTERDNSHOSTRECORDS
},
3324 {"NETR_NETRSERVERTRUSTPASSWORDSGET", DCERPC_NETR_NETRSERVERTRUSTPASSWORDSGET
, api_netr_NETRSERVERTRUSTPASSWORDSGET
},
3325 {"NETR_DSRGETFORESTTRUSTINFORMATION", DCERPC_NETR_DSRGETFORESTTRUSTINFORMATION
, api_netr_DSRGETFORESTTRUSTINFORMATION
},
3326 {"NETR_NETRGETFORESTTRUSTINFORMATION", DCERPC_NETR_NETRGETFORESTTRUSTINFORMATION
, api_netr_NETRGETFORESTTRUSTINFORMATION
},
3327 {"NETR_LOGONSAMLOGONWITHFLAGS", DCERPC_NETR_LOGONSAMLOGONWITHFLAGS
, api_netr_LogonSamLogonWithFlags
},
3328 {"NETR_NETRSERVERGETTRUSTINFO", DCERPC_NETR_NETRSERVERGETTRUSTINFO
, api_netr_NETRSERVERGETTRUSTINFO
},
3331 void netlogon_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
3333 *fns
= api_netlogon_cmds
;
3334 *n_fns
= sizeof(api_netlogon_cmds
) / sizeof(struct api_struct
);
3337 NTSTATUS
rpc_netlogon_init(void)
3339 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "netlogon", "netlogon", api_netlogon_cmds
, sizeof(api_netlogon_cmds
) / sizeof(struct api_struct
));