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 const struct ndr_interface_call
*call
;
12 struct ndr_pull
*pull
;
13 struct ndr_push
*push
;
14 enum ndr_err_code ndr_err
;
16 struct netr_LogonUasLogon
*r
;
18 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONUASLOGON
];
20 r
= talloc(talloc_tos(), struct netr_LogonUasLogon
);
25 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
30 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
43 if (DEBUGLEVEL
>= 10) {
44 NDR_PRINT_IN_DEBUG(netr_LogonUasLogon
, r
);
48 r
->out
.info
= talloc_zero(r
, struct netr_UasInfo
*);
49 if (r
->out
.info
== NULL
) {
54 r
->out
.result
= _netr_LogonUasLogon(p
, r
);
56 if (p
->rng_fault_state
) {
58 /* Return true here, srv_pipe_hnd.c will take care */
62 if (DEBUGLEVEL
>= 10) {
63 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon
, r
);
66 push
= ndr_push_init_ctx(r
, NULL
);
72 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
73 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
78 blob
= ndr_push_blob(push
);
79 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
96 struct netr_LogonUasLogoff
*r
;
98 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONUASLOGOFF
];
100 r
= talloc(talloc_tos(), struct netr_LogonUasLogoff
);
105 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
110 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
123 if (DEBUGLEVEL
>= 10) {
124 NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff
, r
);
128 r
->out
.info
= talloc_zero(r
, struct netr_UasLogoffInfo
);
129 if (r
->out
.info
== NULL
) {
134 r
->out
.result
= _netr_LogonUasLogoff(p
, r
);
136 if (p
->rng_fault_state
) {
138 /* Return true here, srv_pipe_hnd.c will take care */
142 if (DEBUGLEVEL
>= 10) {
143 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff
, r
);
146 push
= ndr_push_init_ctx(r
, NULL
);
152 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
153 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
158 blob
= ndr_push_blob(push
);
159 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
176 struct netr_LogonSamLogon
*r
;
178 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONSAMLOGON
];
180 r
= talloc(talloc_tos(), struct netr_LogonSamLogon
);
185 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
190 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
203 if (DEBUGLEVEL
>= 10) {
204 NDR_PRINT_IN_DEBUG(netr_LogonSamLogon
, r
);
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
) {
215 r
->out
.authoritative
= talloc_zero(r
, uint8_t);
216 if (r
->out
.authoritative
== NULL
) {
221 r
->out
.result
= _netr_LogonSamLogon(p
, r
);
223 if (p
->rng_fault_state
) {
225 /* Return true here, srv_pipe_hnd.c will take care */
229 if (DEBUGLEVEL
>= 10) {
230 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon
, r
);
233 push
= ndr_push_init_ctx(r
, NULL
);
239 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
240 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
245 blob
= ndr_push_blob(push
);
246 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
263 struct netr_LogonSamLogoff
*r
;
265 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONSAMLOGOFF
];
267 r
= talloc(talloc_tos(), struct netr_LogonSamLogoff
);
272 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
277 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
290 if (DEBUGLEVEL
>= 10) {
291 NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff
, r
);
295 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
296 r
->out
.result
= _netr_LogonSamLogoff(p
, r
);
298 if (p
->rng_fault_state
) {
300 /* Return true here, srv_pipe_hnd.c will take care */
304 if (DEBUGLEVEL
>= 10) {
305 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff
, r
);
308 push
= ndr_push_init_ctx(r
, NULL
);
314 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
315 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
320 blob
= ndr_push_blob(push
);
321 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
338 struct netr_ServerReqChallenge
*r
;
340 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERREQCHALLENGE
];
342 r
= talloc(talloc_tos(), struct netr_ServerReqChallenge
);
347 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
352 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
365 if (DEBUGLEVEL
>= 10) {
366 NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge
, r
);
370 r
->out
.return_credentials
= talloc_zero(r
, struct netr_Credential
);
371 if (r
->out
.return_credentials
== NULL
) {
376 r
->out
.result
= _netr_ServerReqChallenge(p
, r
);
378 if (p
->rng_fault_state
) {
380 /* Return true here, srv_pipe_hnd.c will take care */
384 if (DEBUGLEVEL
>= 10) {
385 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge
, r
);
388 push
= ndr_push_init_ctx(r
, NULL
);
394 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
395 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
400 blob
= ndr_push_blob(push
);
401 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
418 struct netr_ServerAuthenticate
*r
;
420 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERAUTHENTICATE
];
422 r
= talloc(talloc_tos(), struct netr_ServerAuthenticate
);
427 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
432 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
445 if (DEBUGLEVEL
>= 10) {
446 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate
, r
);
450 r
->out
.return_credentials
= talloc_zero(r
, struct netr_Credential
);
451 if (r
->out
.return_credentials
== NULL
) {
456 r
->out
.result
= _netr_ServerAuthenticate(p
, r
);
458 if (p
->rng_fault_state
) {
460 /* Return true here, srv_pipe_hnd.c will take care */
464 if (DEBUGLEVEL
>= 10) {
465 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate
, r
);
468 push
= ndr_push_init_ctx(r
, NULL
);
474 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
475 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
480 blob
= ndr_push_blob(push
);
481 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
498 struct netr_ServerPasswordSet
*r
;
500 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERPASSWORDSET
];
502 r
= talloc(talloc_tos(), struct netr_ServerPasswordSet
);
507 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
512 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
525 if (DEBUGLEVEL
>= 10) {
526 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet
, r
);
530 r
->out
.return_authenticator
= talloc_zero(r
, struct netr_Authenticator
);
531 if (r
->out
.return_authenticator
== NULL
) {
536 r
->out
.result
= _netr_ServerPasswordSet(p
, r
);
538 if (p
->rng_fault_state
) {
540 /* Return true here, srv_pipe_hnd.c will take care */
544 if (DEBUGLEVEL
>= 10) {
545 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet
, r
);
548 push
= ndr_push_init_ctx(r
, NULL
);
554 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
555 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
560 blob
= ndr_push_blob(push
);
561 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
578 struct netr_DatabaseDeltas
*r
;
580 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DATABASEDELTAS
];
582 r
= talloc(talloc_tos(), struct netr_DatabaseDeltas
);
587 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
592 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
605 if (DEBUGLEVEL
>= 10) {
606 NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas
, r
);
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
) {
618 r
->out
.result
= _netr_DatabaseDeltas(p
, r
);
620 if (p
->rng_fault_state
) {
622 /* Return true here, srv_pipe_hnd.c will take care */
626 if (DEBUGLEVEL
>= 10) {
627 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas
, r
);
630 push
= ndr_push_init_ctx(r
, NULL
);
636 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
637 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
642 blob
= ndr_push_blob(push
);
643 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
660 struct netr_DatabaseSync
*r
;
662 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DATABASESYNC
];
664 r
= talloc(talloc_tos(), struct netr_DatabaseSync
);
669 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
674 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
687 if (DEBUGLEVEL
>= 10) {
688 NDR_PRINT_IN_DEBUG(netr_DatabaseSync
, r
);
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
) {
700 r
->out
.result
= _netr_DatabaseSync(p
, r
);
702 if (p
->rng_fault_state
) {
704 /* Return true here, srv_pipe_hnd.c will take care */
708 if (DEBUGLEVEL
>= 10) {
709 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync
, r
);
712 push
= ndr_push_init_ctx(r
, NULL
);
718 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
719 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
724 blob
= ndr_push_blob(push
);
725 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
742 struct netr_AccountDeltas
*r
;
744 call
= &ndr_table_netlogon
.calls
[NDR_NETR_ACCOUNTDELTAS
];
746 r
= talloc(talloc_tos(), struct netr_AccountDeltas
);
751 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
756 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
769 if (DEBUGLEVEL
>= 10) {
770 NDR_PRINT_IN_DEBUG(netr_AccountDeltas
, r
);
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
) {
781 r
->out
.count_returned
= talloc_zero(r
, uint32_t);
782 if (r
->out
.count_returned
== NULL
) {
787 r
->out
.total_entries
= talloc_zero(r
, uint32_t);
788 if (r
->out
.total_entries
== NULL
) {
793 r
->out
.recordid
= talloc_zero(r
, struct netr_UAS_INFO_0
);
794 if (r
->out
.recordid
== NULL
) {
799 r
->out
.result
= _netr_AccountDeltas(p
, r
);
801 if (p
->rng_fault_state
) {
803 /* Return true here, srv_pipe_hnd.c will take care */
807 if (DEBUGLEVEL
>= 10) {
808 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas
, r
);
811 push
= ndr_push_init_ctx(r
, NULL
);
817 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
818 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
823 blob
= ndr_push_blob(push
);
824 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
841 struct netr_AccountSync
*r
;
843 call
= &ndr_table_netlogon
.calls
[NDR_NETR_ACCOUNTSYNC
];
845 r
= talloc(talloc_tos(), struct netr_AccountSync
);
850 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
855 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
868 if (DEBUGLEVEL
>= 10) {
869 NDR_PRINT_IN_DEBUG(netr_AccountSync
, r
);
873 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
874 r
->out
.recordid
= r
->in
.recordid
;
875 r
->out
.buffer
= talloc_zero(r
, struct netr_AccountBuffer
);
876 if (r
->out
.buffer
== NULL
) {
881 r
->out
.count_returned
= talloc_zero(r
, uint32_t);
882 if (r
->out
.count_returned
== NULL
) {
887 r
->out
.total_entries
= talloc_zero(r
, uint32_t);
888 if (r
->out
.total_entries
== NULL
) {
893 r
->out
.next_reference
= talloc_zero(r
, uint32_t);
894 if (r
->out
.next_reference
== NULL
) {
899 r
->out
.result
= _netr_AccountSync(p
, r
);
901 if (p
->rng_fault_state
) {
903 /* Return true here, srv_pipe_hnd.c will take care */
907 if (DEBUGLEVEL
>= 10) {
908 NDR_PRINT_OUT_DEBUG(netr_AccountSync
, r
);
911 push
= ndr_push_init_ctx(r
, NULL
);
917 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
918 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
923 blob
= ndr_push_blob(push
);
924 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
941 struct netr_GetDcName
*r
;
943 call
= &ndr_table_netlogon
.calls
[NDR_NETR_GETDCNAME
];
945 r
= talloc(talloc_tos(), struct netr_GetDcName
);
950 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
955 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
968 if (DEBUGLEVEL
>= 10) {
969 NDR_PRINT_IN_DEBUG(netr_GetDcName
, r
);
973 r
->out
.dcname
= talloc_zero(r
, const char *);
974 if (r
->out
.dcname
== NULL
) {
979 r
->out
.result
= _netr_GetDcName(p
, r
);
981 if (p
->rng_fault_state
) {
983 /* Return true here, srv_pipe_hnd.c will take care */
987 if (DEBUGLEVEL
>= 10) {
988 NDR_PRINT_OUT_DEBUG(netr_GetDcName
, r
);
991 push
= ndr_push_init_ctx(r
, NULL
);
997 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
998 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1003 blob
= ndr_push_blob(push
);
1004 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1021 struct netr_LogonControl
*r
;
1023 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONCONTROL
];
1025 r
= talloc(talloc_tos(), struct netr_LogonControl
);
1030 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1035 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
1048 if (DEBUGLEVEL
>= 10) {
1049 NDR_PRINT_IN_DEBUG(netr_LogonControl
, r
);
1052 ZERO_STRUCT(r
->out
);
1053 r
->out
.query
= talloc_zero(r
, union netr_CONTROL_QUERY_INFORMATION
);
1054 if (r
->out
.query
== NULL
) {
1059 r
->out
.result
= _netr_LogonControl(p
, r
);
1061 if (p
->rng_fault_state
) {
1063 /* Return true here, srv_pipe_hnd.c will take care */
1067 if (DEBUGLEVEL
>= 10) {
1068 NDR_PRINT_OUT_DEBUG(netr_LogonControl
, r
);
1071 push
= ndr_push_init_ctx(r
, NULL
);
1077 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1078 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1083 blob
= ndr_push_blob(push
);
1084 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1101 struct netr_GetAnyDCName
*r
;
1103 call
= &ndr_table_netlogon
.calls
[NDR_NETR_GETANYDCNAME
];
1105 r
= talloc(talloc_tos(), struct netr_GetAnyDCName
);
1110 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1115 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
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
) {
1139 r
->out
.result
= _netr_GetAnyDCName(p
, r
);
1141 if (p
->rng_fault_state
) {
1143 /* Return true here, srv_pipe_hnd.c will take care */
1147 if (DEBUGLEVEL
>= 10) {
1148 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName
, r
);
1151 push
= ndr_push_init_ctx(r
, NULL
);
1157 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1158 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1163 blob
= ndr_push_blob(push
);
1164 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1181 struct netr_LogonControl2
*r
;
1183 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONCONTROL2
];
1185 r
= talloc(talloc_tos(), struct netr_LogonControl2
);
1190 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1195 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
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
) {
1219 r
->out
.result
= _netr_LogonControl2(p
, r
);
1221 if (p
->rng_fault_state
) {
1223 /* Return true here, srv_pipe_hnd.c will take care */
1227 if (DEBUGLEVEL
>= 10) {
1228 NDR_PRINT_OUT_DEBUG(netr_LogonControl2
, r
);
1231 push
= ndr_push_init_ctx(r
, NULL
);
1237 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1243 blob
= ndr_push_blob(push
);
1244 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1261 struct netr_ServerAuthenticate2
*r
;
1263 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERAUTHENTICATE2
];
1265 r
= talloc(talloc_tos(), struct netr_ServerAuthenticate2
);
1270 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1275 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
1288 if (DEBUGLEVEL
>= 10) {
1289 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2
, r
);
1292 ZERO_STRUCT(r
->out
);
1293 r
->out
.negotiate_flags
= r
->in
.negotiate_flags
;
1294 r
->out
.return_credentials
= talloc_zero(r
, struct netr_Credential
);
1295 if (r
->out
.return_credentials
== NULL
) {
1300 r
->out
.result
= _netr_ServerAuthenticate2(p
, r
);
1302 if (p
->rng_fault_state
) {
1304 /* Return true here, srv_pipe_hnd.c will take care */
1308 if (DEBUGLEVEL
>= 10) {
1309 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2
, r
);
1312 push
= ndr_push_init_ctx(r
, NULL
);
1318 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1319 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1324 blob
= ndr_push_blob(push
);
1325 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1342 struct netr_DatabaseSync2
*r
;
1344 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DATABASESYNC2
];
1346 r
= talloc(talloc_tos(), struct netr_DatabaseSync2
);
1351 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1356 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
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
) {
1382 r
->out
.result
= _netr_DatabaseSync2(p
, r
);
1384 if (p
->rng_fault_state
) {
1386 /* Return true here, srv_pipe_hnd.c will take care */
1390 if (DEBUGLEVEL
>= 10) {
1391 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2
, r
);
1394 push
= ndr_push_init_ctx(r
, NULL
);
1400 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1401 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1406 blob
= ndr_push_blob(push
);
1407 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1424 struct netr_DatabaseRedo
*r
;
1426 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DATABASEREDO
];
1428 r
= talloc(talloc_tos(), struct netr_DatabaseRedo
);
1433 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1438 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
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
) {
1463 r
->out
.result
= _netr_DatabaseRedo(p
, r
);
1465 if (p
->rng_fault_state
) {
1467 /* Return true here, srv_pipe_hnd.c will take care */
1471 if (DEBUGLEVEL
>= 10) {
1472 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo
, r
);
1475 push
= ndr_push_init_ctx(r
, NULL
);
1481 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1482 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1487 blob
= ndr_push_blob(push
);
1488 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1505 struct netr_LogonControl2Ex
*r
;
1507 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONCONTROL2EX
];
1509 r
= talloc(talloc_tos(), struct netr_LogonControl2Ex
);
1514 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1519 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
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
) {
1543 r
->out
.result
= _netr_LogonControl2Ex(p
, r
);
1545 if (p
->rng_fault_state
) {
1547 /* Return true here, srv_pipe_hnd.c will take care */
1551 if (DEBUGLEVEL
>= 10) {
1552 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex
, r
);
1555 push
= ndr_push_init_ctx(r
, NULL
);
1561 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1562 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1567 blob
= ndr_push_blob(push
);
1568 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1585 struct netr_NetrEnumerateTrustedDomains
*r
;
1587 call
= &ndr_table_netlogon
.calls
[NDR_NETR_NETRENUMERATETRUSTEDDOMAINS
];
1589 r
= talloc(talloc_tos(), struct netr_NetrEnumerateTrustedDomains
);
1594 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1599 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
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
) {
1623 r
->out
.result
= _netr_NetrEnumerateTrustedDomains(p
, r
);
1625 if (p
->rng_fault_state
) {
1627 /* Return true here, srv_pipe_hnd.c will take care */
1631 if (DEBUGLEVEL
>= 10) {
1632 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains
, r
);
1635 push
= ndr_push_init_ctx(r
, NULL
);
1641 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1647 blob
= ndr_push_blob(push
);
1648 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
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
;
1665 struct netr_DsRGetDCName
*r
;
1667 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRGETDCNAME
];
1669 r
= talloc(talloc_tos(), struct netr_DsRGetDCName
);
1674 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1679 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
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
) {
1703 r
->out
.result
= _netr_DsRGetDCName(p
, r
);
1705 if (p
->rng_fault_state
) {
1707 /* Return true here, srv_pipe_hnd.c will take care */
1711 if (DEBUGLEVEL
>= 10) {
1712 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName
, r
);
1715 push
= ndr_push_init_ctx(r
, NULL
);
1721 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1722 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1727 blob
= ndr_push_blob(push
);
1728 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1738 static bool api_netr_LogonGetCapabilities(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
;
1745 struct netr_LogonGetCapabilities
*r
;
1747 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONGETCAPABILITIES
];
1749 r
= talloc(talloc_tos(), struct netr_LogonGetCapabilities
);
1754 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1759 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
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
)) {
1772 if (DEBUGLEVEL
>= 10) {
1773 NDR_PRINT_IN_DEBUG(netr_LogonGetCapabilities
, r
);
1776 ZERO_STRUCT(r
->out
);
1777 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
1778 r
->out
.capabilities
= talloc_zero(r
, union netr_Capabilities
);
1779 if (r
->out
.capabilities
== NULL
) {
1784 r
->out
.result
= _netr_LogonGetCapabilities(p
, r
);
1786 if (p
->rng_fault_state
) {
1788 /* Return true here, srv_pipe_hnd.c will take care */
1792 if (DEBUGLEVEL
>= 10) {
1793 NDR_PRINT_OUT_DEBUG(netr_LogonGetCapabilities
, r
);
1796 push
= ndr_push_init_ctx(r
, NULL
);
1802 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1803 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1808 blob
= ndr_push_blob(push
);
1809 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1819 static bool api_netr_NETRLOGONSETSERVICEBITS(pipes_struct
*p
)
1821 const struct ndr_interface_call
*call
;
1822 struct ndr_pull
*pull
;
1823 struct ndr_push
*push
;
1824 enum ndr_err_code ndr_err
;
1826 struct netr_NETRLOGONSETSERVICEBITS
*r
;
1828 call
= &ndr_table_netlogon
.calls
[NDR_NETR_NETRLOGONSETSERVICEBITS
];
1830 r
= talloc(talloc_tos(), struct netr_NETRLOGONSETSERVICEBITS
);
1835 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1840 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1846 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1847 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1848 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1853 if (DEBUGLEVEL
>= 10) {
1854 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS
, r
);
1857 r
->out
.result
= _netr_NETRLOGONSETSERVICEBITS(p
, r
);
1859 if (p
->rng_fault_state
) {
1861 /* Return true here, srv_pipe_hnd.c will take care */
1865 if (DEBUGLEVEL
>= 10) {
1866 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS
, r
);
1869 push
= ndr_push_init_ctx(r
, NULL
);
1875 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1876 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1881 blob
= ndr_push_blob(push
);
1882 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1892 static bool api_netr_LogonGetTrustRid(pipes_struct
*p
)
1894 const struct ndr_interface_call
*call
;
1895 struct ndr_pull
*pull
;
1896 struct ndr_push
*push
;
1897 enum ndr_err_code ndr_err
;
1899 struct netr_LogonGetTrustRid
*r
;
1901 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONGETTRUSTRID
];
1903 r
= talloc(talloc_tos(), struct netr_LogonGetTrustRid
);
1908 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1913 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1919 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1920 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1921 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1926 if (DEBUGLEVEL
>= 10) {
1927 NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid
, r
);
1930 ZERO_STRUCT(r
->out
);
1931 r
->out
.rid
= talloc_zero(r
, uint32_t);
1932 if (r
->out
.rid
== NULL
) {
1937 r
->out
.result
= _netr_LogonGetTrustRid(p
, r
);
1939 if (p
->rng_fault_state
) {
1941 /* Return true here, srv_pipe_hnd.c will take care */
1945 if (DEBUGLEVEL
>= 10) {
1946 NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid
, r
);
1949 push
= ndr_push_init_ctx(r
, NULL
);
1955 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1956 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1961 blob
= ndr_push_blob(push
);
1962 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1972 static bool api_netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct
*p
)
1974 const struct ndr_interface_call
*call
;
1975 struct ndr_pull
*pull
;
1976 struct ndr_push
*push
;
1977 enum ndr_err_code ndr_err
;
1979 struct netr_NETRLOGONCOMPUTESERVERDIGEST
*r
;
1981 call
= &ndr_table_netlogon
.calls
[NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST
];
1983 r
= talloc(talloc_tos(), struct netr_NETRLOGONCOMPUTESERVERDIGEST
);
1988 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1993 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1999 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2000 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2001 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2006 if (DEBUGLEVEL
>= 10) {
2007 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST
, r
);
2010 r
->out
.result
= _netr_NETRLOGONCOMPUTESERVERDIGEST(p
, r
);
2012 if (p
->rng_fault_state
) {
2014 /* Return true here, srv_pipe_hnd.c will take care */
2018 if (DEBUGLEVEL
>= 10) {
2019 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST
, r
);
2022 push
= ndr_push_init_ctx(r
, NULL
);
2028 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2029 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2034 blob
= ndr_push_blob(push
);
2035 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2045 static bool api_netr_NETRLOGONCOMPUTECLIENTDIGEST(pipes_struct
*p
)
2047 const struct ndr_interface_call
*call
;
2048 struct ndr_pull
*pull
;
2049 struct ndr_push
*push
;
2050 enum ndr_err_code ndr_err
;
2052 struct netr_NETRLOGONCOMPUTECLIENTDIGEST
*r
;
2054 call
= &ndr_table_netlogon
.calls
[NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST
];
2056 r
= talloc(talloc_tos(), struct netr_NETRLOGONCOMPUTECLIENTDIGEST
);
2061 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2066 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2072 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2073 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2074 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2079 if (DEBUGLEVEL
>= 10) {
2080 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST
, r
);
2083 r
->out
.result
= _netr_NETRLOGONCOMPUTECLIENTDIGEST(p
, r
);
2085 if (p
->rng_fault_state
) {
2087 /* Return true here, srv_pipe_hnd.c will take care */
2091 if (DEBUGLEVEL
>= 10) {
2092 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST
, r
);
2095 push
= ndr_push_init_ctx(r
, NULL
);
2101 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2102 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2107 blob
= ndr_push_blob(push
);
2108 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2118 static bool api_netr_ServerAuthenticate3(pipes_struct
*p
)
2120 const struct ndr_interface_call
*call
;
2121 struct ndr_pull
*pull
;
2122 struct ndr_push
*push
;
2123 enum ndr_err_code ndr_err
;
2125 struct netr_ServerAuthenticate3
*r
;
2127 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERAUTHENTICATE3
];
2129 r
= talloc(talloc_tos(), struct netr_ServerAuthenticate3
);
2134 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2139 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2145 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2146 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2152 if (DEBUGLEVEL
>= 10) {
2153 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3
, r
);
2156 ZERO_STRUCT(r
->out
);
2157 r
->out
.negotiate_flags
= r
->in
.negotiate_flags
;
2158 r
->out
.return_credentials
= talloc_zero(r
, struct netr_Credential
);
2159 if (r
->out
.return_credentials
== NULL
) {
2164 r
->out
.rid
= talloc_zero(r
, uint32_t);
2165 if (r
->out
.rid
== NULL
) {
2170 r
->out
.result
= _netr_ServerAuthenticate3(p
, r
);
2172 if (p
->rng_fault_state
) {
2174 /* Return true here, srv_pipe_hnd.c will take care */
2178 if (DEBUGLEVEL
>= 10) {
2179 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3
, r
);
2182 push
= ndr_push_init_ctx(r
, NULL
);
2188 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2189 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2194 blob
= ndr_push_blob(push
);
2195 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2205 static bool api_netr_DsRGetDCNameEx(pipes_struct
*p
)
2207 const struct ndr_interface_call
*call
;
2208 struct ndr_pull
*pull
;
2209 struct ndr_push
*push
;
2210 enum ndr_err_code ndr_err
;
2212 struct netr_DsRGetDCNameEx
*r
;
2214 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRGETDCNAMEEX
];
2216 r
= talloc(talloc_tos(), struct netr_DsRGetDCNameEx
);
2221 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2226 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2232 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2233 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2234 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2239 if (DEBUGLEVEL
>= 10) {
2240 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx
, r
);
2243 ZERO_STRUCT(r
->out
);
2244 r
->out
.info
= talloc_zero(r
, struct netr_DsRGetDCNameInfo
*);
2245 if (r
->out
.info
== NULL
) {
2250 r
->out
.result
= _netr_DsRGetDCNameEx(p
, r
);
2252 if (p
->rng_fault_state
) {
2254 /* Return true here, srv_pipe_hnd.c will take care */
2258 if (DEBUGLEVEL
>= 10) {
2259 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx
, r
);
2262 push
= ndr_push_init_ctx(r
, NULL
);
2268 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2269 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2274 blob
= ndr_push_blob(push
);
2275 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2285 static bool api_netr_DsRGetSiteName(pipes_struct
*p
)
2287 const struct ndr_interface_call
*call
;
2288 struct ndr_pull
*pull
;
2289 struct ndr_push
*push
;
2290 enum ndr_err_code ndr_err
;
2292 struct netr_DsRGetSiteName
*r
;
2294 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRGETSITENAME
];
2296 r
= talloc(talloc_tos(), struct netr_DsRGetSiteName
);
2301 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2306 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2312 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2313 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2314 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2319 if (DEBUGLEVEL
>= 10) {
2320 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName
, r
);
2323 ZERO_STRUCT(r
->out
);
2324 r
->out
.site
= talloc_zero(r
, const char *);
2325 if (r
->out
.site
== NULL
) {
2330 r
->out
.result
= _netr_DsRGetSiteName(p
, r
);
2332 if (p
->rng_fault_state
) {
2334 /* Return true here, srv_pipe_hnd.c will take care */
2338 if (DEBUGLEVEL
>= 10) {
2339 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName
, r
);
2342 push
= ndr_push_init_ctx(r
, NULL
);
2348 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2349 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2354 blob
= ndr_push_blob(push
);
2355 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2365 static bool api_netr_LogonGetDomainInfo(pipes_struct
*p
)
2367 const struct ndr_interface_call
*call
;
2368 struct ndr_pull
*pull
;
2369 struct ndr_push
*push
;
2370 enum ndr_err_code ndr_err
;
2372 struct netr_LogonGetDomainInfo
*r
;
2374 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONGETDOMAININFO
];
2376 r
= talloc(talloc_tos(), struct netr_LogonGetDomainInfo
);
2381 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2386 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2392 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2393 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2394 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2399 if (DEBUGLEVEL
>= 10) {
2400 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo
, r
);
2403 ZERO_STRUCT(r
->out
);
2404 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
2405 r
->out
.info
= talloc_zero(r
, union netr_DomainInfo
);
2406 if (r
->out
.info
== NULL
) {
2411 r
->out
.result
= _netr_LogonGetDomainInfo(p
, r
);
2413 if (p
->rng_fault_state
) {
2415 /* Return true here, srv_pipe_hnd.c will take care */
2419 if (DEBUGLEVEL
>= 10) {
2420 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo
, r
);
2423 push
= ndr_push_init_ctx(r
, NULL
);
2429 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2430 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2435 blob
= ndr_push_blob(push
);
2436 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2446 static bool api_netr_ServerPasswordSet2(pipes_struct
*p
)
2448 const struct ndr_interface_call
*call
;
2449 struct ndr_pull
*pull
;
2450 struct ndr_push
*push
;
2451 enum ndr_err_code ndr_err
;
2453 struct netr_ServerPasswordSet2
*r
;
2455 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERPASSWORDSET2
];
2457 r
= talloc(talloc_tos(), struct netr_ServerPasswordSet2
);
2462 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2467 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2473 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2474 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2475 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2480 if (DEBUGLEVEL
>= 10) {
2481 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2
, r
);
2484 ZERO_STRUCT(r
->out
);
2485 r
->out
.return_authenticator
= talloc_zero(r
, struct netr_Authenticator
);
2486 if (r
->out
.return_authenticator
== NULL
) {
2491 r
->out
.result
= _netr_ServerPasswordSet2(p
, r
);
2493 if (p
->rng_fault_state
) {
2495 /* Return true here, srv_pipe_hnd.c will take care */
2499 if (DEBUGLEVEL
>= 10) {
2500 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2
, r
);
2503 push
= ndr_push_init_ctx(r
, NULL
);
2509 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2510 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2515 blob
= ndr_push_blob(push
);
2516 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2526 static bool api_netr_ServerPasswordGet(pipes_struct
*p
)
2528 const struct ndr_interface_call
*call
;
2529 struct ndr_pull
*pull
;
2530 struct ndr_push
*push
;
2531 enum ndr_err_code ndr_err
;
2533 struct netr_ServerPasswordGet
*r
;
2535 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERPASSWORDGET
];
2537 r
= talloc(talloc_tos(), struct netr_ServerPasswordGet
);
2542 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2547 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2553 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2554 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2555 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2560 if (DEBUGLEVEL
>= 10) {
2561 NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet
, r
);
2564 ZERO_STRUCT(r
->out
);
2565 r
->out
.return_authenticator
= talloc_zero(r
, struct netr_Authenticator
);
2566 if (r
->out
.return_authenticator
== NULL
) {
2571 r
->out
.password
= talloc_zero(r
, struct samr_Password
);
2572 if (r
->out
.password
== NULL
) {
2577 r
->out
.result
= _netr_ServerPasswordGet(p
, r
);
2579 if (p
->rng_fault_state
) {
2581 /* Return true here, srv_pipe_hnd.c will take care */
2585 if (DEBUGLEVEL
>= 10) {
2586 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet
, r
);
2589 push
= ndr_push_init_ctx(r
, NULL
);
2595 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2596 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2601 blob
= ndr_push_blob(push
);
2602 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2612 static bool api_netr_NETRLOGONSENDTOSAM(pipes_struct
*p
)
2614 const struct ndr_interface_call
*call
;
2615 struct ndr_pull
*pull
;
2616 struct ndr_push
*push
;
2617 enum ndr_err_code ndr_err
;
2619 struct netr_NETRLOGONSENDTOSAM
*r
;
2621 call
= &ndr_table_netlogon
.calls
[NDR_NETR_NETRLOGONSENDTOSAM
];
2623 r
= talloc(talloc_tos(), struct netr_NETRLOGONSENDTOSAM
);
2628 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2633 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2639 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2640 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2641 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2646 if (DEBUGLEVEL
>= 10) {
2647 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM
, r
);
2650 r
->out
.result
= _netr_NETRLOGONSENDTOSAM(p
, r
);
2652 if (p
->rng_fault_state
) {
2654 /* Return true here, srv_pipe_hnd.c will take care */
2658 if (DEBUGLEVEL
>= 10) {
2659 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM
, r
);
2662 push
= ndr_push_init_ctx(r
, NULL
);
2668 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2669 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2674 blob
= ndr_push_blob(push
);
2675 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2685 static bool api_netr_DsRAddressToSitenamesW(pipes_struct
*p
)
2687 const struct ndr_interface_call
*call
;
2688 struct ndr_pull
*pull
;
2689 struct ndr_push
*push
;
2690 enum ndr_err_code ndr_err
;
2692 struct netr_DsRAddressToSitenamesW
*r
;
2694 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRADDRESSTOSITENAMESW
];
2696 r
= talloc(talloc_tos(), struct netr_DsRAddressToSitenamesW
);
2701 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2706 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2712 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2713 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2714 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2719 if (DEBUGLEVEL
>= 10) {
2720 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW
, r
);
2723 ZERO_STRUCT(r
->out
);
2724 r
->out
.ctr
= talloc_zero(r
, struct netr_DsRAddressToSitenamesWCtr
*);
2725 if (r
->out
.ctr
== NULL
) {
2730 r
->out
.result
= _netr_DsRAddressToSitenamesW(p
, r
);
2732 if (p
->rng_fault_state
) {
2734 /* Return true here, srv_pipe_hnd.c will take care */
2738 if (DEBUGLEVEL
>= 10) {
2739 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW
, r
);
2742 push
= ndr_push_init_ctx(r
, NULL
);
2748 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2749 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2754 blob
= ndr_push_blob(push
);
2755 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2765 static bool api_netr_DsRGetDCNameEx2(pipes_struct
*p
)
2767 const struct ndr_interface_call
*call
;
2768 struct ndr_pull
*pull
;
2769 struct ndr_push
*push
;
2770 enum ndr_err_code ndr_err
;
2772 struct netr_DsRGetDCNameEx2
*r
;
2774 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRGETDCNAMEEX2
];
2776 r
= talloc(talloc_tos(), struct netr_DsRGetDCNameEx2
);
2781 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2786 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2792 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2793 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2794 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2799 if (DEBUGLEVEL
>= 10) {
2800 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2
, r
);
2803 ZERO_STRUCT(r
->out
);
2804 r
->out
.info
= talloc_zero(r
, struct netr_DsRGetDCNameInfo
*);
2805 if (r
->out
.info
== NULL
) {
2810 r
->out
.result
= _netr_DsRGetDCNameEx2(p
, r
);
2812 if (p
->rng_fault_state
) {
2814 /* Return true here, srv_pipe_hnd.c will take care */
2818 if (DEBUGLEVEL
>= 10) {
2819 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2
, r
);
2822 push
= ndr_push_init_ctx(r
, NULL
);
2828 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2829 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2834 blob
= ndr_push_blob(push
);
2835 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2845 static bool api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(pipes_struct
*p
)
2847 const struct ndr_interface_call
*call
;
2848 struct ndr_pull
*pull
;
2849 struct ndr_push
*push
;
2850 enum ndr_err_code ndr_err
;
2852 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
*r
;
2854 call
= &ndr_table_netlogon
.calls
[NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN
];
2856 r
= talloc(talloc_tos(), struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
);
2861 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2866 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2872 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2873 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2874 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2879 if (DEBUGLEVEL
>= 10) {
2880 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, r
);
2883 r
->out
.result
= _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(p
, r
);
2885 if (p
->rng_fault_state
) {
2887 /* Return true here, srv_pipe_hnd.c will take care */
2891 if (DEBUGLEVEL
>= 10) {
2892 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, r
);
2895 push
= ndr_push_init_ctx(r
, NULL
);
2901 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2902 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2907 blob
= ndr_push_blob(push
);
2908 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2918 static bool api_netr_NetrEnumerateTrustedDomainsEx(pipes_struct
*p
)
2920 const struct ndr_interface_call
*call
;
2921 struct ndr_pull
*pull
;
2922 struct ndr_push
*push
;
2923 enum ndr_err_code ndr_err
;
2925 struct netr_NetrEnumerateTrustedDomainsEx
*r
;
2927 call
= &ndr_table_netlogon
.calls
[NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX
];
2929 r
= talloc(talloc_tos(), struct netr_NetrEnumerateTrustedDomainsEx
);
2934 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2939 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2945 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2946 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2947 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2952 if (DEBUGLEVEL
>= 10) {
2953 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx
, r
);
2956 ZERO_STRUCT(r
->out
);
2957 r
->out
.dom_trust_list
= talloc_zero(r
, struct netr_DomainTrustList
);
2958 if (r
->out
.dom_trust_list
== NULL
) {
2963 r
->out
.result
= _netr_NetrEnumerateTrustedDomainsEx(p
, r
);
2965 if (p
->rng_fault_state
) {
2967 /* Return true here, srv_pipe_hnd.c will take care */
2971 if (DEBUGLEVEL
>= 10) {
2972 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx
, r
);
2975 push
= ndr_push_init_ctx(r
, NULL
);
2981 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2982 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2987 blob
= ndr_push_blob(push
);
2988 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2998 static bool api_netr_DsRAddressToSitenamesExW(pipes_struct
*p
)
3000 const struct ndr_interface_call
*call
;
3001 struct ndr_pull
*pull
;
3002 struct ndr_push
*push
;
3003 enum ndr_err_code ndr_err
;
3005 struct netr_DsRAddressToSitenamesExW
*r
;
3007 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRADDRESSTOSITENAMESEXW
];
3009 r
= talloc(talloc_tos(), struct netr_DsRAddressToSitenamesExW
);
3014 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3019 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3025 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3026 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3027 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3032 if (DEBUGLEVEL
>= 10) {
3033 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW
, r
);
3036 ZERO_STRUCT(r
->out
);
3037 r
->out
.ctr
= talloc_zero(r
, struct netr_DsRAddressToSitenamesExWCtr
*);
3038 if (r
->out
.ctr
== NULL
) {
3043 r
->out
.result
= _netr_DsRAddressToSitenamesExW(p
, r
);
3045 if (p
->rng_fault_state
) {
3047 /* Return true here, srv_pipe_hnd.c will take care */
3051 if (DEBUGLEVEL
>= 10) {
3052 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW
, r
);
3055 push
= ndr_push_init_ctx(r
, NULL
);
3061 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3062 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3067 blob
= ndr_push_blob(push
);
3068 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3078 static bool api_netr_DsrGetDcSiteCoverageW(pipes_struct
*p
)
3080 const struct ndr_interface_call
*call
;
3081 struct ndr_pull
*pull
;
3082 struct ndr_push
*push
;
3083 enum ndr_err_code ndr_err
;
3085 struct netr_DsrGetDcSiteCoverageW
*r
;
3087 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRGETDCSITECOVERAGEW
];
3089 r
= talloc(talloc_tos(), struct netr_DsrGetDcSiteCoverageW
);
3094 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3099 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3105 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3106 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3107 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3112 if (DEBUGLEVEL
>= 10) {
3113 NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW
, r
);
3116 ZERO_STRUCT(r
->out
);
3117 r
->out
.ctr
= talloc_zero(r
, struct DcSitesCtr
*);
3118 if (r
->out
.ctr
== NULL
) {
3123 r
->out
.result
= _netr_DsrGetDcSiteCoverageW(p
, r
);
3125 if (p
->rng_fault_state
) {
3127 /* Return true here, srv_pipe_hnd.c will take care */
3131 if (DEBUGLEVEL
>= 10) {
3132 NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW
, r
);
3135 push
= ndr_push_init_ctx(r
, NULL
);
3141 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3142 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3147 blob
= ndr_push_blob(push
);
3148 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3158 static bool api_netr_LogonSamLogonEx(pipes_struct
*p
)
3160 const struct ndr_interface_call
*call
;
3161 struct ndr_pull
*pull
;
3162 struct ndr_push
*push
;
3163 enum ndr_err_code ndr_err
;
3165 struct netr_LogonSamLogonEx
*r
;
3167 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONSAMLOGONEX
];
3169 r
= talloc(talloc_tos(), struct netr_LogonSamLogonEx
);
3174 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3179 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3185 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3186 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3187 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3192 if (DEBUGLEVEL
>= 10) {
3193 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx
, r
);
3196 ZERO_STRUCT(r
->out
);
3197 r
->out
.flags
= r
->in
.flags
;
3198 r
->out
.validation
= talloc_zero(r
, union netr_Validation
);
3199 if (r
->out
.validation
== NULL
) {
3204 r
->out
.authoritative
= talloc_zero(r
, uint8_t);
3205 if (r
->out
.authoritative
== NULL
) {
3210 r
->out
.result
= _netr_LogonSamLogonEx(p
, r
);
3212 if (p
->rng_fault_state
) {
3214 /* Return true here, srv_pipe_hnd.c will take care */
3218 if (DEBUGLEVEL
>= 10) {
3219 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx
, r
);
3222 push
= ndr_push_init_ctx(r
, NULL
);
3228 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3229 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3234 blob
= ndr_push_blob(push
);
3235 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3245 static bool api_netr_DsrEnumerateDomainTrusts(pipes_struct
*p
)
3247 const struct ndr_interface_call
*call
;
3248 struct ndr_pull
*pull
;
3249 struct ndr_push
*push
;
3250 enum ndr_err_code ndr_err
;
3252 struct netr_DsrEnumerateDomainTrusts
*r
;
3254 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRENUMERATEDOMAINTRUSTS
];
3256 r
= talloc(talloc_tos(), struct netr_DsrEnumerateDomainTrusts
);
3261 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3266 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3272 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3273 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3274 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3279 if (DEBUGLEVEL
>= 10) {
3280 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts
, r
);
3283 ZERO_STRUCT(r
->out
);
3284 r
->out
.trusts
= talloc_zero(r
, struct netr_DomainTrustList
);
3285 if (r
->out
.trusts
== NULL
) {
3290 r
->out
.result
= _netr_DsrEnumerateDomainTrusts(p
, r
);
3292 if (p
->rng_fault_state
) {
3294 /* Return true here, srv_pipe_hnd.c will take care */
3298 if (DEBUGLEVEL
>= 10) {
3299 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts
, r
);
3302 push
= ndr_push_init_ctx(r
, NULL
);
3308 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3309 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3314 blob
= ndr_push_blob(push
);
3315 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3325 static bool api_netr_DsrDeregisterDNSHostRecords(pipes_struct
*p
)
3327 const struct ndr_interface_call
*call
;
3328 struct ndr_pull
*pull
;
3329 struct ndr_push
*push
;
3330 enum ndr_err_code ndr_err
;
3332 struct netr_DsrDeregisterDNSHostRecords
*r
;
3334 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS
];
3336 r
= talloc(talloc_tos(), struct netr_DsrDeregisterDNSHostRecords
);
3341 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3346 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3352 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3353 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3354 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3359 if (DEBUGLEVEL
>= 10) {
3360 NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords
, r
);
3363 r
->out
.result
= _netr_DsrDeregisterDNSHostRecords(p
, r
);
3365 if (p
->rng_fault_state
) {
3367 /* Return true here, srv_pipe_hnd.c will take care */
3371 if (DEBUGLEVEL
>= 10) {
3372 NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords
, r
);
3375 push
= ndr_push_init_ctx(r
, NULL
);
3381 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3382 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3387 blob
= ndr_push_blob(push
);
3388 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3398 static bool api_netr_ServerTrustPasswordsGet(pipes_struct
*p
)
3400 const struct ndr_interface_call
*call
;
3401 struct ndr_pull
*pull
;
3402 struct ndr_push
*push
;
3403 enum ndr_err_code ndr_err
;
3405 struct netr_ServerTrustPasswordsGet
*r
;
3407 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERTRUSTPASSWORDSGET
];
3409 r
= talloc(talloc_tos(), struct netr_ServerTrustPasswordsGet
);
3414 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3419 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3425 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3426 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3427 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3432 if (DEBUGLEVEL
>= 10) {
3433 NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet
, r
);
3436 ZERO_STRUCT(r
->out
);
3437 r
->out
.return_authenticator
= talloc_zero(r
, struct netr_Authenticator
);
3438 if (r
->out
.return_authenticator
== NULL
) {
3443 r
->out
.password
= talloc_zero(r
, struct samr_Password
);
3444 if (r
->out
.password
== NULL
) {
3449 r
->out
.password2
= talloc_zero(r
, struct samr_Password
);
3450 if (r
->out
.password2
== NULL
) {
3455 r
->out
.result
= _netr_ServerTrustPasswordsGet(p
, r
);
3457 if (p
->rng_fault_state
) {
3459 /* Return true here, srv_pipe_hnd.c will take care */
3463 if (DEBUGLEVEL
>= 10) {
3464 NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet
, r
);
3467 push
= ndr_push_init_ctx(r
, NULL
);
3473 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3474 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3479 blob
= ndr_push_blob(push
);
3480 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3490 static bool api_netr_DsRGetForestTrustInformation(pipes_struct
*p
)
3492 const struct ndr_interface_call
*call
;
3493 struct ndr_pull
*pull
;
3494 struct ndr_push
*push
;
3495 enum ndr_err_code ndr_err
;
3497 struct netr_DsRGetForestTrustInformation
*r
;
3499 call
= &ndr_table_netlogon
.calls
[NDR_NETR_DSRGETFORESTTRUSTINFORMATION
];
3501 r
= talloc(talloc_tos(), struct netr_DsRGetForestTrustInformation
);
3506 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3511 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3517 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3518 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3519 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3524 if (DEBUGLEVEL
>= 10) {
3525 NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation
, r
);
3528 ZERO_STRUCT(r
->out
);
3529 r
->out
.forest_trust_info
= talloc_zero(r
, struct lsa_ForestTrustInformation
*);
3530 if (r
->out
.forest_trust_info
== NULL
) {
3535 r
->out
.result
= _netr_DsRGetForestTrustInformation(p
, r
);
3537 if (p
->rng_fault_state
) {
3539 /* Return true here, srv_pipe_hnd.c will take care */
3543 if (DEBUGLEVEL
>= 10) {
3544 NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation
, r
);
3547 push
= ndr_push_init_ctx(r
, NULL
);
3553 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3554 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3559 blob
= ndr_push_blob(push
);
3560 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3570 static bool api_netr_GetForestTrustInformation(pipes_struct
*p
)
3572 const struct ndr_interface_call
*call
;
3573 struct ndr_pull
*pull
;
3574 struct ndr_push
*push
;
3575 enum ndr_err_code ndr_err
;
3577 struct netr_GetForestTrustInformation
*r
;
3579 call
= &ndr_table_netlogon
.calls
[NDR_NETR_GETFORESTTRUSTINFORMATION
];
3581 r
= talloc(talloc_tos(), struct netr_GetForestTrustInformation
);
3586 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3591 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3597 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3598 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3599 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3604 if (DEBUGLEVEL
>= 10) {
3605 NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation
, r
);
3608 ZERO_STRUCT(r
->out
);
3609 r
->out
.return_authenticator
= talloc_zero(r
, struct netr_Authenticator
);
3610 if (r
->out
.return_authenticator
== NULL
) {
3615 r
->out
.forest_trust_info
= talloc_zero(r
, struct lsa_ForestTrustInformation
*);
3616 if (r
->out
.forest_trust_info
== NULL
) {
3621 r
->out
.result
= _netr_GetForestTrustInformation(p
, r
);
3623 if (p
->rng_fault_state
) {
3625 /* Return true here, srv_pipe_hnd.c will take care */
3629 if (DEBUGLEVEL
>= 10) {
3630 NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation
, r
);
3633 push
= ndr_push_init_ctx(r
, NULL
);
3639 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3640 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3645 blob
= ndr_push_blob(push
);
3646 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3656 static bool api_netr_LogonSamLogonWithFlags(pipes_struct
*p
)
3658 const struct ndr_interface_call
*call
;
3659 struct ndr_pull
*pull
;
3660 struct ndr_push
*push
;
3661 enum ndr_err_code ndr_err
;
3663 struct netr_LogonSamLogonWithFlags
*r
;
3665 call
= &ndr_table_netlogon
.calls
[NDR_NETR_LOGONSAMLOGONWITHFLAGS
];
3667 r
= talloc(talloc_tos(), struct netr_LogonSamLogonWithFlags
);
3672 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3677 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3683 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3684 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3685 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3690 if (DEBUGLEVEL
>= 10) {
3691 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags
, r
);
3694 ZERO_STRUCT(r
->out
);
3695 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
3696 r
->out
.flags
= r
->in
.flags
;
3697 r
->out
.validation
= talloc_zero(r
, union netr_Validation
);
3698 if (r
->out
.validation
== NULL
) {
3703 r
->out
.authoritative
= talloc_zero(r
, uint8_t);
3704 if (r
->out
.authoritative
== NULL
) {
3709 r
->out
.result
= _netr_LogonSamLogonWithFlags(p
, r
);
3711 if (p
->rng_fault_state
) {
3713 /* Return true here, srv_pipe_hnd.c will take care */
3717 if (DEBUGLEVEL
>= 10) {
3718 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags
, r
);
3721 push
= ndr_push_init_ctx(r
, NULL
);
3727 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3728 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3733 blob
= ndr_push_blob(push
);
3734 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3744 static bool api_netr_ServerGetTrustInfo(pipes_struct
*p
)
3746 const struct ndr_interface_call
*call
;
3747 struct ndr_pull
*pull
;
3748 struct ndr_push
*push
;
3749 enum ndr_err_code ndr_err
;
3751 struct netr_ServerGetTrustInfo
*r
;
3753 call
= &ndr_table_netlogon
.calls
[NDR_NETR_SERVERGETTRUSTINFO
];
3755 r
= talloc(talloc_tos(), struct netr_ServerGetTrustInfo
);
3760 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3765 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3771 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3772 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3773 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3778 if (DEBUGLEVEL
>= 10) {
3779 NDR_PRINT_IN_DEBUG(netr_ServerGetTrustInfo
, r
);
3782 ZERO_STRUCT(r
->out
);
3783 r
->out
.return_authenticator
= talloc_zero(r
, struct netr_Authenticator
);
3784 if (r
->out
.return_authenticator
== NULL
) {
3789 r
->out
.new_owf_password
= talloc_zero(r
, struct samr_Password
);
3790 if (r
->out
.new_owf_password
== NULL
) {
3795 r
->out
.old_owf_password
= talloc_zero(r
, struct samr_Password
);
3796 if (r
->out
.old_owf_password
== NULL
) {
3801 r
->out
.trust_info
= talloc_zero(r
, struct netr_TrustInfo
*);
3802 if (r
->out
.trust_info
== NULL
) {
3807 r
->out
.result
= _netr_ServerGetTrustInfo(p
, r
);
3809 if (p
->rng_fault_state
) {
3811 /* Return true here, srv_pipe_hnd.c will take care */
3815 if (DEBUGLEVEL
>= 10) {
3816 NDR_PRINT_OUT_DEBUG(netr_ServerGetTrustInfo
, r
);
3819 push
= ndr_push_init_ctx(r
, NULL
);
3825 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3826 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3831 blob
= ndr_push_blob(push
);
3832 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3844 static struct api_struct api_netlogon_cmds
[] =
3846 {"NETR_LOGONUASLOGON", NDR_NETR_LOGONUASLOGON
, api_netr_LogonUasLogon
},
3847 {"NETR_LOGONUASLOGOFF", NDR_NETR_LOGONUASLOGOFF
, api_netr_LogonUasLogoff
},
3848 {"NETR_LOGONSAMLOGON", NDR_NETR_LOGONSAMLOGON
, api_netr_LogonSamLogon
},
3849 {"NETR_LOGONSAMLOGOFF", NDR_NETR_LOGONSAMLOGOFF
, api_netr_LogonSamLogoff
},
3850 {"NETR_SERVERREQCHALLENGE", NDR_NETR_SERVERREQCHALLENGE
, api_netr_ServerReqChallenge
},
3851 {"NETR_SERVERAUTHENTICATE", NDR_NETR_SERVERAUTHENTICATE
, api_netr_ServerAuthenticate
},
3852 {"NETR_SERVERPASSWORDSET", NDR_NETR_SERVERPASSWORDSET
, api_netr_ServerPasswordSet
},
3853 {"NETR_DATABASEDELTAS", NDR_NETR_DATABASEDELTAS
, api_netr_DatabaseDeltas
},
3854 {"NETR_DATABASESYNC", NDR_NETR_DATABASESYNC
, api_netr_DatabaseSync
},
3855 {"NETR_ACCOUNTDELTAS", NDR_NETR_ACCOUNTDELTAS
, api_netr_AccountDeltas
},
3856 {"NETR_ACCOUNTSYNC", NDR_NETR_ACCOUNTSYNC
, api_netr_AccountSync
},
3857 {"NETR_GETDCNAME", NDR_NETR_GETDCNAME
, api_netr_GetDcName
},
3858 {"NETR_LOGONCONTROL", NDR_NETR_LOGONCONTROL
, api_netr_LogonControl
},
3859 {"NETR_GETANYDCNAME", NDR_NETR_GETANYDCNAME
, api_netr_GetAnyDCName
},
3860 {"NETR_LOGONCONTROL2", NDR_NETR_LOGONCONTROL2
, api_netr_LogonControl2
},
3861 {"NETR_SERVERAUTHENTICATE2", NDR_NETR_SERVERAUTHENTICATE2
, api_netr_ServerAuthenticate2
},
3862 {"NETR_DATABASESYNC2", NDR_NETR_DATABASESYNC2
, api_netr_DatabaseSync2
},
3863 {"NETR_DATABASEREDO", NDR_NETR_DATABASEREDO
, api_netr_DatabaseRedo
},
3864 {"NETR_LOGONCONTROL2EX", NDR_NETR_LOGONCONTROL2EX
, api_netr_LogonControl2Ex
},
3865 {"NETR_NETRENUMERATETRUSTEDDOMAINS", NDR_NETR_NETRENUMERATETRUSTEDDOMAINS
, api_netr_NetrEnumerateTrustedDomains
},
3866 {"NETR_DSRGETDCNAME", NDR_NETR_DSRGETDCNAME
, api_netr_DsRGetDCName
},
3867 {"NETR_LOGONGETCAPABILITIES", NDR_NETR_LOGONGETCAPABILITIES
, api_netr_LogonGetCapabilities
},
3868 {"NETR_NETRLOGONSETSERVICEBITS", NDR_NETR_NETRLOGONSETSERVICEBITS
, api_netr_NETRLOGONSETSERVICEBITS
},
3869 {"NETR_LOGONGETTRUSTRID", NDR_NETR_LOGONGETTRUSTRID
, api_netr_LogonGetTrustRid
},
3870 {"NETR_NETRLOGONCOMPUTESERVERDIGEST", NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST
, api_netr_NETRLOGONCOMPUTESERVERDIGEST
},
3871 {"NETR_NETRLOGONCOMPUTECLIENTDIGEST", NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST
, api_netr_NETRLOGONCOMPUTECLIENTDIGEST
},
3872 {"NETR_SERVERAUTHENTICATE3", NDR_NETR_SERVERAUTHENTICATE3
, api_netr_ServerAuthenticate3
},
3873 {"NETR_DSRGETDCNAMEEX", NDR_NETR_DSRGETDCNAMEEX
, api_netr_DsRGetDCNameEx
},
3874 {"NETR_DSRGETSITENAME", NDR_NETR_DSRGETSITENAME
, api_netr_DsRGetSiteName
},
3875 {"NETR_LOGONGETDOMAININFO", NDR_NETR_LOGONGETDOMAININFO
, api_netr_LogonGetDomainInfo
},
3876 {"NETR_SERVERPASSWORDSET2", NDR_NETR_SERVERPASSWORDSET2
, api_netr_ServerPasswordSet2
},
3877 {"NETR_SERVERPASSWORDGET", NDR_NETR_SERVERPASSWORDGET
, api_netr_ServerPasswordGet
},
3878 {"NETR_NETRLOGONSENDTOSAM", NDR_NETR_NETRLOGONSENDTOSAM
, api_netr_NETRLOGONSENDTOSAM
},
3879 {"NETR_DSRADDRESSTOSITENAMESW", NDR_NETR_DSRADDRESSTOSITENAMESW
, api_netr_DsRAddressToSitenamesW
},
3880 {"NETR_DSRGETDCNAMEEX2", NDR_NETR_DSRGETDCNAMEEX2
, api_netr_DsRGetDCNameEx2
},
3881 {"NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN", NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, api_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
},
3882 {"NETR_NETRENUMERATETRUSTEDDOMAINSEX", NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX
, api_netr_NetrEnumerateTrustedDomainsEx
},
3883 {"NETR_DSRADDRESSTOSITENAMESEXW", NDR_NETR_DSRADDRESSTOSITENAMESEXW
, api_netr_DsRAddressToSitenamesExW
},
3884 {"NETR_DSRGETDCSITECOVERAGEW", NDR_NETR_DSRGETDCSITECOVERAGEW
, api_netr_DsrGetDcSiteCoverageW
},
3885 {"NETR_LOGONSAMLOGONEX", NDR_NETR_LOGONSAMLOGONEX
, api_netr_LogonSamLogonEx
},
3886 {"NETR_DSRENUMERATEDOMAINTRUSTS", NDR_NETR_DSRENUMERATEDOMAINTRUSTS
, api_netr_DsrEnumerateDomainTrusts
},
3887 {"NETR_DSRDEREGISTERDNSHOSTRECORDS", NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS
, api_netr_DsrDeregisterDNSHostRecords
},
3888 {"NETR_SERVERTRUSTPASSWORDSGET", NDR_NETR_SERVERTRUSTPASSWORDSGET
, api_netr_ServerTrustPasswordsGet
},
3889 {"NETR_DSRGETFORESTTRUSTINFORMATION", NDR_NETR_DSRGETFORESTTRUSTINFORMATION
, api_netr_DsRGetForestTrustInformation
},
3890 {"NETR_GETFORESTTRUSTINFORMATION", NDR_NETR_GETFORESTTRUSTINFORMATION
, api_netr_GetForestTrustInformation
},
3891 {"NETR_LOGONSAMLOGONWITHFLAGS", NDR_NETR_LOGONSAMLOGONWITHFLAGS
, api_netr_LogonSamLogonWithFlags
},
3892 {"NETR_SERVERGETTRUSTINFO", NDR_NETR_SERVERGETTRUSTINFO
, api_netr_ServerGetTrustInfo
},
3895 void netlogon_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
3897 *fns
= api_netlogon_cmds
;
3898 *n_fns
= sizeof(api_netlogon_cmds
) / sizeof(struct api_struct
);
3901 NTSTATUS
rpc_netlogon_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
3903 if (cli
->pipes_struct
== NULL
) {
3904 return NT_STATUS_INVALID_PARAMETER
;
3909 case NDR_NETR_LOGONUASLOGON
: {
3910 struct netr_LogonUasLogon
*r
= (struct netr_LogonUasLogon
*)_r
;
3911 ZERO_STRUCT(r
->out
);
3912 r
->out
.info
= talloc_zero(mem_ctx
, struct netr_UasInfo
*);
3913 if (r
->out
.info
== NULL
) {
3914 return NT_STATUS_NO_MEMORY
;
3917 r
->out
.result
= _netr_LogonUasLogon(cli
->pipes_struct
, r
);
3918 return NT_STATUS_OK
;
3921 case NDR_NETR_LOGONUASLOGOFF
: {
3922 struct netr_LogonUasLogoff
*r
= (struct netr_LogonUasLogoff
*)_r
;
3923 ZERO_STRUCT(r
->out
);
3924 r
->out
.info
= talloc_zero(mem_ctx
, struct netr_UasLogoffInfo
);
3925 if (r
->out
.info
== NULL
) {
3926 return NT_STATUS_NO_MEMORY
;
3929 r
->out
.result
= _netr_LogonUasLogoff(cli
->pipes_struct
, r
);
3930 return NT_STATUS_OK
;
3933 case NDR_NETR_LOGONSAMLOGON
: {
3934 struct netr_LogonSamLogon
*r
= (struct netr_LogonSamLogon
*)_r
;
3935 ZERO_STRUCT(r
->out
);
3936 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
3937 r
->out
.validation
= talloc_zero(mem_ctx
, union netr_Validation
);
3938 if (r
->out
.validation
== NULL
) {
3939 return NT_STATUS_NO_MEMORY
;
3942 r
->out
.authoritative
= talloc_zero(mem_ctx
, uint8_t);
3943 if (r
->out
.authoritative
== NULL
) {
3944 return NT_STATUS_NO_MEMORY
;
3947 r
->out
.result
= _netr_LogonSamLogon(cli
->pipes_struct
, r
);
3948 return NT_STATUS_OK
;
3951 case NDR_NETR_LOGONSAMLOGOFF
: {
3952 struct netr_LogonSamLogoff
*r
= (struct netr_LogonSamLogoff
*)_r
;
3953 ZERO_STRUCT(r
->out
);
3954 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
3955 r
->out
.result
= _netr_LogonSamLogoff(cli
->pipes_struct
, r
);
3956 return NT_STATUS_OK
;
3959 case NDR_NETR_SERVERREQCHALLENGE
: {
3960 struct netr_ServerReqChallenge
*r
= (struct netr_ServerReqChallenge
*)_r
;
3961 ZERO_STRUCT(r
->out
);
3962 r
->out
.return_credentials
= talloc_zero(mem_ctx
, struct netr_Credential
);
3963 if (r
->out
.return_credentials
== NULL
) {
3964 return NT_STATUS_NO_MEMORY
;
3967 r
->out
.result
= _netr_ServerReqChallenge(cli
->pipes_struct
, r
);
3968 return NT_STATUS_OK
;
3971 case NDR_NETR_SERVERAUTHENTICATE
: {
3972 struct netr_ServerAuthenticate
*r
= (struct netr_ServerAuthenticate
*)_r
;
3973 ZERO_STRUCT(r
->out
);
3974 r
->out
.return_credentials
= talloc_zero(mem_ctx
, struct netr_Credential
);
3975 if (r
->out
.return_credentials
== NULL
) {
3976 return NT_STATUS_NO_MEMORY
;
3979 r
->out
.result
= _netr_ServerAuthenticate(cli
->pipes_struct
, r
);
3980 return NT_STATUS_OK
;
3983 case NDR_NETR_SERVERPASSWORDSET
: {
3984 struct netr_ServerPasswordSet
*r
= (struct netr_ServerPasswordSet
*)_r
;
3985 ZERO_STRUCT(r
->out
);
3986 r
->out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
3987 if (r
->out
.return_authenticator
== NULL
) {
3988 return NT_STATUS_NO_MEMORY
;
3991 r
->out
.result
= _netr_ServerPasswordSet(cli
->pipes_struct
, r
);
3992 return NT_STATUS_OK
;
3995 case NDR_NETR_DATABASEDELTAS
: {
3996 struct netr_DatabaseDeltas
*r
= (struct netr_DatabaseDeltas
*)_r
;
3997 ZERO_STRUCT(r
->out
);
3998 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
3999 r
->out
.sequence_num
= r
->in
.sequence_num
;
4000 r
->out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
*);
4001 if (r
->out
.delta_enum_array
== NULL
) {
4002 return NT_STATUS_NO_MEMORY
;
4005 r
->out
.result
= _netr_DatabaseDeltas(cli
->pipes_struct
, r
);
4006 return NT_STATUS_OK
;
4009 case NDR_NETR_DATABASESYNC
: {
4010 struct netr_DatabaseSync
*r
= (struct netr_DatabaseSync
*)_r
;
4011 ZERO_STRUCT(r
->out
);
4012 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4013 r
->out
.sync_context
= r
->in
.sync_context
;
4014 r
->out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
*);
4015 if (r
->out
.delta_enum_array
== NULL
) {
4016 return NT_STATUS_NO_MEMORY
;
4019 r
->out
.result
= _netr_DatabaseSync(cli
->pipes_struct
, r
);
4020 return NT_STATUS_OK
;
4023 case NDR_NETR_ACCOUNTDELTAS
: {
4024 struct netr_AccountDeltas
*r
= (struct netr_AccountDeltas
*)_r
;
4025 ZERO_STRUCT(r
->out
);
4026 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4027 r
->out
.buffer
= talloc_zero(mem_ctx
, struct netr_AccountBuffer
);
4028 if (r
->out
.buffer
== NULL
) {
4029 return NT_STATUS_NO_MEMORY
;
4032 r
->out
.count_returned
= talloc_zero(mem_ctx
, uint32_t);
4033 if (r
->out
.count_returned
== NULL
) {
4034 return NT_STATUS_NO_MEMORY
;
4037 r
->out
.total_entries
= talloc_zero(mem_ctx
, uint32_t);
4038 if (r
->out
.total_entries
== NULL
) {
4039 return NT_STATUS_NO_MEMORY
;
4042 r
->out
.recordid
= talloc_zero(mem_ctx
, struct netr_UAS_INFO_0
);
4043 if (r
->out
.recordid
== NULL
) {
4044 return NT_STATUS_NO_MEMORY
;
4047 r
->out
.result
= _netr_AccountDeltas(cli
->pipes_struct
, r
);
4048 return NT_STATUS_OK
;
4051 case NDR_NETR_ACCOUNTSYNC
: {
4052 struct netr_AccountSync
*r
= (struct netr_AccountSync
*)_r
;
4053 ZERO_STRUCT(r
->out
);
4054 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4055 r
->out
.recordid
= r
->in
.recordid
;
4056 r
->out
.buffer
= talloc_zero(mem_ctx
, struct netr_AccountBuffer
);
4057 if (r
->out
.buffer
== NULL
) {
4058 return NT_STATUS_NO_MEMORY
;
4061 r
->out
.count_returned
= talloc_zero(mem_ctx
, uint32_t);
4062 if (r
->out
.count_returned
== NULL
) {
4063 return NT_STATUS_NO_MEMORY
;
4066 r
->out
.total_entries
= talloc_zero(mem_ctx
, uint32_t);
4067 if (r
->out
.total_entries
== NULL
) {
4068 return NT_STATUS_NO_MEMORY
;
4071 r
->out
.next_reference
= talloc_zero(mem_ctx
, uint32_t);
4072 if (r
->out
.next_reference
== NULL
) {
4073 return NT_STATUS_NO_MEMORY
;
4076 r
->out
.result
= _netr_AccountSync(cli
->pipes_struct
, r
);
4077 return NT_STATUS_OK
;
4080 case NDR_NETR_GETDCNAME
: {
4081 struct netr_GetDcName
*r
= (struct netr_GetDcName
*)_r
;
4082 ZERO_STRUCT(r
->out
);
4083 r
->out
.dcname
= talloc_zero(mem_ctx
, const char *);
4084 if (r
->out
.dcname
== NULL
) {
4085 return NT_STATUS_NO_MEMORY
;
4088 r
->out
.result
= _netr_GetDcName(cli
->pipes_struct
, r
);
4089 return NT_STATUS_OK
;
4092 case NDR_NETR_LOGONCONTROL
: {
4093 struct netr_LogonControl
*r
= (struct netr_LogonControl
*)_r
;
4094 ZERO_STRUCT(r
->out
);
4095 r
->out
.query
= talloc_zero(mem_ctx
, union netr_CONTROL_QUERY_INFORMATION
);
4096 if (r
->out
.query
== NULL
) {
4097 return NT_STATUS_NO_MEMORY
;
4100 r
->out
.result
= _netr_LogonControl(cli
->pipes_struct
, r
);
4101 return NT_STATUS_OK
;
4104 case NDR_NETR_GETANYDCNAME
: {
4105 struct netr_GetAnyDCName
*r
= (struct netr_GetAnyDCName
*)_r
;
4106 ZERO_STRUCT(r
->out
);
4107 r
->out
.dcname
= talloc_zero(mem_ctx
, const char *);
4108 if (r
->out
.dcname
== NULL
) {
4109 return NT_STATUS_NO_MEMORY
;
4112 r
->out
.result
= _netr_GetAnyDCName(cli
->pipes_struct
, r
);
4113 return NT_STATUS_OK
;
4116 case NDR_NETR_LOGONCONTROL2
: {
4117 struct netr_LogonControl2
*r
= (struct netr_LogonControl2
*)_r
;
4118 ZERO_STRUCT(r
->out
);
4119 r
->out
.query
= talloc_zero(mem_ctx
, union netr_CONTROL_QUERY_INFORMATION
);
4120 if (r
->out
.query
== NULL
) {
4121 return NT_STATUS_NO_MEMORY
;
4124 r
->out
.result
= _netr_LogonControl2(cli
->pipes_struct
, r
);
4125 return NT_STATUS_OK
;
4128 case NDR_NETR_SERVERAUTHENTICATE2
: {
4129 struct netr_ServerAuthenticate2
*r
= (struct netr_ServerAuthenticate2
*)_r
;
4130 ZERO_STRUCT(r
->out
);
4131 r
->out
.negotiate_flags
= r
->in
.negotiate_flags
;
4132 r
->out
.return_credentials
= talloc_zero(mem_ctx
, struct netr_Credential
);
4133 if (r
->out
.return_credentials
== NULL
) {
4134 return NT_STATUS_NO_MEMORY
;
4137 r
->out
.result
= _netr_ServerAuthenticate2(cli
->pipes_struct
, r
);
4138 return NT_STATUS_OK
;
4141 case NDR_NETR_DATABASESYNC2
: {
4142 struct netr_DatabaseSync2
*r
= (struct netr_DatabaseSync2
*)_r
;
4143 ZERO_STRUCT(r
->out
);
4144 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4145 r
->out
.sync_context
= r
->in
.sync_context
;
4146 r
->out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
*);
4147 if (r
->out
.delta_enum_array
== NULL
) {
4148 return NT_STATUS_NO_MEMORY
;
4151 r
->out
.result
= _netr_DatabaseSync2(cli
->pipes_struct
, r
);
4152 return NT_STATUS_OK
;
4155 case NDR_NETR_DATABASEREDO
: {
4156 struct netr_DatabaseRedo
*r
= (struct netr_DatabaseRedo
*)_r
;
4157 ZERO_STRUCT(r
->out
);
4158 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4159 r
->out
.delta_enum_array
= talloc_zero(mem_ctx
, struct netr_DELTA_ENUM_ARRAY
*);
4160 if (r
->out
.delta_enum_array
== NULL
) {
4161 return NT_STATUS_NO_MEMORY
;
4164 r
->out
.result
= _netr_DatabaseRedo(cli
->pipes_struct
, r
);
4165 return NT_STATUS_OK
;
4168 case NDR_NETR_LOGONCONTROL2EX
: {
4169 struct netr_LogonControl2Ex
*r
= (struct netr_LogonControl2Ex
*)_r
;
4170 ZERO_STRUCT(r
->out
);
4171 r
->out
.query
= talloc_zero(mem_ctx
, union netr_CONTROL_QUERY_INFORMATION
);
4172 if (r
->out
.query
== NULL
) {
4173 return NT_STATUS_NO_MEMORY
;
4176 r
->out
.result
= _netr_LogonControl2Ex(cli
->pipes_struct
, r
);
4177 return NT_STATUS_OK
;
4180 case NDR_NETR_NETRENUMERATETRUSTEDDOMAINS
: {
4181 struct netr_NetrEnumerateTrustedDomains
*r
= (struct netr_NetrEnumerateTrustedDomains
*)_r
;
4182 ZERO_STRUCT(r
->out
);
4183 r
->out
.trusted_domains_blob
= talloc_zero(mem_ctx
, struct netr_Blob
);
4184 if (r
->out
.trusted_domains_blob
== NULL
) {
4185 return NT_STATUS_NO_MEMORY
;
4188 r
->out
.result
= _netr_NetrEnumerateTrustedDomains(cli
->pipes_struct
, r
);
4189 return NT_STATUS_OK
;
4192 case NDR_NETR_DSRGETDCNAME
: {
4193 struct netr_DsRGetDCName
*r
= (struct netr_DsRGetDCName
*)_r
;
4194 ZERO_STRUCT(r
->out
);
4195 r
->out
.info
= talloc_zero(mem_ctx
, struct netr_DsRGetDCNameInfo
*);
4196 if (r
->out
.info
== NULL
) {
4197 return NT_STATUS_NO_MEMORY
;
4200 r
->out
.result
= _netr_DsRGetDCName(cli
->pipes_struct
, r
);
4201 return NT_STATUS_OK
;
4204 case NDR_NETR_LOGONGETCAPABILITIES
: {
4205 struct netr_LogonGetCapabilities
*r
= (struct netr_LogonGetCapabilities
*)_r
;
4206 ZERO_STRUCT(r
->out
);
4207 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4208 r
->out
.capabilities
= talloc_zero(mem_ctx
, union netr_Capabilities
);
4209 if (r
->out
.capabilities
== NULL
) {
4210 return NT_STATUS_NO_MEMORY
;
4213 r
->out
.result
= _netr_LogonGetCapabilities(cli
->pipes_struct
, r
);
4214 return NT_STATUS_OK
;
4217 case NDR_NETR_NETRLOGONSETSERVICEBITS
: {
4218 struct netr_NETRLOGONSETSERVICEBITS
*r
= (struct netr_NETRLOGONSETSERVICEBITS
*)_r
;
4219 r
->out
.result
= _netr_NETRLOGONSETSERVICEBITS(cli
->pipes_struct
, r
);
4220 return NT_STATUS_OK
;
4223 case NDR_NETR_LOGONGETTRUSTRID
: {
4224 struct netr_LogonGetTrustRid
*r
= (struct netr_LogonGetTrustRid
*)_r
;
4225 ZERO_STRUCT(r
->out
);
4226 r
->out
.rid
= talloc_zero(mem_ctx
, uint32_t);
4227 if (r
->out
.rid
== NULL
) {
4228 return NT_STATUS_NO_MEMORY
;
4231 r
->out
.result
= _netr_LogonGetTrustRid(cli
->pipes_struct
, r
);
4232 return NT_STATUS_OK
;
4235 case NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST
: {
4236 struct netr_NETRLOGONCOMPUTESERVERDIGEST
*r
= (struct netr_NETRLOGONCOMPUTESERVERDIGEST
*)_r
;
4237 r
->out
.result
= _netr_NETRLOGONCOMPUTESERVERDIGEST(cli
->pipes_struct
, r
);
4238 return NT_STATUS_OK
;
4241 case NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST
: {
4242 struct netr_NETRLOGONCOMPUTECLIENTDIGEST
*r
= (struct netr_NETRLOGONCOMPUTECLIENTDIGEST
*)_r
;
4243 r
->out
.result
= _netr_NETRLOGONCOMPUTECLIENTDIGEST(cli
->pipes_struct
, r
);
4244 return NT_STATUS_OK
;
4247 case NDR_NETR_SERVERAUTHENTICATE3
: {
4248 struct netr_ServerAuthenticate3
*r
= (struct netr_ServerAuthenticate3
*)_r
;
4249 ZERO_STRUCT(r
->out
);
4250 r
->out
.negotiate_flags
= r
->in
.negotiate_flags
;
4251 r
->out
.return_credentials
= talloc_zero(mem_ctx
, struct netr_Credential
);
4252 if (r
->out
.return_credentials
== NULL
) {
4253 return NT_STATUS_NO_MEMORY
;
4256 r
->out
.rid
= talloc_zero(mem_ctx
, uint32_t);
4257 if (r
->out
.rid
== NULL
) {
4258 return NT_STATUS_NO_MEMORY
;
4261 r
->out
.result
= _netr_ServerAuthenticate3(cli
->pipes_struct
, r
);
4262 return NT_STATUS_OK
;
4265 case NDR_NETR_DSRGETDCNAMEEX
: {
4266 struct netr_DsRGetDCNameEx
*r
= (struct netr_DsRGetDCNameEx
*)_r
;
4267 ZERO_STRUCT(r
->out
);
4268 r
->out
.info
= talloc_zero(mem_ctx
, struct netr_DsRGetDCNameInfo
*);
4269 if (r
->out
.info
== NULL
) {
4270 return NT_STATUS_NO_MEMORY
;
4273 r
->out
.result
= _netr_DsRGetDCNameEx(cli
->pipes_struct
, r
);
4274 return NT_STATUS_OK
;
4277 case NDR_NETR_DSRGETSITENAME
: {
4278 struct netr_DsRGetSiteName
*r
= (struct netr_DsRGetSiteName
*)_r
;
4279 ZERO_STRUCT(r
->out
);
4280 r
->out
.site
= talloc_zero(mem_ctx
, const char *);
4281 if (r
->out
.site
== NULL
) {
4282 return NT_STATUS_NO_MEMORY
;
4285 r
->out
.result
= _netr_DsRGetSiteName(cli
->pipes_struct
, r
);
4286 return NT_STATUS_OK
;
4289 case NDR_NETR_LOGONGETDOMAININFO
: {
4290 struct netr_LogonGetDomainInfo
*r
= (struct netr_LogonGetDomainInfo
*)_r
;
4291 ZERO_STRUCT(r
->out
);
4292 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4293 r
->out
.info
= talloc_zero(mem_ctx
, union netr_DomainInfo
);
4294 if (r
->out
.info
== NULL
) {
4295 return NT_STATUS_NO_MEMORY
;
4298 r
->out
.result
= _netr_LogonGetDomainInfo(cli
->pipes_struct
, r
);
4299 return NT_STATUS_OK
;
4302 case NDR_NETR_SERVERPASSWORDSET2
: {
4303 struct netr_ServerPasswordSet2
*r
= (struct netr_ServerPasswordSet2
*)_r
;
4304 ZERO_STRUCT(r
->out
);
4305 r
->out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
4306 if (r
->out
.return_authenticator
== NULL
) {
4307 return NT_STATUS_NO_MEMORY
;
4310 r
->out
.result
= _netr_ServerPasswordSet2(cli
->pipes_struct
, r
);
4311 return NT_STATUS_OK
;
4314 case NDR_NETR_SERVERPASSWORDGET
: {
4315 struct netr_ServerPasswordGet
*r
= (struct netr_ServerPasswordGet
*)_r
;
4316 ZERO_STRUCT(r
->out
);
4317 r
->out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
4318 if (r
->out
.return_authenticator
== NULL
) {
4319 return NT_STATUS_NO_MEMORY
;
4322 r
->out
.password
= talloc_zero(mem_ctx
, struct samr_Password
);
4323 if (r
->out
.password
== NULL
) {
4324 return NT_STATUS_NO_MEMORY
;
4327 r
->out
.result
= _netr_ServerPasswordGet(cli
->pipes_struct
, r
);
4328 return NT_STATUS_OK
;
4331 case NDR_NETR_NETRLOGONSENDTOSAM
: {
4332 struct netr_NETRLOGONSENDTOSAM
*r
= (struct netr_NETRLOGONSENDTOSAM
*)_r
;
4333 r
->out
.result
= _netr_NETRLOGONSENDTOSAM(cli
->pipes_struct
, r
);
4334 return NT_STATUS_OK
;
4337 case NDR_NETR_DSRADDRESSTOSITENAMESW
: {
4338 struct netr_DsRAddressToSitenamesW
*r
= (struct netr_DsRAddressToSitenamesW
*)_r
;
4339 ZERO_STRUCT(r
->out
);
4340 r
->out
.ctr
= talloc_zero(mem_ctx
, struct netr_DsRAddressToSitenamesWCtr
*);
4341 if (r
->out
.ctr
== NULL
) {
4342 return NT_STATUS_NO_MEMORY
;
4345 r
->out
.result
= _netr_DsRAddressToSitenamesW(cli
->pipes_struct
, r
);
4346 return NT_STATUS_OK
;
4349 case NDR_NETR_DSRGETDCNAMEEX2
: {
4350 struct netr_DsRGetDCNameEx2
*r
= (struct netr_DsRGetDCNameEx2
*)_r
;
4351 ZERO_STRUCT(r
->out
);
4352 r
->out
.info
= talloc_zero(mem_ctx
, struct netr_DsRGetDCNameInfo
*);
4353 if (r
->out
.info
== NULL
) {
4354 return NT_STATUS_NO_MEMORY
;
4357 r
->out
.result
= _netr_DsRGetDCNameEx2(cli
->pipes_struct
, r
);
4358 return NT_STATUS_OK
;
4361 case NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN
: {
4362 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
*r
= (struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
*)_r
;
4363 r
->out
.result
= _netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(cli
->pipes_struct
, r
);
4364 return NT_STATUS_OK
;
4367 case NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX
: {
4368 struct netr_NetrEnumerateTrustedDomainsEx
*r
= (struct netr_NetrEnumerateTrustedDomainsEx
*)_r
;
4369 ZERO_STRUCT(r
->out
);
4370 r
->out
.dom_trust_list
= talloc_zero(mem_ctx
, struct netr_DomainTrustList
);
4371 if (r
->out
.dom_trust_list
== NULL
) {
4372 return NT_STATUS_NO_MEMORY
;
4375 r
->out
.result
= _netr_NetrEnumerateTrustedDomainsEx(cli
->pipes_struct
, r
);
4376 return NT_STATUS_OK
;
4379 case NDR_NETR_DSRADDRESSTOSITENAMESEXW
: {
4380 struct netr_DsRAddressToSitenamesExW
*r
= (struct netr_DsRAddressToSitenamesExW
*)_r
;
4381 ZERO_STRUCT(r
->out
);
4382 r
->out
.ctr
= talloc_zero(mem_ctx
, struct netr_DsRAddressToSitenamesExWCtr
*);
4383 if (r
->out
.ctr
== NULL
) {
4384 return NT_STATUS_NO_MEMORY
;
4387 r
->out
.result
= _netr_DsRAddressToSitenamesExW(cli
->pipes_struct
, r
);
4388 return NT_STATUS_OK
;
4391 case NDR_NETR_DSRGETDCSITECOVERAGEW
: {
4392 struct netr_DsrGetDcSiteCoverageW
*r
= (struct netr_DsrGetDcSiteCoverageW
*)_r
;
4393 ZERO_STRUCT(r
->out
);
4394 r
->out
.ctr
= talloc_zero(mem_ctx
, struct DcSitesCtr
*);
4395 if (r
->out
.ctr
== NULL
) {
4396 return NT_STATUS_NO_MEMORY
;
4399 r
->out
.result
= _netr_DsrGetDcSiteCoverageW(cli
->pipes_struct
, r
);
4400 return NT_STATUS_OK
;
4403 case NDR_NETR_LOGONSAMLOGONEX
: {
4404 struct netr_LogonSamLogonEx
*r
= (struct netr_LogonSamLogonEx
*)_r
;
4405 ZERO_STRUCT(r
->out
);
4406 r
->out
.flags
= r
->in
.flags
;
4407 r
->out
.validation
= talloc_zero(mem_ctx
, union netr_Validation
);
4408 if (r
->out
.validation
== NULL
) {
4409 return NT_STATUS_NO_MEMORY
;
4412 r
->out
.authoritative
= talloc_zero(mem_ctx
, uint8_t);
4413 if (r
->out
.authoritative
== NULL
) {
4414 return NT_STATUS_NO_MEMORY
;
4417 r
->out
.result
= _netr_LogonSamLogonEx(cli
->pipes_struct
, r
);
4418 return NT_STATUS_OK
;
4421 case NDR_NETR_DSRENUMERATEDOMAINTRUSTS
: {
4422 struct netr_DsrEnumerateDomainTrusts
*r
= (struct netr_DsrEnumerateDomainTrusts
*)_r
;
4423 ZERO_STRUCT(r
->out
);
4424 r
->out
.trusts
= talloc_zero(mem_ctx
, struct netr_DomainTrustList
);
4425 if (r
->out
.trusts
== NULL
) {
4426 return NT_STATUS_NO_MEMORY
;
4429 r
->out
.result
= _netr_DsrEnumerateDomainTrusts(cli
->pipes_struct
, r
);
4430 return NT_STATUS_OK
;
4433 case NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS
: {
4434 struct netr_DsrDeregisterDNSHostRecords
*r
= (struct netr_DsrDeregisterDNSHostRecords
*)_r
;
4435 r
->out
.result
= _netr_DsrDeregisterDNSHostRecords(cli
->pipes_struct
, r
);
4436 return NT_STATUS_OK
;
4439 case NDR_NETR_SERVERTRUSTPASSWORDSGET
: {
4440 struct netr_ServerTrustPasswordsGet
*r
= (struct netr_ServerTrustPasswordsGet
*)_r
;
4441 ZERO_STRUCT(r
->out
);
4442 r
->out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
4443 if (r
->out
.return_authenticator
== NULL
) {
4444 return NT_STATUS_NO_MEMORY
;
4447 r
->out
.password
= talloc_zero(mem_ctx
, struct samr_Password
);
4448 if (r
->out
.password
== NULL
) {
4449 return NT_STATUS_NO_MEMORY
;
4452 r
->out
.password2
= talloc_zero(mem_ctx
, struct samr_Password
);
4453 if (r
->out
.password2
== NULL
) {
4454 return NT_STATUS_NO_MEMORY
;
4457 r
->out
.result
= _netr_ServerTrustPasswordsGet(cli
->pipes_struct
, r
);
4458 return NT_STATUS_OK
;
4461 case NDR_NETR_DSRGETFORESTTRUSTINFORMATION
: {
4462 struct netr_DsRGetForestTrustInformation
*r
= (struct netr_DsRGetForestTrustInformation
*)_r
;
4463 ZERO_STRUCT(r
->out
);
4464 r
->out
.forest_trust_info
= talloc_zero(mem_ctx
, struct lsa_ForestTrustInformation
*);
4465 if (r
->out
.forest_trust_info
== NULL
) {
4466 return NT_STATUS_NO_MEMORY
;
4469 r
->out
.result
= _netr_DsRGetForestTrustInformation(cli
->pipes_struct
, r
);
4470 return NT_STATUS_OK
;
4473 case NDR_NETR_GETFORESTTRUSTINFORMATION
: {
4474 struct netr_GetForestTrustInformation
*r
= (struct netr_GetForestTrustInformation
*)_r
;
4475 ZERO_STRUCT(r
->out
);
4476 r
->out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
4477 if (r
->out
.return_authenticator
== NULL
) {
4478 return NT_STATUS_NO_MEMORY
;
4481 r
->out
.forest_trust_info
= talloc_zero(mem_ctx
, struct lsa_ForestTrustInformation
*);
4482 if (r
->out
.forest_trust_info
== NULL
) {
4483 return NT_STATUS_NO_MEMORY
;
4486 r
->out
.result
= _netr_GetForestTrustInformation(cli
->pipes_struct
, r
);
4487 return NT_STATUS_OK
;
4490 case NDR_NETR_LOGONSAMLOGONWITHFLAGS
: {
4491 struct netr_LogonSamLogonWithFlags
*r
= (struct netr_LogonSamLogonWithFlags
*)_r
;
4492 ZERO_STRUCT(r
->out
);
4493 r
->out
.return_authenticator
= r
->in
.return_authenticator
;
4494 r
->out
.flags
= r
->in
.flags
;
4495 r
->out
.validation
= talloc_zero(mem_ctx
, union netr_Validation
);
4496 if (r
->out
.validation
== NULL
) {
4497 return NT_STATUS_NO_MEMORY
;
4500 r
->out
.authoritative
= talloc_zero(mem_ctx
, uint8_t);
4501 if (r
->out
.authoritative
== NULL
) {
4502 return NT_STATUS_NO_MEMORY
;
4505 r
->out
.result
= _netr_LogonSamLogonWithFlags(cli
->pipes_struct
, r
);
4506 return NT_STATUS_OK
;
4509 case NDR_NETR_SERVERGETTRUSTINFO
: {
4510 struct netr_ServerGetTrustInfo
*r
= (struct netr_ServerGetTrustInfo
*)_r
;
4511 ZERO_STRUCT(r
->out
);
4512 r
->out
.return_authenticator
= talloc_zero(mem_ctx
, struct netr_Authenticator
);
4513 if (r
->out
.return_authenticator
== NULL
) {
4514 return NT_STATUS_NO_MEMORY
;
4517 r
->out
.new_owf_password
= talloc_zero(mem_ctx
, struct samr_Password
);
4518 if (r
->out
.new_owf_password
== NULL
) {
4519 return NT_STATUS_NO_MEMORY
;
4522 r
->out
.old_owf_password
= talloc_zero(mem_ctx
, struct samr_Password
);
4523 if (r
->out
.old_owf_password
== NULL
) {
4524 return NT_STATUS_NO_MEMORY
;
4527 r
->out
.trust_info
= talloc_zero(mem_ctx
, struct netr_TrustInfo
*);
4528 if (r
->out
.trust_info
== NULL
) {
4529 return NT_STATUS_NO_MEMORY
;
4532 r
->out
.result
= _netr_ServerGetTrustInfo(cli
->pipes_struct
, r
);
4533 return NT_STATUS_OK
;
4537 return NT_STATUS_NOT_IMPLEMENTED
;
4541 NTSTATUS
rpc_netlogon_init(void)
4543 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "netlogon", "netlogon", &ndr_table_netlogon
, api_netlogon_cmds
, sizeof(api_netlogon_cmds
) / sizeof(struct api_struct
));