2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/cli_netlogon.h"
9 NTSTATUS
rpccli_netr_LogonUasLogon(struct rpc_pipe_client
*cli
,
11 const char *server_name
/* [in] [unique,charset(UTF16)] */,
12 const char *account_name
/* [in] [charset(UTF16)] */,
13 const char *workstation
/* [in] [charset(UTF16)] */,
14 struct netr_UasInfo
*info
/* [out] [ref] */,
17 struct netr_LogonUasLogon r
;
21 r
.in
.server_name
= server_name
;
22 r
.in
.account_name
= account_name
;
23 r
.in
.workstation
= workstation
;
25 if (DEBUGLEVEL
>= 10) {
26 NDR_PRINT_IN_DEBUG(netr_LogonUasLogon
, &r
);
29 status
= cli_do_rpc_ndr(cli
,
33 NDR_NETR_LOGONUASLOGON
,
36 if (!NT_STATUS_IS_OK(status
)) {
40 if (DEBUGLEVEL
>= 10) {
41 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon
, &r
);
44 if (NT_STATUS_IS_ERR(status
)) {
48 /* Return variables */
53 *werror
= r
.out
.result
;
56 return werror_to_ntstatus(r
.out
.result
);
59 NTSTATUS
rpccli_netr_LogonUasLogoff(struct rpc_pipe_client
*cli
,
61 const char *server_name
/* [in] [unique,charset(UTF16)] */,
62 const char *account_name
/* [in] [charset(UTF16)] */,
63 const char *workstation
/* [in] [charset(UTF16)] */,
64 struct netr_UasLogoffInfo
*info
/* [out] [ref] */,
67 struct netr_LogonUasLogoff r
;
71 r
.in
.server_name
= server_name
;
72 r
.in
.account_name
= account_name
;
73 r
.in
.workstation
= workstation
;
75 if (DEBUGLEVEL
>= 10) {
76 NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff
, &r
);
79 status
= cli_do_rpc_ndr(cli
,
83 NDR_NETR_LOGONUASLOGOFF
,
86 if (!NT_STATUS_IS_OK(status
)) {
90 if (DEBUGLEVEL
>= 10) {
91 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff
, &r
);
94 if (NT_STATUS_IS_ERR(status
)) {
98 /* Return variables */
103 *werror
= r
.out
.result
;
106 return werror_to_ntstatus(r
.out
.result
);
109 NTSTATUS
rpccli_netr_LogonSamLogon(struct rpc_pipe_client
*cli
,
111 const char *server_name
/* [in] [unique,charset(UTF16)] */,
112 const char *computer_name
/* [in] [unique,charset(UTF16)] */,
113 struct netr_Authenticator
*credential
/* [in] [unique] */,
114 struct netr_Authenticator
*return_authenticator
/* [in,out] [unique] */,
115 enum netr_LogonLevel logon_level
/* [in] */,
116 union netr_LogonInfo
*logon
/* [in] [ref,switch_is(logon_level)] */,
117 uint16_t validation_level
/* [in] */,
118 union netr_Validation
*validation
/* [out] [ref,switch_is(validation_level)] */,
119 uint8_t *authoritative
/* [out] [ref] */)
121 struct netr_LogonSamLogon r
;
125 r
.in
.server_name
= server_name
;
126 r
.in
.computer_name
= computer_name
;
127 r
.in
.credential
= credential
;
128 r
.in
.return_authenticator
= return_authenticator
;
129 r
.in
.logon_level
= logon_level
;
131 r
.in
.validation_level
= validation_level
;
133 if (DEBUGLEVEL
>= 10) {
134 NDR_PRINT_IN_DEBUG(netr_LogonSamLogon
, &r
);
137 status
= cli_do_rpc_ndr(cli
,
141 NDR_NETR_LOGONSAMLOGON
,
144 if (!NT_STATUS_IS_OK(status
)) {
148 if (DEBUGLEVEL
>= 10) {
149 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon
, &r
);
152 if (NT_STATUS_IS_ERR(status
)) {
156 /* Return variables */
157 if (return_authenticator
&& r
.out
.return_authenticator
) {
158 *return_authenticator
= *r
.out
.return_authenticator
;
160 *validation
= *r
.out
.validation
;
161 *authoritative
= *r
.out
.authoritative
;
167 NTSTATUS
rpccli_netr_LogonSamLogoff(struct rpc_pipe_client
*cli
,
169 const char *server_name
/* [in] [unique,charset(UTF16)] */,
170 const char *computer_name
/* [in] [unique,charset(UTF16)] */,
171 struct netr_Authenticator
*credential
/* [in] [unique] */,
172 struct netr_Authenticator
*return_authenticator
/* [in,out] [unique] */,
173 enum netr_LogonLevel logon_level
/* [in] */,
174 union netr_LogonInfo logon
/* [in] [switch_is(logon_level)] */)
176 struct netr_LogonSamLogoff r
;
180 r
.in
.server_name
= server_name
;
181 r
.in
.computer_name
= computer_name
;
182 r
.in
.credential
= credential
;
183 r
.in
.return_authenticator
= return_authenticator
;
184 r
.in
.logon_level
= logon_level
;
187 if (DEBUGLEVEL
>= 10) {
188 NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff
, &r
);
191 status
= cli_do_rpc_ndr(cli
,
195 NDR_NETR_LOGONSAMLOGOFF
,
198 if (!NT_STATUS_IS_OK(status
)) {
202 if (DEBUGLEVEL
>= 10) {
203 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff
, &r
);
206 if (NT_STATUS_IS_ERR(status
)) {
210 /* Return variables */
211 if (return_authenticator
&& r
.out
.return_authenticator
) {
212 *return_authenticator
= *r
.out
.return_authenticator
;
219 NTSTATUS
rpccli_netr_ServerReqChallenge(struct rpc_pipe_client
*cli
,
221 const char *server_name
/* [in] [unique,charset(UTF16)] */,
222 const char *computer_name
/* [in] [charset(UTF16)] */,
223 struct netr_Credential
*credentials
/* [in] [ref] */,
224 struct netr_Credential
*return_credentials
/* [out] [ref] */)
226 struct netr_ServerReqChallenge r
;
230 r
.in
.server_name
= server_name
;
231 r
.in
.computer_name
= computer_name
;
232 r
.in
.credentials
= credentials
;
234 if (DEBUGLEVEL
>= 10) {
235 NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge
, &r
);
238 status
= cli_do_rpc_ndr(cli
,
242 NDR_NETR_SERVERREQCHALLENGE
,
245 if (!NT_STATUS_IS_OK(status
)) {
249 if (DEBUGLEVEL
>= 10) {
250 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge
, &r
);
253 if (NT_STATUS_IS_ERR(status
)) {
257 /* Return variables */
258 *return_credentials
= *r
.out
.return_credentials
;
264 NTSTATUS
rpccli_netr_ServerAuthenticate(struct rpc_pipe_client
*cli
,
266 const char *server_name
/* [in] [unique,charset(UTF16)] */,
267 const char *account_name
/* [in] [charset(UTF16)] */,
268 enum netr_SchannelType secure_channel_type
/* [in] */,
269 const char *computer_name
/* [in] [charset(UTF16)] */,
270 struct netr_Credential
*credentials
/* [in] [ref] */,
271 struct netr_Credential
*return_credentials
/* [out] [ref] */)
273 struct netr_ServerAuthenticate r
;
277 r
.in
.server_name
= server_name
;
278 r
.in
.account_name
= account_name
;
279 r
.in
.secure_channel_type
= secure_channel_type
;
280 r
.in
.computer_name
= computer_name
;
281 r
.in
.credentials
= credentials
;
283 if (DEBUGLEVEL
>= 10) {
284 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate
, &r
);
287 status
= cli_do_rpc_ndr(cli
,
291 NDR_NETR_SERVERAUTHENTICATE
,
294 if (!NT_STATUS_IS_OK(status
)) {
298 if (DEBUGLEVEL
>= 10) {
299 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate
, &r
);
302 if (NT_STATUS_IS_ERR(status
)) {
306 /* Return variables */
307 *return_credentials
= *r
.out
.return_credentials
;
313 NTSTATUS
rpccli_netr_ServerPasswordSet(struct rpc_pipe_client
*cli
,
315 const char *server_name
/* [in] [unique,charset(UTF16)] */,
316 const char *account_name
/* [in] [charset(UTF16)] */,
317 enum netr_SchannelType secure_channel_type
/* [in] */,
318 const char *computer_name
/* [in] [charset(UTF16)] */,
319 struct netr_Authenticator
*credential
/* [in] [ref] */,
320 struct netr_Authenticator
*return_authenticator
/* [out] [ref] */,
321 struct samr_Password
*new_password
/* [in] [ref] */)
323 struct netr_ServerPasswordSet r
;
327 r
.in
.server_name
= server_name
;
328 r
.in
.account_name
= account_name
;
329 r
.in
.secure_channel_type
= secure_channel_type
;
330 r
.in
.computer_name
= computer_name
;
331 r
.in
.credential
= credential
;
332 r
.in
.new_password
= new_password
;
334 if (DEBUGLEVEL
>= 10) {
335 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet
, &r
);
338 status
= cli_do_rpc_ndr(cli
,
342 NDR_NETR_SERVERPASSWORDSET
,
345 if (!NT_STATUS_IS_OK(status
)) {
349 if (DEBUGLEVEL
>= 10) {
350 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet
, &r
);
353 if (NT_STATUS_IS_ERR(status
)) {
357 /* Return variables */
358 *return_authenticator
= *r
.out
.return_authenticator
;
364 NTSTATUS
rpccli_netr_DatabaseDeltas(struct rpc_pipe_client
*cli
,
366 const char *logon_server
/* [in] [charset(UTF16)] */,
367 const char *computername
/* [in] [charset(UTF16)] */,
368 struct netr_Authenticator
*credential
/* [in] [ref] */,
369 struct netr_Authenticator
*return_authenticator
/* [in,out] [ref] */,
370 enum netr_SamDatabaseID database_id
/* [in] */,
371 uint64_t *sequence_num
/* [in,out] [ref] */,
372 struct netr_DELTA_ENUM_ARRAY
**delta_enum_array
/* [out] [ref] */,
373 uint32_t preferredmaximumlength
/* [in] */)
375 struct netr_DatabaseDeltas r
;
379 r
.in
.logon_server
= logon_server
;
380 r
.in
.computername
= computername
;
381 r
.in
.credential
= credential
;
382 r
.in
.return_authenticator
= return_authenticator
;
383 r
.in
.database_id
= database_id
;
384 r
.in
.sequence_num
= sequence_num
;
385 r
.in
.preferredmaximumlength
= preferredmaximumlength
;
387 if (DEBUGLEVEL
>= 10) {
388 NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas
, &r
);
391 status
= cli_do_rpc_ndr(cli
,
395 NDR_NETR_DATABASEDELTAS
,
398 if (!NT_STATUS_IS_OK(status
)) {
402 if (DEBUGLEVEL
>= 10) {
403 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas
, &r
);
406 if (NT_STATUS_IS_ERR(status
)) {
410 /* Return variables */
411 *return_authenticator
= *r
.out
.return_authenticator
;
412 *sequence_num
= *r
.out
.sequence_num
;
413 *delta_enum_array
= *r
.out
.delta_enum_array
;
419 NTSTATUS
rpccli_netr_DatabaseSync(struct rpc_pipe_client
*cli
,
421 const char *logon_server
/* [in] [charset(UTF16)] */,
422 const char *computername
/* [in] [charset(UTF16)] */,
423 struct netr_Authenticator credential
/* [in] */,
424 struct netr_Authenticator
*return_authenticator
/* [in,out] [ref] */,
425 enum netr_SamDatabaseID database_id
/* [in] */,
426 uint32_t *sync_context
/* [in,out] [ref] */,
427 uint32_t preferredmaximumlength
/* [in] */,
428 struct netr_DELTA_ENUM_ARRAY
*delta_enum_array
/* [out] [ref] */)
430 struct netr_DatabaseSync r
;
434 r
.in
.logon_server
= logon_server
;
435 r
.in
.computername
= computername
;
436 r
.in
.credential
= credential
;
437 r
.in
.return_authenticator
= return_authenticator
;
438 r
.in
.database_id
= database_id
;
439 r
.in
.sync_context
= sync_context
;
440 r
.in
.preferredmaximumlength
= preferredmaximumlength
;
442 if (DEBUGLEVEL
>= 10) {
443 NDR_PRINT_IN_DEBUG(netr_DatabaseSync
, &r
);
446 status
= cli_do_rpc_ndr(cli
,
450 NDR_NETR_DATABASESYNC
,
453 if (!NT_STATUS_IS_OK(status
)) {
457 if (DEBUGLEVEL
>= 10) {
458 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync
, &r
);
461 if (NT_STATUS_IS_ERR(status
)) {
465 /* Return variables */
466 *return_authenticator
= *r
.out
.return_authenticator
;
467 *sync_context
= *r
.out
.sync_context
;
468 *delta_enum_array
= *r
.out
.delta_enum_array
;
474 NTSTATUS
rpccli_netr_AccountDeltas(struct rpc_pipe_client
*cli
,
476 const char *logon_server
/* [in] [unique,charset(UTF16)] */,
477 const char *computername
/* [in] [charset(UTF16)] */,
478 struct netr_Authenticator credential
/* [in] */,
479 struct netr_Authenticator
*return_authenticator
/* [in,out] [ref] */,
480 struct netr_UAS_INFO_0 uas
/* [in] */,
481 uint32_t count
/* [in] */,
482 uint32_t level
/* [in] */,
483 uint32_t buffersize
/* [in] */,
484 struct netr_AccountBuffer
*buffer
/* [out] [ref,subcontext(4)] */,
485 uint32_t *count_returned
/* [out] [ref] */,
486 uint32_t *total_entries
/* [out] [ref] */,
487 struct netr_UAS_INFO_0
*recordid
/* [out] [ref] */)
489 struct netr_AccountDeltas r
;
493 r
.in
.logon_server
= logon_server
;
494 r
.in
.computername
= computername
;
495 r
.in
.credential
= credential
;
496 r
.in
.return_authenticator
= return_authenticator
;
500 r
.in
.buffersize
= buffersize
;
502 if (DEBUGLEVEL
>= 10) {
503 NDR_PRINT_IN_DEBUG(netr_AccountDeltas
, &r
);
506 status
= cli_do_rpc_ndr(cli
,
510 NDR_NETR_ACCOUNTDELTAS
,
513 if (!NT_STATUS_IS_OK(status
)) {
517 if (DEBUGLEVEL
>= 10) {
518 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas
, &r
);
521 if (NT_STATUS_IS_ERR(status
)) {
525 /* Return variables */
526 *return_authenticator
= *r
.out
.return_authenticator
;
527 *buffer
= *r
.out
.buffer
;
528 *count_returned
= *r
.out
.count_returned
;
529 *total_entries
= *r
.out
.total_entries
;
530 *recordid
= *r
.out
.recordid
;
536 NTSTATUS
rpccli_netr_AccountSync(struct rpc_pipe_client
*cli
,
538 const char *logon_server
/* [in] [unique,charset(UTF16)] */,
539 const char *computername
/* [in] [charset(UTF16)] */,
540 struct netr_Authenticator credential
/* [in] */,
541 struct netr_Authenticator
*return_authenticator
/* [in,out] [ref] */,
542 uint32_t reference
/* [in] */,
543 uint32_t level
/* [in] */,
544 uint32_t buffersize
/* [in] */,
545 struct netr_AccountBuffer
*buffer
/* [out] [ref,subcontext(4)] */,
546 uint32_t *count_returned
/* [out] [ref] */,
547 uint32_t *total_entries
/* [out] [ref] */,
548 uint32_t *next_reference
/* [out] [ref] */,
549 struct netr_UAS_INFO_0
*recordid
/* [in,out] [ref] */)
551 struct netr_AccountSync r
;
555 r
.in
.logon_server
= logon_server
;
556 r
.in
.computername
= computername
;
557 r
.in
.credential
= credential
;
558 r
.in
.return_authenticator
= return_authenticator
;
559 r
.in
.reference
= reference
;
561 r
.in
.buffersize
= buffersize
;
562 r
.in
.recordid
= recordid
;
564 if (DEBUGLEVEL
>= 10) {
565 NDR_PRINT_IN_DEBUG(netr_AccountSync
, &r
);
568 status
= cli_do_rpc_ndr(cli
,
572 NDR_NETR_ACCOUNTSYNC
,
575 if (!NT_STATUS_IS_OK(status
)) {
579 if (DEBUGLEVEL
>= 10) {
580 NDR_PRINT_OUT_DEBUG(netr_AccountSync
, &r
);
583 if (NT_STATUS_IS_ERR(status
)) {
587 /* Return variables */
588 *return_authenticator
= *r
.out
.return_authenticator
;
589 *buffer
= *r
.out
.buffer
;
590 *count_returned
= *r
.out
.count_returned
;
591 *total_entries
= *r
.out
.total_entries
;
592 *next_reference
= *r
.out
.next_reference
;
593 *recordid
= *r
.out
.recordid
;
599 NTSTATUS
rpccli_netr_GetDcName(struct rpc_pipe_client
*cli
,
601 const char *logon_server
/* [in] [charset(UTF16)] */,
602 const char *domainname
/* [in] [unique,charset(UTF16)] */,
603 const char **dcname
/* [out] [ref,charset(UTF16)] */,
606 struct netr_GetDcName r
;
610 r
.in
.logon_server
= logon_server
;
611 r
.in
.domainname
= domainname
;
613 if (DEBUGLEVEL
>= 10) {
614 NDR_PRINT_IN_DEBUG(netr_GetDcName
, &r
);
617 status
= cli_do_rpc_ndr(cli
,
624 if (!NT_STATUS_IS_OK(status
)) {
628 if (DEBUGLEVEL
>= 10) {
629 NDR_PRINT_OUT_DEBUG(netr_GetDcName
, &r
);
632 if (NT_STATUS_IS_ERR(status
)) {
636 /* Return variables */
637 *dcname
= *r
.out
.dcname
;
641 *werror
= r
.out
.result
;
644 return werror_to_ntstatus(r
.out
.result
);
647 NTSTATUS
rpccli_netr_LogonControl(struct rpc_pipe_client
*cli
,
649 const char *logon_server
/* [in] [unique,charset(UTF16)] */,
650 enum netr_LogonControlCode function_code
/* [in] */,
651 uint32_t level
/* [in] */,
652 union netr_CONTROL_QUERY_INFORMATION
*info
/* [out] [ref,switch_is(level)] */,
655 struct netr_LogonControl r
;
659 r
.in
.logon_server
= logon_server
;
660 r
.in
.function_code
= function_code
;
663 if (DEBUGLEVEL
>= 10) {
664 NDR_PRINT_IN_DEBUG(netr_LogonControl
, &r
);
667 status
= cli_do_rpc_ndr(cli
,
671 NDR_NETR_LOGONCONTROL
,
674 if (!NT_STATUS_IS_OK(status
)) {
678 if (DEBUGLEVEL
>= 10) {
679 NDR_PRINT_OUT_DEBUG(netr_LogonControl
, &r
);
682 if (NT_STATUS_IS_ERR(status
)) {
686 /* Return variables */
691 *werror
= r
.out
.result
;
694 return werror_to_ntstatus(r
.out
.result
);
697 NTSTATUS
rpccli_netr_GetAnyDCName(struct rpc_pipe_client
*cli
,
699 const char *logon_server
/* [in] [unique,charset(UTF16)] */,
700 const char *domainname
/* [in] [unique,charset(UTF16)] */,
701 const char **dcname
/* [out] [ref,charset(UTF16)] */,
704 struct netr_GetAnyDCName r
;
708 r
.in
.logon_server
= logon_server
;
709 r
.in
.domainname
= domainname
;
711 if (DEBUGLEVEL
>= 10) {
712 NDR_PRINT_IN_DEBUG(netr_GetAnyDCName
, &r
);
715 status
= cli_do_rpc_ndr(cli
,
719 NDR_NETR_GETANYDCNAME
,
722 if (!NT_STATUS_IS_OK(status
)) {
726 if (DEBUGLEVEL
>= 10) {
727 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName
, &r
);
730 if (NT_STATUS_IS_ERR(status
)) {
734 /* Return variables */
735 *dcname
= *r
.out
.dcname
;
739 *werror
= r
.out
.result
;
742 return werror_to_ntstatus(r
.out
.result
);
745 NTSTATUS
rpccli_netr_LogonControl2(struct rpc_pipe_client
*cli
,
747 const char *logon_server
/* [in] [unique,charset(UTF16)] */,
748 enum netr_LogonControlCode function_code
/* [in] */,
749 uint32_t level
/* [in] */,
750 union netr_CONTROL_DATA_INFORMATION
*data
/* [in] [ref,switch_is(function_code)] */,
751 union netr_CONTROL_QUERY_INFORMATION
*query
/* [out] [ref,switch_is(level)] */,
754 struct netr_LogonControl2 r
;
758 r
.in
.logon_server
= logon_server
;
759 r
.in
.function_code
= function_code
;
763 if (DEBUGLEVEL
>= 10) {
764 NDR_PRINT_IN_DEBUG(netr_LogonControl2
, &r
);
767 status
= cli_do_rpc_ndr(cli
,
771 NDR_NETR_LOGONCONTROL2
,
774 if (!NT_STATUS_IS_OK(status
)) {
778 if (DEBUGLEVEL
>= 10) {
779 NDR_PRINT_OUT_DEBUG(netr_LogonControl2
, &r
);
782 if (NT_STATUS_IS_ERR(status
)) {
786 /* Return variables */
787 *query
= *r
.out
.query
;
791 *werror
= r
.out
.result
;
794 return werror_to_ntstatus(r
.out
.result
);
797 NTSTATUS
rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client
*cli
,
799 const char *server_name
/* [in] [unique,charset(UTF16)] */,
800 const char *account_name
/* [in] [charset(UTF16)] */,
801 enum netr_SchannelType secure_channel_type
/* [in] */,
802 const char *computer_name
/* [in] [charset(UTF16)] */,
803 struct netr_Credential
*credentials
/* [in] [ref] */,
804 struct netr_Credential
*return_credentials
/* [out] [ref] */,
805 uint32_t *negotiate_flags
/* [in,out] [ref] */)
807 struct netr_ServerAuthenticate2 r
;
811 r
.in
.server_name
= server_name
;
812 r
.in
.account_name
= account_name
;
813 r
.in
.secure_channel_type
= secure_channel_type
;
814 r
.in
.computer_name
= computer_name
;
815 r
.in
.credentials
= credentials
;
816 r
.in
.negotiate_flags
= negotiate_flags
;
818 if (DEBUGLEVEL
>= 10) {
819 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2
, &r
);
822 status
= cli_do_rpc_ndr(cli
,
826 NDR_NETR_SERVERAUTHENTICATE2
,
829 if (!NT_STATUS_IS_OK(status
)) {
833 if (DEBUGLEVEL
>= 10) {
834 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2
, &r
);
837 if (NT_STATUS_IS_ERR(status
)) {
841 /* Return variables */
842 *return_credentials
= *r
.out
.return_credentials
;
843 *negotiate_flags
= *r
.out
.negotiate_flags
;
849 NTSTATUS
rpccli_netr_DatabaseSync2(struct rpc_pipe_client
*cli
,
851 const char *logon_server
/* [in] [charset(UTF16)] */,
852 const char *computername
/* [in] [charset(UTF16)] */,
853 struct netr_Authenticator
*credential
/* [in] [ref] */,
854 struct netr_Authenticator
*return_authenticator
/* [in,out] [ref] */,
855 enum netr_SamDatabaseID database_id
/* [in] */,
856 uint16_t restart_state
/* [in] */,
857 uint32_t *sync_context
/* [in,out] [ref] */,
858 struct netr_DELTA_ENUM_ARRAY
**delta_enum_array
/* [out] [ref] */,
859 uint32_t preferredmaximumlength
/* [in] */)
861 struct netr_DatabaseSync2 r
;
865 r
.in
.logon_server
= logon_server
;
866 r
.in
.computername
= computername
;
867 r
.in
.credential
= credential
;
868 r
.in
.return_authenticator
= return_authenticator
;
869 r
.in
.database_id
= database_id
;
870 r
.in
.restart_state
= restart_state
;
871 r
.in
.sync_context
= sync_context
;
872 r
.in
.preferredmaximumlength
= preferredmaximumlength
;
874 if (DEBUGLEVEL
>= 10) {
875 NDR_PRINT_IN_DEBUG(netr_DatabaseSync2
, &r
);
878 status
= cli_do_rpc_ndr(cli
,
882 NDR_NETR_DATABASESYNC2
,
885 if (!NT_STATUS_IS_OK(status
)) {
889 if (DEBUGLEVEL
>= 10) {
890 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2
, &r
);
893 if (NT_STATUS_IS_ERR(status
)) {
897 /* Return variables */
898 *return_authenticator
= *r
.out
.return_authenticator
;
899 *sync_context
= *r
.out
.sync_context
;
900 *delta_enum_array
= *r
.out
.delta_enum_array
;
906 NTSTATUS
rpccli_netr_DatabaseRedo(struct rpc_pipe_client
*cli
,
908 const char *logon_server
/* [in] [charset(UTF16)] */,
909 const char *computername
/* [in] [charset(UTF16)] */,
910 struct netr_Authenticator credential
/* [in] */,
911 struct netr_Authenticator
*return_authenticator
/* [in,out] [ref] */,
912 uint8_t *change_log_entry
/* [in] [unique,size_is(change_log_entry_size)] */,
913 uint32_t change_log_entry_size
/* [in] */,
914 struct netr_DELTA_ENUM_ARRAY
*delta_enum_array
/* [out] [ref] */)
916 struct netr_DatabaseRedo r
;
920 r
.in
.logon_server
= logon_server
;
921 r
.in
.computername
= computername
;
922 r
.in
.credential
= credential
;
923 r
.in
.return_authenticator
= return_authenticator
;
924 r
.in
.change_log_entry
= change_log_entry
;
925 r
.in
.change_log_entry_size
= change_log_entry_size
;
927 if (DEBUGLEVEL
>= 10) {
928 NDR_PRINT_IN_DEBUG(netr_DatabaseRedo
, &r
);
931 status
= cli_do_rpc_ndr(cli
,
935 NDR_NETR_DATABASEREDO
,
938 if (!NT_STATUS_IS_OK(status
)) {
942 if (DEBUGLEVEL
>= 10) {
943 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo
, &r
);
946 if (NT_STATUS_IS_ERR(status
)) {
950 /* Return variables */
951 *return_authenticator
= *r
.out
.return_authenticator
;
952 *delta_enum_array
= *r
.out
.delta_enum_array
;
958 NTSTATUS
rpccli_netr_LogonControl2Ex(struct rpc_pipe_client
*cli
,
960 const char *logon_server
/* [in] [unique,charset(UTF16)] */,
961 uint32_t function_code
/* [in] */,
962 uint32_t level
/* [in] */,
963 union netr_CONTROL_DATA_INFORMATION data
/* [in] [switch_is(function_code)] */,
964 union netr_CONTROL_QUERY_INFORMATION
*query
/* [out] [ref,switch_is(level)] */,
967 struct netr_LogonControl2Ex r
;
971 r
.in
.logon_server
= logon_server
;
972 r
.in
.function_code
= function_code
;
976 if (DEBUGLEVEL
>= 10) {
977 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex
, &r
);
980 status
= cli_do_rpc_ndr(cli
,
984 NDR_NETR_LOGONCONTROL2EX
,
987 if (!NT_STATUS_IS_OK(status
)) {
991 if (DEBUGLEVEL
>= 10) {
992 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex
, &r
);
995 if (NT_STATUS_IS_ERR(status
)) {
999 /* Return variables */
1000 *query
= *r
.out
.query
;
1004 *werror
= r
.out
.result
;
1007 return werror_to_ntstatus(r
.out
.result
);
1010 NTSTATUS
rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client
*cli
,
1011 TALLOC_CTX
*mem_ctx
,
1012 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1013 struct netr_Blob
*trusted_domains_blob
/* [out] [ref] */,
1016 struct netr_NetrEnumerateTrustedDomains r
;
1020 r
.in
.server_name
= server_name
;
1022 if (DEBUGLEVEL
>= 10) {
1023 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains
, &r
);
1026 status
= cli_do_rpc_ndr(cli
,
1029 &ndr_table_netlogon
,
1030 NDR_NETR_NETRENUMERATETRUSTEDDOMAINS
,
1033 if (!NT_STATUS_IS_OK(status
)) {
1037 if (DEBUGLEVEL
>= 10) {
1038 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains
, &r
);
1041 if (NT_STATUS_IS_ERR(status
)) {
1045 /* Return variables */
1046 *trusted_domains_blob
= *r
.out
.trusted_domains_blob
;
1050 *werror
= r
.out
.result
;
1053 return werror_to_ntstatus(r
.out
.result
);
1056 NTSTATUS
rpccli_netr_DsRGetDCName(struct rpc_pipe_client
*cli
,
1057 TALLOC_CTX
*mem_ctx
,
1058 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1059 const char *domain_name
/* [in] [unique,charset(UTF16)] */,
1060 struct GUID
*domain_guid
/* [in] [unique] */,
1061 struct GUID
*site_guid
/* [in] [unique] */,
1062 uint32_t flags
/* [in] */,
1063 struct netr_DsRGetDCNameInfo
**info
/* [out] [ref] */,
1066 struct netr_DsRGetDCName r
;
1070 r
.in
.server_unc
= server_unc
;
1071 r
.in
.domain_name
= domain_name
;
1072 r
.in
.domain_guid
= domain_guid
;
1073 r
.in
.site_guid
= site_guid
;
1076 if (DEBUGLEVEL
>= 10) {
1077 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName
, &r
);
1080 status
= cli_do_rpc_ndr(cli
,
1083 &ndr_table_netlogon
,
1084 NDR_NETR_DSRGETDCNAME
,
1087 if (!NT_STATUS_IS_OK(status
)) {
1091 if (DEBUGLEVEL
>= 10) {
1092 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName
, &r
);
1095 if (NT_STATUS_IS_ERR(status
)) {
1099 /* Return variables */
1100 *info
= *r
.out
.info
;
1104 *werror
= r
.out
.result
;
1107 return werror_to_ntstatus(r
.out
.result
);
1110 NTSTATUS
rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client
*cli
,
1111 TALLOC_CTX
*mem_ctx
,
1114 struct netr_NETRLOGONDUMMYROUTINE1 r
;
1119 if (DEBUGLEVEL
>= 10) {
1120 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1
, &r
);
1123 status
= cli_do_rpc_ndr(cli
,
1126 &ndr_table_netlogon
,
1127 NDR_NETR_NETRLOGONDUMMYROUTINE1
,
1130 if (!NT_STATUS_IS_OK(status
)) {
1134 if (DEBUGLEVEL
>= 10) {
1135 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1
, &r
);
1138 if (NT_STATUS_IS_ERR(status
)) {
1142 /* Return variables */
1146 *werror
= r
.out
.result
;
1149 return werror_to_ntstatus(r
.out
.result
);
1152 NTSTATUS
rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client
*cli
,
1153 TALLOC_CTX
*mem_ctx
,
1156 struct netr_NETRLOGONSETSERVICEBITS r
;
1161 if (DEBUGLEVEL
>= 10) {
1162 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS
, &r
);
1165 status
= cli_do_rpc_ndr(cli
,
1168 &ndr_table_netlogon
,
1169 NDR_NETR_NETRLOGONSETSERVICEBITS
,
1172 if (!NT_STATUS_IS_OK(status
)) {
1176 if (DEBUGLEVEL
>= 10) {
1177 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS
, &r
);
1180 if (NT_STATUS_IS_ERR(status
)) {
1184 /* Return variables */
1188 *werror
= r
.out
.result
;
1191 return werror_to_ntstatus(r
.out
.result
);
1194 NTSTATUS
rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client
*cli
,
1195 TALLOC_CTX
*mem_ctx
,
1196 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1197 const char *domain_name
/* [in] [unique,charset(UTF16)] */,
1198 uint32_t *rid
/* [out] [ref] */,
1201 struct netr_LogonGetTrustRid r
;
1205 r
.in
.server_name
= server_name
;
1206 r
.in
.domain_name
= domain_name
;
1208 if (DEBUGLEVEL
>= 10) {
1209 NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid
, &r
);
1212 status
= cli_do_rpc_ndr(cli
,
1215 &ndr_table_netlogon
,
1216 NDR_NETR_LOGONGETTRUSTRID
,
1219 if (!NT_STATUS_IS_OK(status
)) {
1223 if (DEBUGLEVEL
>= 10) {
1224 NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid
, &r
);
1227 if (NT_STATUS_IS_ERR(status
)) {
1231 /* Return variables */
1236 *werror
= r
.out
.result
;
1239 return werror_to_ntstatus(r
.out
.result
);
1242 NTSTATUS
rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client
*cli
,
1243 TALLOC_CTX
*mem_ctx
,
1246 struct netr_NETRLOGONCOMPUTESERVERDIGEST r
;
1251 if (DEBUGLEVEL
>= 10) {
1252 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST
, &r
);
1255 status
= cli_do_rpc_ndr(cli
,
1258 &ndr_table_netlogon
,
1259 NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST
,
1262 if (!NT_STATUS_IS_OK(status
)) {
1266 if (DEBUGLEVEL
>= 10) {
1267 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST
, &r
);
1270 if (NT_STATUS_IS_ERR(status
)) {
1274 /* Return variables */
1278 *werror
= r
.out
.result
;
1281 return werror_to_ntstatus(r
.out
.result
);
1284 NTSTATUS
rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client
*cli
,
1285 TALLOC_CTX
*mem_ctx
,
1288 struct netr_NETRLOGONCOMPUTECLIENTDIGEST r
;
1293 if (DEBUGLEVEL
>= 10) {
1294 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST
, &r
);
1297 status
= cli_do_rpc_ndr(cli
,
1300 &ndr_table_netlogon
,
1301 NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST
,
1304 if (!NT_STATUS_IS_OK(status
)) {
1308 if (DEBUGLEVEL
>= 10) {
1309 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST
, &r
);
1312 if (NT_STATUS_IS_ERR(status
)) {
1316 /* Return variables */
1320 *werror
= r
.out
.result
;
1323 return werror_to_ntstatus(r
.out
.result
);
1326 NTSTATUS
rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client
*cli
,
1327 TALLOC_CTX
*mem_ctx
,
1328 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1329 const char *account_name
/* [in] [charset(UTF16)] */,
1330 enum netr_SchannelType secure_channel_type
/* [in] */,
1331 const char *computer_name
/* [in] [charset(UTF16)] */,
1332 struct netr_Credential
*credentials
/* [in,out] [ref] */,
1333 uint32_t *negotiate_flags
/* [in,out] [ref] */,
1334 uint32_t *rid
/* [out] [ref] */)
1336 struct netr_ServerAuthenticate3 r
;
1340 r
.in
.server_name
= server_name
;
1341 r
.in
.account_name
= account_name
;
1342 r
.in
.secure_channel_type
= secure_channel_type
;
1343 r
.in
.computer_name
= computer_name
;
1344 r
.in
.credentials
= credentials
;
1345 r
.in
.negotiate_flags
= negotiate_flags
;
1347 if (DEBUGLEVEL
>= 10) {
1348 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3
, &r
);
1351 status
= cli_do_rpc_ndr(cli
,
1354 &ndr_table_netlogon
,
1355 NDR_NETR_SERVERAUTHENTICATE3
,
1358 if (!NT_STATUS_IS_OK(status
)) {
1362 if (DEBUGLEVEL
>= 10) {
1363 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3
, &r
);
1366 if (NT_STATUS_IS_ERR(status
)) {
1370 /* Return variables */
1371 *credentials
= *r
.out
.credentials
;
1372 *negotiate_flags
= *r
.out
.negotiate_flags
;
1376 return r
.out
.result
;
1379 NTSTATUS
rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client
*cli
,
1380 TALLOC_CTX
*mem_ctx
,
1381 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1382 const char *domain_name
/* [in] [unique,charset(UTF16)] */,
1383 struct GUID
*domain_guid
/* [in] [unique] */,
1384 const char *site_name
/* [in] [unique,charset(UTF16)] */,
1385 uint32_t flags
/* [in] */,
1386 struct netr_DsRGetDCNameInfo
**info
/* [out] [ref] */,
1389 struct netr_DsRGetDCNameEx r
;
1393 r
.in
.server_unc
= server_unc
;
1394 r
.in
.domain_name
= domain_name
;
1395 r
.in
.domain_guid
= domain_guid
;
1396 r
.in
.site_name
= site_name
;
1399 if (DEBUGLEVEL
>= 10) {
1400 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx
, &r
);
1403 status
= cli_do_rpc_ndr(cli
,
1406 &ndr_table_netlogon
,
1407 NDR_NETR_DSRGETDCNAMEEX
,
1410 if (!NT_STATUS_IS_OK(status
)) {
1414 if (DEBUGLEVEL
>= 10) {
1415 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx
, &r
);
1418 if (NT_STATUS_IS_ERR(status
)) {
1422 /* Return variables */
1423 *info
= *r
.out
.info
;
1427 *werror
= r
.out
.result
;
1430 return werror_to_ntstatus(r
.out
.result
);
1433 NTSTATUS
rpccli_netr_DsRGetSiteName(struct rpc_pipe_client
*cli
,
1434 TALLOC_CTX
*mem_ctx
,
1435 const char *computer_name
/* [in] [unique,charset(UTF16)] */,
1436 const char **site
/* [out] [ref,charset(UTF16)] */,
1439 struct netr_DsRGetSiteName r
;
1443 r
.in
.computer_name
= computer_name
;
1445 if (DEBUGLEVEL
>= 10) {
1446 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName
, &r
);
1449 status
= cli_do_rpc_ndr(cli
,
1452 &ndr_table_netlogon
,
1453 NDR_NETR_DSRGETSITENAME
,
1456 if (!NT_STATUS_IS_OK(status
)) {
1460 if (DEBUGLEVEL
>= 10) {
1461 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName
, &r
);
1464 if (NT_STATUS_IS_ERR(status
)) {
1468 /* Return variables */
1469 *site
= *r
.out
.site
;
1473 *werror
= r
.out
.result
;
1476 return werror_to_ntstatus(r
.out
.result
);
1479 NTSTATUS
rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client
*cli
,
1480 TALLOC_CTX
*mem_ctx
,
1481 const char *server_name
/* [in] [charset(UTF16)] */,
1482 const char *computer_name
/* [in] [unique,charset(UTF16)] */,
1483 struct netr_Authenticator
*credential
/* [in] [ref] */,
1484 struct netr_Authenticator
*return_authenticator
/* [in,out] [ref] */,
1485 uint32_t level
/* [in] */,
1486 union netr_DomainQuery query
/* [in] [switch_is(level)] */,
1487 union netr_DomainInfo
*info
/* [out] [ref,switch_is(level)] */)
1489 struct netr_LogonGetDomainInfo r
;
1493 r
.in
.server_name
= server_name
;
1494 r
.in
.computer_name
= computer_name
;
1495 r
.in
.credential
= credential
;
1496 r
.in
.return_authenticator
= return_authenticator
;
1500 if (DEBUGLEVEL
>= 10) {
1501 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo
, &r
);
1504 status
= cli_do_rpc_ndr(cli
,
1507 &ndr_table_netlogon
,
1508 NDR_NETR_LOGONGETDOMAININFO
,
1511 if (!NT_STATUS_IS_OK(status
)) {
1515 if (DEBUGLEVEL
>= 10) {
1516 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo
, &r
);
1519 if (NT_STATUS_IS_ERR(status
)) {
1523 /* Return variables */
1524 *return_authenticator
= *r
.out
.return_authenticator
;
1525 *info
= *r
.out
.info
;
1528 return r
.out
.result
;
1531 NTSTATUS
rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client
*cli
,
1532 TALLOC_CTX
*mem_ctx
,
1533 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1534 const char *account_name
/* [in] [charset(UTF16)] */,
1535 enum netr_SchannelType secure_channel_type
/* [in] */,
1536 const char *computer_name
/* [in] [charset(UTF16)] */,
1537 struct netr_Authenticator
*credential
/* [in] [ref] */,
1538 struct netr_Authenticator
*return_authenticator
/* [out] [ref] */,
1539 struct netr_CryptPassword
*new_password
/* [in] [ref] */)
1541 struct netr_ServerPasswordSet2 r
;
1545 r
.in
.server_name
= server_name
;
1546 r
.in
.account_name
= account_name
;
1547 r
.in
.secure_channel_type
= secure_channel_type
;
1548 r
.in
.computer_name
= computer_name
;
1549 r
.in
.credential
= credential
;
1550 r
.in
.new_password
= new_password
;
1552 if (DEBUGLEVEL
>= 10) {
1553 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2
, &r
);
1556 status
= cli_do_rpc_ndr(cli
,
1559 &ndr_table_netlogon
,
1560 NDR_NETR_SERVERPASSWORDSET2
,
1563 if (!NT_STATUS_IS_OK(status
)) {
1567 if (DEBUGLEVEL
>= 10) {
1568 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2
, &r
);
1571 if (NT_STATUS_IS_ERR(status
)) {
1575 /* Return variables */
1576 *return_authenticator
= *r
.out
.return_authenticator
;
1579 return r
.out
.result
;
1582 NTSTATUS
rpccli_netr_ServerPasswordGet(struct rpc_pipe_client
*cli
,
1583 TALLOC_CTX
*mem_ctx
,
1584 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1585 const char *account_name
/* [in] [charset(UTF16)] */,
1586 enum netr_SchannelType secure_channel_type
/* [in] */,
1587 const char *computer_name
/* [in] [charset(UTF16)] */,
1588 struct netr_Authenticator
*credential
/* [in] [ref] */,
1589 struct netr_Authenticator
*return_authenticator
/* [out] [ref] */,
1590 struct samr_Password
*password
/* [out] [ref] */,
1593 struct netr_ServerPasswordGet r
;
1597 r
.in
.server_name
= server_name
;
1598 r
.in
.account_name
= account_name
;
1599 r
.in
.secure_channel_type
= secure_channel_type
;
1600 r
.in
.computer_name
= computer_name
;
1601 r
.in
.credential
= credential
;
1603 if (DEBUGLEVEL
>= 10) {
1604 NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet
, &r
);
1607 status
= cli_do_rpc_ndr(cli
,
1610 &ndr_table_netlogon
,
1611 NDR_NETR_SERVERPASSWORDGET
,
1614 if (!NT_STATUS_IS_OK(status
)) {
1618 if (DEBUGLEVEL
>= 10) {
1619 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet
, &r
);
1622 if (NT_STATUS_IS_ERR(status
)) {
1626 /* Return variables */
1627 *return_authenticator
= *r
.out
.return_authenticator
;
1628 *password
= *r
.out
.password
;
1632 *werror
= r
.out
.result
;
1635 return werror_to_ntstatus(r
.out
.result
);
1638 NTSTATUS
rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client
*cli
,
1639 TALLOC_CTX
*mem_ctx
,
1642 struct netr_NETRLOGONSENDTOSAM r
;
1647 if (DEBUGLEVEL
>= 10) {
1648 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM
, &r
);
1651 status
= cli_do_rpc_ndr(cli
,
1654 &ndr_table_netlogon
,
1655 NDR_NETR_NETRLOGONSENDTOSAM
,
1658 if (!NT_STATUS_IS_OK(status
)) {
1662 if (DEBUGLEVEL
>= 10) {
1663 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM
, &r
);
1666 if (NT_STATUS_IS_ERR(status
)) {
1670 /* Return variables */
1674 *werror
= r
.out
.result
;
1677 return werror_to_ntstatus(r
.out
.result
);
1680 NTSTATUS
rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client
*cli
,
1681 TALLOC_CTX
*mem_ctx
,
1682 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1683 uint32_t count
/* [in] [range(0,32000)] */,
1684 struct netr_DsRAddress
*addresses
/* [in] [ref,size_is(count)] */,
1685 struct netr_DsRAddressToSitenamesWCtr
**ctr
/* [out] [ref] */,
1688 struct netr_DsRAddressToSitenamesW r
;
1692 r
.in
.server_name
= server_name
;
1694 r
.in
.addresses
= addresses
;
1696 if (DEBUGLEVEL
>= 10) {
1697 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW
, &r
);
1700 status
= cli_do_rpc_ndr(cli
,
1703 &ndr_table_netlogon
,
1704 NDR_NETR_DSRADDRESSTOSITENAMESW
,
1707 if (!NT_STATUS_IS_OK(status
)) {
1711 if (DEBUGLEVEL
>= 10) {
1712 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW
, &r
);
1715 if (NT_STATUS_IS_ERR(status
)) {
1719 /* Return variables */
1724 *werror
= r
.out
.result
;
1727 return werror_to_ntstatus(r
.out
.result
);
1730 NTSTATUS
rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client
*cli
,
1731 TALLOC_CTX
*mem_ctx
,
1732 const char *server_unc
/* [in] [unique,charset(UTF16)] */,
1733 const char *client_account
/* [in] [unique,charset(UTF16)] */,
1734 uint32_t mask
/* [in] */,
1735 const char *domain_name
/* [in] [unique,charset(UTF16)] */,
1736 struct GUID
*domain_guid
/* [in] [unique] */,
1737 const char *site_name
/* [in] [unique,charset(UTF16)] */,
1738 uint32_t flags
/* [in] */,
1739 struct netr_DsRGetDCNameInfo
**info
/* [out] [ref] */,
1742 struct netr_DsRGetDCNameEx2 r
;
1746 r
.in
.server_unc
= server_unc
;
1747 r
.in
.client_account
= client_account
;
1749 r
.in
.domain_name
= domain_name
;
1750 r
.in
.domain_guid
= domain_guid
;
1751 r
.in
.site_name
= site_name
;
1754 if (DEBUGLEVEL
>= 10) {
1755 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2
, &r
);
1758 status
= cli_do_rpc_ndr(cli
,
1761 &ndr_table_netlogon
,
1762 NDR_NETR_DSRGETDCNAMEEX2
,
1765 if (!NT_STATUS_IS_OK(status
)) {
1769 if (DEBUGLEVEL
>= 10) {
1770 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2
, &r
);
1773 if (NT_STATUS_IS_ERR(status
)) {
1777 /* Return variables */
1778 *info
= *r
.out
.info
;
1782 *werror
= r
.out
.result
;
1785 return werror_to_ntstatus(r
.out
.result
);
1788 NTSTATUS
rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client
*cli
,
1789 TALLOC_CTX
*mem_ctx
,
1792 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r
;
1797 if (DEBUGLEVEL
>= 10) {
1798 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, &r
);
1801 status
= cli_do_rpc_ndr(cli
,
1804 &ndr_table_netlogon
,
1805 NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN
,
1808 if (!NT_STATUS_IS_OK(status
)) {
1812 if (DEBUGLEVEL
>= 10) {
1813 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
, &r
);
1816 if (NT_STATUS_IS_ERR(status
)) {
1820 /* Return variables */
1824 *werror
= r
.out
.result
;
1827 return werror_to_ntstatus(r
.out
.result
);
1830 NTSTATUS
rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client
*cli
,
1831 TALLOC_CTX
*mem_ctx
,
1832 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1833 struct netr_DomainTrustList
*dom_trust_list
/* [out] [ref] */,
1836 struct netr_NetrEnumerateTrustedDomainsEx r
;
1840 r
.in
.server_name
= server_name
;
1842 if (DEBUGLEVEL
>= 10) {
1843 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx
, &r
);
1846 status
= cli_do_rpc_ndr(cli
,
1849 &ndr_table_netlogon
,
1850 NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX
,
1853 if (!NT_STATUS_IS_OK(status
)) {
1857 if (DEBUGLEVEL
>= 10) {
1858 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx
, &r
);
1861 if (NT_STATUS_IS_ERR(status
)) {
1865 /* Return variables */
1866 *dom_trust_list
= *r
.out
.dom_trust_list
;
1870 *werror
= r
.out
.result
;
1873 return werror_to_ntstatus(r
.out
.result
);
1876 NTSTATUS
rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client
*cli
,
1877 TALLOC_CTX
*mem_ctx
,
1878 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1879 uint32_t count
/* [in] [range(0,32000)] */,
1880 struct netr_DsRAddress
*addresses
/* [in] [ref,size_is(count)] */,
1881 struct netr_DsRAddressToSitenamesExWCtr
**ctr
/* [out] [ref] */,
1884 struct netr_DsRAddressToSitenamesExW r
;
1888 r
.in
.server_name
= server_name
;
1890 r
.in
.addresses
= addresses
;
1892 if (DEBUGLEVEL
>= 10) {
1893 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW
, &r
);
1896 status
= cli_do_rpc_ndr(cli
,
1899 &ndr_table_netlogon
,
1900 NDR_NETR_DSRADDRESSTOSITENAMESEXW
,
1903 if (!NT_STATUS_IS_OK(status
)) {
1907 if (DEBUGLEVEL
>= 10) {
1908 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW
, &r
);
1911 if (NT_STATUS_IS_ERR(status
)) {
1915 /* Return variables */
1920 *werror
= r
.out
.result
;
1923 return werror_to_ntstatus(r
.out
.result
);
1926 NTSTATUS
rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client
*cli
,
1927 TALLOC_CTX
*mem_ctx
,
1928 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1929 struct DcSitesCtr
*ctr
/* [out] [ref] */,
1932 struct netr_DsrGetDcSiteCoverageW r
;
1936 r
.in
.server_name
= server_name
;
1938 if (DEBUGLEVEL
>= 10) {
1939 NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW
, &r
);
1942 status
= cli_do_rpc_ndr(cli
,
1945 &ndr_table_netlogon
,
1946 NDR_NETR_DSRGETDCSITECOVERAGEW
,
1949 if (!NT_STATUS_IS_OK(status
)) {
1953 if (DEBUGLEVEL
>= 10) {
1954 NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW
, &r
);
1957 if (NT_STATUS_IS_ERR(status
)) {
1961 /* Return variables */
1966 *werror
= r
.out
.result
;
1969 return werror_to_ntstatus(r
.out
.result
);
1972 NTSTATUS
rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client
*cli
,
1973 TALLOC_CTX
*mem_ctx
,
1974 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1975 const char *computer_name
/* [in] [unique,charset(UTF16)] */,
1976 enum netr_LogonLevel logon_level
/* [in] */,
1977 union netr_LogonInfo
*logon
/* [in] [ref,switch_is(logon_level)] */,
1978 uint16_t validation_level
/* [in] */,
1979 union netr_Validation
*validation
/* [out] [ref,switch_is(validation_level)] */,
1980 uint8_t *authoritative
/* [out] [ref] */,
1981 uint32_t *flags
/* [in,out] [ref] */)
1983 struct netr_LogonSamLogonEx r
;
1987 r
.in
.server_name
= server_name
;
1988 r
.in
.computer_name
= computer_name
;
1989 r
.in
.logon_level
= logon_level
;
1991 r
.in
.validation_level
= validation_level
;
1994 if (DEBUGLEVEL
>= 10) {
1995 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx
, &r
);
1998 status
= cli_do_rpc_ndr(cli
,
2001 &ndr_table_netlogon
,
2002 NDR_NETR_LOGONSAMLOGONEX
,
2005 if (!NT_STATUS_IS_OK(status
)) {
2009 if (DEBUGLEVEL
>= 10) {
2010 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx
, &r
);
2013 if (NT_STATUS_IS_ERR(status
)) {
2017 /* Return variables */
2018 *validation
= *r
.out
.validation
;
2019 *authoritative
= *r
.out
.authoritative
;
2020 *flags
= *r
.out
.flags
;
2023 return r
.out
.result
;
2026 NTSTATUS
rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client
*cli
,
2027 TALLOC_CTX
*mem_ctx
,
2028 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2029 uint32_t trust_flags
/* [in] */,
2030 struct netr_DomainTrustList
*trusts
/* [out] [ref] */,
2033 struct netr_DsrEnumerateDomainTrusts r
;
2037 r
.in
.server_name
= server_name
;
2038 r
.in
.trust_flags
= trust_flags
;
2040 if (DEBUGLEVEL
>= 10) {
2041 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts
, &r
);
2044 status
= cli_do_rpc_ndr(cli
,
2047 &ndr_table_netlogon
,
2048 NDR_NETR_DSRENUMERATEDOMAINTRUSTS
,
2051 if (!NT_STATUS_IS_OK(status
)) {
2055 if (DEBUGLEVEL
>= 10) {
2056 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts
, &r
);
2059 if (NT_STATUS_IS_ERR(status
)) {
2063 /* Return variables */
2064 *trusts
= *r
.out
.trusts
;
2068 *werror
= r
.out
.result
;
2071 return werror_to_ntstatus(r
.out
.result
);
2074 NTSTATUS
rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client
*cli
,
2075 TALLOC_CTX
*mem_ctx
,
2076 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2077 const char *domain
/* [in] [unique,charset(UTF16)] */,
2078 struct GUID
*domain_guid
/* [in] [unique] */,
2079 struct GUID
*dsa_guid
/* [in] [unique] */,
2080 const char *dns_host
/* [in] [ref,charset(UTF16)] */,
2083 struct netr_DsrDeregisterDNSHostRecords r
;
2087 r
.in
.server_name
= server_name
;
2088 r
.in
.domain
= domain
;
2089 r
.in
.domain_guid
= domain_guid
;
2090 r
.in
.dsa_guid
= dsa_guid
;
2091 r
.in
.dns_host
= dns_host
;
2093 if (DEBUGLEVEL
>= 10) {
2094 NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords
, &r
);
2097 status
= cli_do_rpc_ndr(cli
,
2100 &ndr_table_netlogon
,
2101 NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS
,
2104 if (!NT_STATUS_IS_OK(status
)) {
2108 if (DEBUGLEVEL
>= 10) {
2109 NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords
, &r
);
2112 if (NT_STATUS_IS_ERR(status
)) {
2116 /* Return variables */
2120 *werror
= r
.out
.result
;
2123 return werror_to_ntstatus(r
.out
.result
);
2126 NTSTATUS
rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client
*cli
,
2127 TALLOC_CTX
*mem_ctx
,
2128 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2129 const char *account_name
/* [in] [charset(UTF16)] */,
2130 enum netr_SchannelType secure_channel_type
/* [in] */,
2131 const char *computer_name
/* [in] [charset(UTF16)] */,
2132 struct netr_Authenticator
*credential
/* [in] [ref] */,
2133 struct netr_Authenticator
*return_authenticator
/* [out] [ref] */,
2134 struct samr_Password
*password
/* [out] [ref] */,
2135 struct samr_Password
*password2
/* [out] [ref] */)
2137 struct netr_ServerTrustPasswordsGet r
;
2141 r
.in
.server_name
= server_name
;
2142 r
.in
.account_name
= account_name
;
2143 r
.in
.secure_channel_type
= secure_channel_type
;
2144 r
.in
.computer_name
= computer_name
;
2145 r
.in
.credential
= credential
;
2147 if (DEBUGLEVEL
>= 10) {
2148 NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet
, &r
);
2151 status
= cli_do_rpc_ndr(cli
,
2154 &ndr_table_netlogon
,
2155 NDR_NETR_SERVERTRUSTPASSWORDSGET
,
2158 if (!NT_STATUS_IS_OK(status
)) {
2162 if (DEBUGLEVEL
>= 10) {
2163 NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet
, &r
);
2166 if (NT_STATUS_IS_ERR(status
)) {
2170 /* Return variables */
2171 *return_authenticator
= *r
.out
.return_authenticator
;
2172 *password
= *r
.out
.password
;
2173 *password2
= *r
.out
.password2
;
2176 return r
.out
.result
;
2179 NTSTATUS
rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client
*cli
,
2180 TALLOC_CTX
*mem_ctx
,
2181 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2182 const char *trusted_domain_name
/* [in] [unique,charset(UTF16)] */,
2183 uint32_t flags
/* [in] */,
2184 struct lsa_ForestTrustInformation
**forest_trust_info
/* [out] [ref] */,
2187 struct netr_DsRGetForestTrustInformation r
;
2191 r
.in
.server_name
= server_name
;
2192 r
.in
.trusted_domain_name
= trusted_domain_name
;
2195 if (DEBUGLEVEL
>= 10) {
2196 NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation
, &r
);
2199 status
= cli_do_rpc_ndr(cli
,
2202 &ndr_table_netlogon
,
2203 NDR_NETR_DSRGETFORESTTRUSTINFORMATION
,
2206 if (!NT_STATUS_IS_OK(status
)) {
2210 if (DEBUGLEVEL
>= 10) {
2211 NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation
, &r
);
2214 if (NT_STATUS_IS_ERR(status
)) {
2218 /* Return variables */
2219 *forest_trust_info
= *r
.out
.forest_trust_info
;
2223 *werror
= r
.out
.result
;
2226 return werror_to_ntstatus(r
.out
.result
);
2229 NTSTATUS
rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client
*cli
,
2230 TALLOC_CTX
*mem_ctx
,
2231 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2232 const char *trusted_domain_name
/* [in] [ref,charset(UTF16)] */,
2233 struct netr_Authenticator
*credential
/* [in] [ref] */,
2234 struct netr_Authenticator
*return_authenticator
/* [out] [ref] */,
2235 uint32_t flags
/* [in] */,
2236 struct lsa_ForestTrustInformation
**forest_trust_info
/* [out] [ref] */,
2239 struct netr_GetForestTrustInformation r
;
2243 r
.in
.server_name
= server_name
;
2244 r
.in
.trusted_domain_name
= trusted_domain_name
;
2245 r
.in
.credential
= credential
;
2248 if (DEBUGLEVEL
>= 10) {
2249 NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation
, &r
);
2252 status
= cli_do_rpc_ndr(cli
,
2255 &ndr_table_netlogon
,
2256 NDR_NETR_GETFORESTTRUSTINFORMATION
,
2259 if (!NT_STATUS_IS_OK(status
)) {
2263 if (DEBUGLEVEL
>= 10) {
2264 NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation
, &r
);
2267 if (NT_STATUS_IS_ERR(status
)) {
2271 /* Return variables */
2272 *return_authenticator
= *r
.out
.return_authenticator
;
2273 *forest_trust_info
= *r
.out
.forest_trust_info
;
2277 *werror
= r
.out
.result
;
2280 return werror_to_ntstatus(r
.out
.result
);
2283 NTSTATUS
rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client
*cli
,
2284 TALLOC_CTX
*mem_ctx
,
2285 const char *server_name
/* [in] [unique,charset(UTF16)] */,
2286 const char *computer_name
/* [in] [unique,charset(UTF16)] */,
2287 struct netr_Authenticator
*credential
/* [in] [unique] */,
2288 struct netr_Authenticator
*return_authenticator
/* [in,out] [unique] */,
2289 enum netr_LogonLevel logon_level
/* [in] */,
2290 union netr_LogonInfo logon
/* [in] [switch_is(logon_level)] */,
2291 uint16_t validation_level
/* [in] */,
2292 union netr_Validation
*validation
/* [out] [ref,switch_is(validation_level)] */,
2293 uint8_t *authoritative
/* [out] [ref] */,
2294 uint32_t *flags
/* [in,out] [ref] */)
2296 struct netr_LogonSamLogonWithFlags r
;
2300 r
.in
.server_name
= server_name
;
2301 r
.in
.computer_name
= computer_name
;
2302 r
.in
.credential
= credential
;
2303 r
.in
.return_authenticator
= return_authenticator
;
2304 r
.in
.logon_level
= logon_level
;
2306 r
.in
.validation_level
= validation_level
;
2309 if (DEBUGLEVEL
>= 10) {
2310 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags
, &r
);
2313 status
= cli_do_rpc_ndr(cli
,
2316 &ndr_table_netlogon
,
2317 NDR_NETR_LOGONSAMLOGONWITHFLAGS
,
2320 if (!NT_STATUS_IS_OK(status
)) {
2324 if (DEBUGLEVEL
>= 10) {
2325 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags
, &r
);
2328 if (NT_STATUS_IS_ERR(status
)) {
2332 /* Return variables */
2333 if (return_authenticator
&& r
.out
.return_authenticator
) {
2334 *return_authenticator
= *r
.out
.return_authenticator
;
2336 *validation
= *r
.out
.validation
;
2337 *authoritative
= *r
.out
.authoritative
;
2338 *flags
= *r
.out
.flags
;
2341 return r
.out
.result
;
2344 NTSTATUS
rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client
*cli
,
2345 TALLOC_CTX
*mem_ctx
,
2348 struct netr_NETRSERVERGETTRUSTINFO r
;
2353 if (DEBUGLEVEL
>= 10) {
2354 NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO
, &r
);
2357 status
= cli_do_rpc_ndr(cli
,
2360 &ndr_table_netlogon
,
2361 NDR_NETR_NETRSERVERGETTRUSTINFO
,
2364 if (!NT_STATUS_IS_OK(status
)) {
2368 if (DEBUGLEVEL
>= 10) {
2369 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO
, &r
);
2372 if (NT_STATUS_IS_ERR(status
)) {
2376 /* Return variables */
2380 *werror
= r
.out
.result
;
2383 return werror_to_ntstatus(r
.out
.result
);