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,
12 const char *account_name,
13 const char *workstation,
14 struct netr_UasInfo *info,
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,
62 const char *account_name,
63 const char *workstation,
64 struct netr_UasLogoffInfo *info,
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,
112 const char *computer_name,
113 struct netr_Authenticator *credential,
114 struct netr_Authenticator *return_authenticator,
115 uint16_t logon_level,
116 union netr_LogonLevel logon,
117 uint16_t validation_level,
118 union netr_Validation *validation,
119 uint8_t *authoritative)
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,
170 const char *computer_name,
171 struct netr_Authenticator *credential,
172 struct netr_Authenticator *return_authenticator,
173 uint16_t logon_level,
174 union netr_LogonLevel logon)
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,
222 const char *computer_name,
223 struct netr_Credential *credentials)
225 struct netr_ServerReqChallenge r;
229 r.in.server_name = server_name;
230 r.in.computer_name = computer_name;
231 r.in.credentials = credentials;
233 if (DEBUGLEVEL >= 10) {
234 NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge, &r);
237 status = cli_do_rpc_ndr(cli,
241 NDR_NETR_SERVERREQCHALLENGE,
244 if (!NT_STATUS_IS_OK(status)) {
248 if (DEBUGLEVEL >= 10) {
249 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, &r);
252 if (NT_STATUS_IS_ERR(status)) {
256 /* Return variables */
257 *credentials = *r.out.credentials;
263 NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
265 const char *server_name,
266 const char *account_name,
267 enum netr_SchannelType secure_channel_type,
268 const char *computer_name,
269 struct netr_Credential *credentials)
271 struct netr_ServerAuthenticate r;
275 r.in.server_name = server_name;
276 r.in.account_name = account_name;
277 r.in.secure_channel_type = secure_channel_type;
278 r.in.computer_name = computer_name;
279 r.in.credentials = credentials;
281 if (DEBUGLEVEL >= 10) {
282 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate, &r);
285 status = cli_do_rpc_ndr(cli,
289 NDR_NETR_SERVERAUTHENTICATE,
292 if (!NT_STATUS_IS_OK(status)) {
296 if (DEBUGLEVEL >= 10) {
297 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, &r);
300 if (NT_STATUS_IS_ERR(status)) {
304 /* Return variables */
305 *credentials = *r.out.credentials;
311 NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
313 const char *server_name,
314 const char *account_name,
315 enum netr_SchannelType secure_channel_type,
316 const char *computer_name,
317 struct netr_Authenticator credential,
318 struct samr_Password new_password,
319 struct netr_Authenticator *return_authenticator)
321 struct netr_ServerPasswordSet r;
325 r.in.server_name = server_name;
326 r.in.account_name = account_name;
327 r.in.secure_channel_type = secure_channel_type;
328 r.in.computer_name = computer_name;
329 r.in.credential = credential;
330 r.in.new_password = new_password;
332 if (DEBUGLEVEL >= 10) {
333 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, &r);
336 status = cli_do_rpc_ndr(cli,
340 NDR_NETR_SERVERPASSWORDSET,
343 if (!NT_STATUS_IS_OK(status)) {
347 if (DEBUGLEVEL >= 10) {
348 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, &r);
351 if (NT_STATUS_IS_ERR(status)) {
355 /* Return variables */
356 *return_authenticator = *r.out.return_authenticator;
362 NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli,
364 const char *logon_server,
365 const char *computername,
366 struct netr_Authenticator credential,
367 struct netr_Authenticator *return_authenticator,
368 enum netr_SamDatabaseID database_id,
369 uint64_t *sequence_num,
370 uint32_t preferredmaximumlength,
371 struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
373 struct netr_DatabaseDeltas r;
377 r.in.logon_server = logon_server;
378 r.in.computername = computername;
379 r.in.credential = credential;
380 r.in.return_authenticator = return_authenticator;
381 r.in.database_id = database_id;
382 r.in.sequence_num = sequence_num;
383 r.in.preferredmaximumlength = preferredmaximumlength;
385 if (DEBUGLEVEL >= 10) {
386 NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas, &r);
389 status = cli_do_rpc_ndr(cli,
393 NDR_NETR_DATABASEDELTAS,
396 if (!NT_STATUS_IS_OK(status)) {
400 if (DEBUGLEVEL >= 10) {
401 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, &r);
404 if (NT_STATUS_IS_ERR(status)) {
408 /* Return variables */
409 *return_authenticator = *r.out.return_authenticator;
410 *sequence_num = *r.out.sequence_num;
411 *delta_enum_array = *r.out.delta_enum_array;
417 NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli,
419 const char *logon_server,
420 const char *computername,
421 struct netr_Authenticator credential,
422 struct netr_Authenticator *return_authenticator,
423 enum netr_SamDatabaseID database_id,
424 uint32_t *sync_context,
425 uint32_t preferredmaximumlength,
426 struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
428 struct netr_DatabaseSync r;
432 r.in.logon_server = logon_server;
433 r.in.computername = computername;
434 r.in.credential = credential;
435 r.in.return_authenticator = return_authenticator;
436 r.in.database_id = database_id;
437 r.in.sync_context = sync_context;
438 r.in.preferredmaximumlength = preferredmaximumlength;
440 if (DEBUGLEVEL >= 10) {
441 NDR_PRINT_IN_DEBUG(netr_DatabaseSync, &r);
444 status = cli_do_rpc_ndr(cli,
448 NDR_NETR_DATABASESYNC,
451 if (!NT_STATUS_IS_OK(status)) {
455 if (DEBUGLEVEL >= 10) {
456 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, &r);
459 if (NT_STATUS_IS_ERR(status)) {
463 /* Return variables */
464 *return_authenticator = *r.out.return_authenticator;
465 *sync_context = *r.out.sync_context;
466 *delta_enum_array = *r.out.delta_enum_array;
472 NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli,
474 const char *logon_server,
475 const char *computername,
476 struct netr_Authenticator credential,
477 struct netr_Authenticator *return_authenticator,
478 struct netr_UAS_INFO_0 uas,
482 struct netr_AccountBuffer *buffer,
483 uint32_t *count_returned,
484 uint32_t *total_entries,
485 struct netr_UAS_INFO_0 *recordid)
487 struct netr_AccountDeltas r;
491 r.in.logon_server = logon_server;
492 r.in.computername = computername;
493 r.in.credential = credential;
494 r.in.return_authenticator = return_authenticator;
498 r.in.buffersize = buffersize;
500 if (DEBUGLEVEL >= 10) {
501 NDR_PRINT_IN_DEBUG(netr_AccountDeltas, &r);
504 status = cli_do_rpc_ndr(cli,
508 NDR_NETR_ACCOUNTDELTAS,
511 if (!NT_STATUS_IS_OK(status)) {
515 if (DEBUGLEVEL >= 10) {
516 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, &r);
519 if (NT_STATUS_IS_ERR(status)) {
523 /* Return variables */
524 *return_authenticator = *r.out.return_authenticator;
525 *buffer = *r.out.buffer;
526 *count_returned = *r.out.count_returned;
527 *total_entries = *r.out.total_entries;
528 *recordid = *r.out.recordid;
534 NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli,
536 const char *logon_server,
537 const char *computername,
538 struct netr_Authenticator credential,
539 struct netr_Authenticator *return_authenticator,
543 struct netr_AccountBuffer *buffer,
544 uint32_t *count_returned,
545 uint32_t *total_entries,
546 uint32_t *next_reference,
547 struct netr_UAS_INFO_0 *recordid)
549 struct netr_AccountSync r;
553 r.in.logon_server = logon_server;
554 r.in.computername = computername;
555 r.in.credential = credential;
556 r.in.return_authenticator = return_authenticator;
557 r.in.reference = reference;
559 r.in.buffersize = buffersize;
560 r.in.recordid = recordid;
562 if (DEBUGLEVEL >= 10) {
563 NDR_PRINT_IN_DEBUG(netr_AccountSync, &r);
566 status = cli_do_rpc_ndr(cli,
570 NDR_NETR_ACCOUNTSYNC,
573 if (!NT_STATUS_IS_OK(status)) {
577 if (DEBUGLEVEL >= 10) {
578 NDR_PRINT_OUT_DEBUG(netr_AccountSync, &r);
581 if (NT_STATUS_IS_ERR(status)) {
585 /* Return variables */
586 *return_authenticator = *r.out.return_authenticator;
587 *buffer = *r.out.buffer;
588 *count_returned = *r.out.count_returned;
589 *total_entries = *r.out.total_entries;
590 *next_reference = *r.out.next_reference;
591 *recordid = *r.out.recordid;
597 NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli,
599 const char *logon_server,
600 const char *domainname,
603 struct netr_GetDcName r;
607 r.in.logon_server = logon_server;
608 r.in.domainname = domainname;
610 if (DEBUGLEVEL >= 10) {
611 NDR_PRINT_IN_DEBUG(netr_GetDcName, &r);
614 status = cli_do_rpc_ndr(cli,
621 if (!NT_STATUS_IS_OK(status)) {
625 if (DEBUGLEVEL >= 10) {
626 NDR_PRINT_OUT_DEBUG(netr_GetDcName, &r);
629 if (NT_STATUS_IS_ERR(status)) {
633 /* Return variables */
634 *dcname = *r.out.dcname;
640 NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli,
642 const char *logon_server,
643 enum netr_LogonControlCode function_code,
645 union netr_CONTROL_QUERY_INFORMATION *info,
648 struct netr_LogonControl r;
652 r.in.logon_server = logon_server;
653 r.in.function_code = function_code;
656 if (DEBUGLEVEL >= 10) {
657 NDR_PRINT_IN_DEBUG(netr_LogonControl, &r);
660 status = cli_do_rpc_ndr(cli,
664 NDR_NETR_LOGONCONTROL,
667 if (!NT_STATUS_IS_OK(status)) {
671 if (DEBUGLEVEL >= 10) {
672 NDR_PRINT_OUT_DEBUG(netr_LogonControl, &r);
675 if (NT_STATUS_IS_ERR(status)) {
679 /* Return variables */
684 *werror = r.out.result;
687 return werror_to_ntstatus(r.out.result);
690 NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli,
692 const char *logon_server,
693 const char *domainname,
697 struct netr_GetAnyDCName r;
701 r.in.logon_server = logon_server;
702 r.in.domainname = domainname;
704 if (DEBUGLEVEL >= 10) {
705 NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, &r);
708 status = cli_do_rpc_ndr(cli,
712 NDR_NETR_GETANYDCNAME,
715 if (!NT_STATUS_IS_OK(status)) {
719 if (DEBUGLEVEL >= 10) {
720 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, &r);
723 if (NT_STATUS_IS_ERR(status)) {
727 /* Return variables */
728 *dcname = *r.out.dcname;
732 *werror = r.out.result;
735 return werror_to_ntstatus(r.out.result);
738 NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli,
740 const char *logon_server,
741 uint32_t function_code,
743 union netr_CONTROL_DATA_INFORMATION data,
744 union netr_CONTROL_QUERY_INFORMATION *query,
747 struct netr_LogonControl2 r;
751 r.in.logon_server = logon_server;
752 r.in.function_code = function_code;
756 if (DEBUGLEVEL >= 10) {
757 NDR_PRINT_IN_DEBUG(netr_LogonControl2, &r);
760 status = cli_do_rpc_ndr(cli,
764 NDR_NETR_LOGONCONTROL2,
767 if (!NT_STATUS_IS_OK(status)) {
771 if (DEBUGLEVEL >= 10) {
772 NDR_PRINT_OUT_DEBUG(netr_LogonControl2, &r);
775 if (NT_STATUS_IS_ERR(status)) {
779 /* Return variables */
780 *query = *r.out.query;
784 *werror = r.out.result;
787 return werror_to_ntstatus(r.out.result);
790 NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
792 const char *server_name,
793 const char *account_name,
794 enum netr_SchannelType secure_channel_type,
795 const char *computer_name,
796 struct netr_Credential *credentials,
797 uint32_t *negotiate_flags)
799 struct netr_ServerAuthenticate2 r;
803 r.in.server_name = server_name;
804 r.in.account_name = account_name;
805 r.in.secure_channel_type = secure_channel_type;
806 r.in.computer_name = computer_name;
807 r.in.credentials = credentials;
808 r.in.negotiate_flags = negotiate_flags;
810 if (DEBUGLEVEL >= 10) {
811 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2, &r);
814 status = cli_do_rpc_ndr(cli,
818 NDR_NETR_SERVERAUTHENTICATE2,
821 if (!NT_STATUS_IS_OK(status)) {
825 if (DEBUGLEVEL >= 10) {
826 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, &r);
829 if (NT_STATUS_IS_ERR(status)) {
833 /* Return variables */
834 *credentials = *r.out.credentials;
835 *negotiate_flags = *r.out.negotiate_flags;
841 NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
843 const char *logon_server,
844 const char *computername,
845 struct netr_Authenticator credential,
846 struct netr_Authenticator *return_authenticator,
847 enum netr_SamDatabaseID database_id,
848 uint16_t restart_state,
849 uint32_t *sync_context,
850 uint32_t preferredmaximumlength,
851 struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
853 struct netr_DatabaseSync2 r;
857 r.in.logon_server = logon_server;
858 r.in.computername = computername;
859 r.in.credential = credential;
860 r.in.return_authenticator = return_authenticator;
861 r.in.database_id = database_id;
862 r.in.restart_state = restart_state;
863 r.in.sync_context = sync_context;
864 r.in.preferredmaximumlength = preferredmaximumlength;
866 if (DEBUGLEVEL >= 10) {
867 NDR_PRINT_IN_DEBUG(netr_DatabaseSync2, &r);
870 status = cli_do_rpc_ndr(cli,
874 NDR_NETR_DATABASESYNC2,
877 if (!NT_STATUS_IS_OK(status)) {
881 if (DEBUGLEVEL >= 10) {
882 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, &r);
885 if (NT_STATUS_IS_ERR(status)) {
889 /* Return variables */
890 *return_authenticator = *r.out.return_authenticator;
891 *sync_context = *r.out.sync_context;
892 *delta_enum_array = *r.out.delta_enum_array;
898 NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
900 const char *logon_server,
901 const char *computername,
902 struct netr_Authenticator credential,
903 struct netr_Authenticator *return_authenticator,
904 uint8_t *change_log_entry,
905 uint32_t change_log_entry_size,
906 struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
908 struct netr_DatabaseRedo r;
912 r.in.logon_server = logon_server;
913 r.in.computername = computername;
914 r.in.credential = credential;
915 r.in.return_authenticator = return_authenticator;
916 r.in.change_log_entry = change_log_entry;
917 r.in.change_log_entry_size = change_log_entry_size;
919 if (DEBUGLEVEL >= 10) {
920 NDR_PRINT_IN_DEBUG(netr_DatabaseRedo, &r);
923 status = cli_do_rpc_ndr(cli,
927 NDR_NETR_DATABASEREDO,
930 if (!NT_STATUS_IS_OK(status)) {
934 if (DEBUGLEVEL >= 10) {
935 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, &r);
938 if (NT_STATUS_IS_ERR(status)) {
942 /* Return variables */
943 *return_authenticator = *r.out.return_authenticator;
944 *delta_enum_array = *r.out.delta_enum_array;
950 NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
952 const char *logon_server,
953 uint32_t function_code,
955 union netr_CONTROL_DATA_INFORMATION data,
956 union netr_CONTROL_QUERY_INFORMATION *query,
959 struct netr_LogonControl2Ex r;
963 r.in.logon_server = logon_server;
964 r.in.function_code = function_code;
968 if (DEBUGLEVEL >= 10) {
969 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &r);
972 status = cli_do_rpc_ndr(cli,
976 NDR_NETR_LOGONCONTROL2EX,
979 if (!NT_STATUS_IS_OK(status)) {
983 if (DEBUGLEVEL >= 10) {
984 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, &r);
987 if (NT_STATUS_IS_ERR(status)) {
991 /* Return variables */
992 *query = *r.out.query;
996 *werror = r.out.result;
999 return werror_to_ntstatus(r.out.result);
1002 NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli,
1003 TALLOC_CTX *mem_ctx,
1004 const char *server_name,
1005 struct netr_Blob *trusted_domains_blob,
1008 struct netr_NetrEnumerateTrustedDomains r;
1012 r.in.server_name = server_name;
1014 if (DEBUGLEVEL >= 10) {
1015 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
1018 status = cli_do_rpc_ndr(cli,
1021 &ndr_table_netlogon,
1022 NDR_NETR_NETRENUMERATETRUSTEDDOMAINS,
1025 if (!NT_STATUS_IS_OK(status)) {
1029 if (DEBUGLEVEL >= 10) {
1030 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
1033 if (NT_STATUS_IS_ERR(status)) {
1037 /* Return variables */
1038 *trusted_domains_blob = *r.out.trusted_domains_blob;
1042 *werror = r.out.result;
1045 return werror_to_ntstatus(r.out.result);
1048 NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
1049 TALLOC_CTX *mem_ctx,
1050 const char *server_unc,
1051 const char *domain_name,
1052 struct GUID *domain_guid,
1053 struct GUID *site_guid,
1055 struct netr_DsRGetDCNameInfo *info,
1058 struct netr_DsRGetDCName r;
1062 r.in.server_unc = server_unc;
1063 r.in.domain_name = domain_name;
1064 r.in.domain_guid = domain_guid;
1065 r.in.site_guid = site_guid;
1068 if (DEBUGLEVEL >= 10) {
1069 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &r);
1072 status = cli_do_rpc_ndr(cli,
1075 &ndr_table_netlogon,
1076 NDR_NETR_DSRGETDCNAME,
1079 if (!NT_STATUS_IS_OK(status)) {
1083 if (DEBUGLEVEL >= 10) {
1084 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, &r);
1087 if (NT_STATUS_IS_ERR(status)) {
1091 /* Return variables */
1092 *info = *r.out.info;
1096 *werror = r.out.result;
1099 return werror_to_ntstatus(r.out.result);
1102 NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
1103 TALLOC_CTX *mem_ctx,
1106 struct netr_NETRLOGONDUMMYROUTINE1 r;
1111 if (DEBUGLEVEL >= 10) {
1112 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1115 status = cli_do_rpc_ndr(cli,
1118 &ndr_table_netlogon,
1119 NDR_NETR_NETRLOGONDUMMYROUTINE1,
1122 if (!NT_STATUS_IS_OK(status)) {
1126 if (DEBUGLEVEL >= 10) {
1127 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1130 if (NT_STATUS_IS_ERR(status)) {
1134 /* Return variables */
1138 *werror = r.out.result;
1141 return werror_to_ntstatus(r.out.result);
1144 NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli,
1145 TALLOC_CTX *mem_ctx,
1148 struct netr_NETRLOGONSETSERVICEBITS r;
1153 if (DEBUGLEVEL >= 10) {
1154 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1157 status = cli_do_rpc_ndr(cli,
1160 &ndr_table_netlogon,
1161 NDR_NETR_NETRLOGONSETSERVICEBITS,
1164 if (!NT_STATUS_IS_OK(status)) {
1168 if (DEBUGLEVEL >= 10) {
1169 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1172 if (NT_STATUS_IS_ERR(status)) {
1176 /* Return variables */
1180 *werror = r.out.result;
1183 return werror_to_ntstatus(r.out.result);
1186 NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli,
1187 TALLOC_CTX *mem_ctx,
1190 struct netr_NETRLOGONGETTRUSTRID r;
1195 if (DEBUGLEVEL >= 10) {
1196 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTRUSTRID, &r);
1199 status = cli_do_rpc_ndr(cli,
1202 &ndr_table_netlogon,
1203 NDR_NETR_NETRLOGONGETTRUSTRID,
1206 if (!NT_STATUS_IS_OK(status)) {
1210 if (DEBUGLEVEL >= 10) {
1211 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTRUSTRID, &r);
1214 if (NT_STATUS_IS_ERR(status)) {
1218 /* Return variables */
1222 *werror = r.out.result;
1225 return werror_to_ntstatus(r.out.result);
1228 NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli,
1229 TALLOC_CTX *mem_ctx,
1232 struct netr_NETRLOGONCOMPUTESERVERDIGEST r;
1237 if (DEBUGLEVEL >= 10) {
1238 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1241 status = cli_do_rpc_ndr(cli,
1244 &ndr_table_netlogon,
1245 NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST,
1248 if (!NT_STATUS_IS_OK(status)) {
1252 if (DEBUGLEVEL >= 10) {
1253 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1256 if (NT_STATUS_IS_ERR(status)) {
1260 /* Return variables */
1264 *werror = r.out.result;
1267 return werror_to_ntstatus(r.out.result);
1270 NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli,
1271 TALLOC_CTX *mem_ctx,
1274 struct netr_NETRLOGONCOMPUTECLIENTDIGEST r;
1279 if (DEBUGLEVEL >= 10) {
1280 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1283 status = cli_do_rpc_ndr(cli,
1286 &ndr_table_netlogon,
1287 NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST,
1290 if (!NT_STATUS_IS_OK(status)) {
1294 if (DEBUGLEVEL >= 10) {
1295 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1298 if (NT_STATUS_IS_ERR(status)) {
1302 /* Return variables */
1306 *werror = r.out.result;
1309 return werror_to_ntstatus(r.out.result);
1312 NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli,
1313 TALLOC_CTX *mem_ctx,
1314 const char *server_name,
1315 const char *account_name,
1316 enum netr_SchannelType secure_channel_type,
1317 const char *computer_name,
1318 struct netr_Credential *credentials,
1319 uint32_t *negotiate_flags,
1322 struct netr_ServerAuthenticate3 r;
1326 r.in.server_name = server_name;
1327 r.in.account_name = account_name;
1328 r.in.secure_channel_type = secure_channel_type;
1329 r.in.computer_name = computer_name;
1330 r.in.credentials = credentials;
1331 r.in.negotiate_flags = negotiate_flags;
1333 if (DEBUGLEVEL >= 10) {
1334 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3, &r);
1337 status = cli_do_rpc_ndr(cli,
1340 &ndr_table_netlogon,
1341 NDR_NETR_SERVERAUTHENTICATE3,
1344 if (!NT_STATUS_IS_OK(status)) {
1348 if (DEBUGLEVEL >= 10) {
1349 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, &r);
1352 if (NT_STATUS_IS_ERR(status)) {
1356 /* Return variables */
1357 *credentials = *r.out.credentials;
1358 *negotiate_flags = *r.out.negotiate_flags;
1362 return r.out.result;
1365 NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli,
1366 TALLOC_CTX *mem_ctx,
1367 const char *server_unc,
1368 const char *domain_name,
1369 struct GUID *domain_guid,
1370 const char *site_name,
1372 struct netr_DsRGetDCNameInfo *info,
1375 struct netr_DsRGetDCNameEx r;
1379 r.in.server_unc = server_unc;
1380 r.in.domain_name = domain_name;
1381 r.in.domain_guid = domain_guid;
1382 r.in.site_name = site_name;
1385 if (DEBUGLEVEL >= 10) {
1386 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &r);
1389 status = cli_do_rpc_ndr(cli,
1392 &ndr_table_netlogon,
1393 NDR_NETR_DSRGETDCNAMEEX,
1396 if (!NT_STATUS_IS_OK(status)) {
1400 if (DEBUGLEVEL >= 10) {
1401 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, &r);
1404 if (NT_STATUS_IS_ERR(status)) {
1408 /* Return variables */
1409 *info = *r.out.info;
1413 *werror = r.out.result;
1416 return werror_to_ntstatus(r.out.result);
1419 NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli,
1420 TALLOC_CTX *mem_ctx,
1421 const char *computer_name,
1425 struct netr_DsRGetSiteName r;
1429 r.in.computer_name = computer_name;
1431 if (DEBUGLEVEL >= 10) {
1432 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, &r);
1435 status = cli_do_rpc_ndr(cli,
1438 &ndr_table_netlogon,
1439 NDR_NETR_DSRGETSITENAME,
1442 if (!NT_STATUS_IS_OK(status)) {
1446 if (DEBUGLEVEL >= 10) {
1447 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, &r);
1450 if (NT_STATUS_IS_ERR(status)) {
1454 /* Return variables */
1455 *site = *r.out.site;
1459 *werror = r.out.result;
1462 return werror_to_ntstatus(r.out.result);
1465 NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli,
1466 TALLOC_CTX *mem_ctx,
1467 const char *server_name,
1468 const char *computer_name,
1469 struct netr_Authenticator *credential,
1470 struct netr_Authenticator *return_authenticator,
1472 union netr_DomainQuery query,
1473 union netr_DomainInfo *info)
1475 struct netr_LogonGetDomainInfo r;
1479 r.in.server_name = server_name;
1480 r.in.computer_name = computer_name;
1481 r.in.credential = credential;
1482 r.in.return_authenticator = return_authenticator;
1486 if (DEBUGLEVEL >= 10) {
1487 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, &r);
1490 status = cli_do_rpc_ndr(cli,
1493 &ndr_table_netlogon,
1494 NDR_NETR_LOGONGETDOMAININFO,
1497 if (!NT_STATUS_IS_OK(status)) {
1501 if (DEBUGLEVEL >= 10) {
1502 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, &r);
1505 if (NT_STATUS_IS_ERR(status)) {
1509 /* Return variables */
1510 *return_authenticator = *r.out.return_authenticator;
1511 *info = *r.out.info;
1514 return r.out.result;
1517 NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli,
1518 TALLOC_CTX *mem_ctx,
1519 const char *server_name,
1520 const char *account_name,
1521 enum netr_SchannelType secure_channel_type,
1522 const char *computer_name,
1523 struct netr_Authenticator credential,
1524 struct netr_CryptPassword new_password,
1525 struct netr_Authenticator *return_authenticator)
1527 struct netr_ServerPasswordSet2 r;
1531 r.in.server_name = server_name;
1532 r.in.account_name = account_name;
1533 r.in.secure_channel_type = secure_channel_type;
1534 r.in.computer_name = computer_name;
1535 r.in.credential = credential;
1536 r.in.new_password = new_password;
1538 if (DEBUGLEVEL >= 10) {
1539 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, &r);
1542 status = cli_do_rpc_ndr(cli,
1545 &ndr_table_netlogon,
1546 NDR_NETR_SERVERPASSWORDSET2,
1549 if (!NT_STATUS_IS_OK(status)) {
1553 if (DEBUGLEVEL >= 10) {
1554 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, &r);
1557 if (NT_STATUS_IS_ERR(status)) {
1561 /* Return variables */
1562 *return_authenticator = *r.out.return_authenticator;
1565 return r.out.result;
1568 NTSTATUS rpccli_netr_ServerPasswordGet(struct rpc_pipe_client *cli,
1569 TALLOC_CTX *mem_ctx,
1570 const char *server_name,
1571 const char *account_name,
1572 enum netr_SchannelType secure_channel_type,
1573 const char *computer_name,
1574 struct netr_Authenticator *credential,
1575 struct netr_Authenticator *return_authenticator,
1576 struct samr_Password *password,
1579 struct netr_ServerPasswordGet r;
1583 r.in.server_name = server_name;
1584 r.in.account_name = account_name;
1585 r.in.secure_channel_type = secure_channel_type;
1586 r.in.computer_name = computer_name;
1587 r.in.credential = credential;
1589 if (DEBUGLEVEL >= 10) {
1590 NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, &r);
1593 status = cli_do_rpc_ndr(cli,
1596 &ndr_table_netlogon,
1597 NDR_NETR_SERVERPASSWORDGET,
1600 if (!NT_STATUS_IS_OK(status)) {
1604 if (DEBUGLEVEL >= 10) {
1605 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, &r);
1608 if (NT_STATUS_IS_ERR(status)) {
1612 /* Return variables */
1613 *return_authenticator = *r.out.return_authenticator;
1614 *password = *r.out.password;
1618 *werror = r.out.result;
1621 return werror_to_ntstatus(r.out.result);
1624 NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli,
1625 TALLOC_CTX *mem_ctx,
1628 struct netr_NETRLOGONSENDTOSAM r;
1633 if (DEBUGLEVEL >= 10) {
1634 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1637 status = cli_do_rpc_ndr(cli,
1640 &ndr_table_netlogon,
1641 NDR_NETR_NETRLOGONSENDTOSAM,
1644 if (!NT_STATUS_IS_OK(status)) {
1648 if (DEBUGLEVEL >= 10) {
1649 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1652 if (NT_STATUS_IS_ERR(status)) {
1656 /* Return variables */
1660 *werror = r.out.result;
1663 return werror_to_ntstatus(r.out.result);
1666 NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli,
1667 TALLOC_CTX *mem_ctx,
1668 const char *server_name,
1670 struct netr_DsRAddress *addresses,
1671 struct netr_DsRAddressToSitenamesWCtr **ctr,
1674 struct netr_DsRAddressToSitenamesW r;
1678 r.in.server_name = server_name;
1680 r.in.addresses = addresses;
1682 if (DEBUGLEVEL >= 10) {
1683 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, &r);
1686 status = cli_do_rpc_ndr(cli,
1689 &ndr_table_netlogon,
1690 NDR_NETR_DSRADDRESSTOSITENAMESW,
1693 if (!NT_STATUS_IS_OK(status)) {
1697 if (DEBUGLEVEL >= 10) {
1698 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, &r);
1701 if (NT_STATUS_IS_ERR(status)) {
1705 /* Return variables */
1710 *werror = r.out.result;
1713 return werror_to_ntstatus(r.out.result);
1716 NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli,
1717 TALLOC_CTX *mem_ctx,
1718 const char *server_unc,
1719 const char *client_account,
1721 const char *domain_name,
1722 struct GUID *domain_guid,
1723 const char *site_name,
1725 struct netr_DsRGetDCNameInfo *info,
1728 struct netr_DsRGetDCNameEx2 r;
1732 r.in.server_unc = server_unc;
1733 r.in.client_account = client_account;
1735 r.in.domain_name = domain_name;
1736 r.in.domain_guid = domain_guid;
1737 r.in.site_name = site_name;
1740 if (DEBUGLEVEL >= 10) {
1741 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &r);
1744 status = cli_do_rpc_ndr(cli,
1747 &ndr_table_netlogon,
1748 NDR_NETR_DSRGETDCNAMEEX2,
1751 if (!NT_STATUS_IS_OK(status)) {
1755 if (DEBUGLEVEL >= 10) {
1756 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, &r);
1759 if (NT_STATUS_IS_ERR(status)) {
1763 /* Return variables */
1764 *info = *r.out.info;
1768 *werror = r.out.result;
1771 return werror_to_ntstatus(r.out.result);
1774 NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli,
1775 TALLOC_CTX *mem_ctx,
1778 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r;
1783 if (DEBUGLEVEL >= 10) {
1784 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1787 status = cli_do_rpc_ndr(cli,
1790 &ndr_table_netlogon,
1791 NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
1794 if (!NT_STATUS_IS_OK(status)) {
1798 if (DEBUGLEVEL >= 10) {
1799 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1802 if (NT_STATUS_IS_ERR(status)) {
1806 /* Return variables */
1810 *werror = r.out.result;
1813 return werror_to_ntstatus(r.out.result);
1816 NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli,
1817 TALLOC_CTX *mem_ctx,
1818 const char *server_name,
1819 struct netr_DomainTrustList *dom_trust_list,
1822 struct netr_NetrEnumerateTrustedDomainsEx r;
1826 r.in.server_name = server_name;
1828 if (DEBUGLEVEL >= 10) {
1829 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
1832 status = cli_do_rpc_ndr(cli,
1835 &ndr_table_netlogon,
1836 NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX,
1839 if (!NT_STATUS_IS_OK(status)) {
1843 if (DEBUGLEVEL >= 10) {
1844 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
1847 if (NT_STATUS_IS_ERR(status)) {
1851 /* Return variables */
1852 *dom_trust_list = *r.out.dom_trust_list;
1856 *werror = r.out.result;
1859 return werror_to_ntstatus(r.out.result);
1862 NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli,
1863 TALLOC_CTX *mem_ctx,
1864 const char *server_name,
1866 struct netr_DsRAddress *addresses,
1867 struct netr_DsRAddressToSitenamesExWCtr **ctr,
1870 struct netr_DsRAddressToSitenamesExW r;
1874 r.in.server_name = server_name;
1876 r.in.addresses = addresses;
1878 if (DEBUGLEVEL >= 10) {
1879 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1882 status = cli_do_rpc_ndr(cli,
1885 &ndr_table_netlogon,
1886 NDR_NETR_DSRADDRESSTOSITENAMESEXW,
1889 if (!NT_STATUS_IS_OK(status)) {
1893 if (DEBUGLEVEL >= 10) {
1894 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1897 if (NT_STATUS_IS_ERR(status)) {
1901 /* Return variables */
1906 *werror = r.out.result;
1909 return werror_to_ntstatus(r.out.result);
1912 NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli,
1913 TALLOC_CTX *mem_ctx,
1914 const char *server_name,
1915 struct DcSitesCtr *ctr,
1918 struct netr_DsrGetDcSiteCoverageW r;
1922 r.in.server_name = server_name;
1924 if (DEBUGLEVEL >= 10) {
1925 NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
1928 status = cli_do_rpc_ndr(cli,
1931 &ndr_table_netlogon,
1932 NDR_NETR_DSRGETDCSITECOVERAGEW,
1935 if (!NT_STATUS_IS_OK(status)) {
1939 if (DEBUGLEVEL >= 10) {
1940 NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
1943 if (NT_STATUS_IS_ERR(status)) {
1947 /* Return variables */
1952 *werror = r.out.result;
1955 return werror_to_ntstatus(r.out.result);
1958 NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
1959 TALLOC_CTX *mem_ctx,
1960 const char *server_name,
1961 const char *computer_name,
1962 uint16_t logon_level,
1963 union netr_LogonLevel logon,
1964 uint16_t validation_level,
1965 union netr_Validation *validation,
1966 uint8_t *authoritative,
1969 struct netr_LogonSamLogonEx r;
1973 r.in.server_name = server_name;
1974 r.in.computer_name = computer_name;
1975 r.in.logon_level = logon_level;
1977 r.in.validation_level = validation_level;
1980 if (DEBUGLEVEL >= 10) {
1981 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &r);
1984 status = cli_do_rpc_ndr(cli,
1987 &ndr_table_netlogon,
1988 NDR_NETR_LOGONSAMLOGONEX,
1991 if (!NT_STATUS_IS_OK(status)) {
1995 if (DEBUGLEVEL >= 10) {
1996 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, &r);
1999 if (NT_STATUS_IS_ERR(status)) {
2003 /* Return variables */
2004 *validation = *r.out.validation;
2005 *authoritative = *r.out.authoritative;
2006 *flags = *r.out.flags;
2009 return r.out.result;
2012 NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli,
2013 TALLOC_CTX *mem_ctx,
2014 const char *server_name,
2015 uint32_t trust_flags,
2016 struct netr_DomainTrustList **trusts,
2019 struct netr_DsrEnumerateDomainTrusts r;
2023 r.in.server_name = server_name;
2024 r.in.trust_flags = trust_flags;
2026 if (DEBUGLEVEL >= 10) {
2027 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
2030 status = cli_do_rpc_ndr(cli,
2033 &ndr_table_netlogon,
2034 NDR_NETR_DSRENUMERATEDOMAINTRUSTS,
2037 if (!NT_STATUS_IS_OK(status)) {
2041 if (DEBUGLEVEL >= 10) {
2042 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
2045 if (NT_STATUS_IS_ERR(status)) {
2049 /* Return variables */
2050 *trusts = *r.out.trusts;
2054 *werror = r.out.result;
2057 return werror_to_ntstatus(r.out.result);
2060 NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli,
2061 TALLOC_CTX *mem_ctx,
2064 struct netr_DSRDEREGISTERDNSHOSTRECORDS r;
2069 if (DEBUGLEVEL >= 10) {
2070 NDR_PRINT_IN_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, &r);
2073 status = cli_do_rpc_ndr(cli,
2076 &ndr_table_netlogon,
2077 NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS,
2080 if (!NT_STATUS_IS_OK(status)) {
2084 if (DEBUGLEVEL >= 10) {
2085 NDR_PRINT_OUT_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, &r);
2088 if (NT_STATUS_IS_ERR(status)) {
2092 /* Return variables */
2096 *werror = r.out.result;
2099 return werror_to_ntstatus(r.out.result);
2102 NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli,
2103 TALLOC_CTX *mem_ctx,
2104 const char *server_name,
2105 const char *account_name,
2106 enum netr_SchannelType secure_channel_type,
2107 const char *computer_name,
2108 struct netr_Authenticator *credential,
2109 struct netr_Authenticator *return_authenticator,
2110 struct samr_Password *password,
2111 struct samr_Password *password2)
2113 struct netr_ServerTrustPasswordsGet r;
2117 r.in.server_name = server_name;
2118 r.in.account_name = account_name;
2119 r.in.secure_channel_type = secure_channel_type;
2120 r.in.computer_name = computer_name;
2121 r.in.credential = credential;
2123 if (DEBUGLEVEL >= 10) {
2124 NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, &r);
2127 status = cli_do_rpc_ndr(cli,
2130 &ndr_table_netlogon,
2131 NDR_NETR_SERVERTRUSTPASSWORDSGET,
2134 if (!NT_STATUS_IS_OK(status)) {
2138 if (DEBUGLEVEL >= 10) {
2139 NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, &r);
2142 if (NT_STATUS_IS_ERR(status)) {
2146 /* Return variables */
2147 *return_authenticator = *r.out.return_authenticator;
2148 *password = *r.out.password;
2149 *password2 = *r.out.password2;
2152 return r.out.result;
2155 NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli,
2156 TALLOC_CTX *mem_ctx,
2157 const char *server_name,
2158 const char *trusted_domain_name,
2160 struct lsa_ForestTrustInformation **forest_trust_info,
2163 struct netr_DsRGetForestTrustInformation r;
2167 r.in.server_name = server_name;
2168 r.in.trusted_domain_name = trusted_domain_name;
2171 if (DEBUGLEVEL >= 10) {
2172 NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, &r);
2175 status = cli_do_rpc_ndr(cli,
2178 &ndr_table_netlogon,
2179 NDR_NETR_DSRGETFORESTTRUSTINFORMATION,
2182 if (!NT_STATUS_IS_OK(status)) {
2186 if (DEBUGLEVEL >= 10) {
2187 NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, &r);
2190 if (NT_STATUS_IS_ERR(status)) {
2194 /* Return variables */
2195 *forest_trust_info = *r.out.forest_trust_info;
2199 *werror = r.out.result;
2202 return werror_to_ntstatus(r.out.result);
2205 NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli,
2206 TALLOC_CTX *mem_ctx,
2207 const char *server_name,
2208 const char *trusted_domain_name,
2209 struct netr_Authenticator *credential,
2210 struct netr_Authenticator *return_authenticator,
2212 struct lsa_ForestTrustInformation **forest_trust_info,
2215 struct netr_GetForestTrustInformation r;
2219 r.in.server_name = server_name;
2220 r.in.trusted_domain_name = trusted_domain_name;
2221 r.in.credential = credential;
2224 if (DEBUGLEVEL >= 10) {
2225 NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, &r);
2228 status = cli_do_rpc_ndr(cli,
2231 &ndr_table_netlogon,
2232 NDR_NETR_GETFORESTTRUSTINFORMATION,
2235 if (!NT_STATUS_IS_OK(status)) {
2239 if (DEBUGLEVEL >= 10) {
2240 NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, &r);
2243 if (NT_STATUS_IS_ERR(status)) {
2247 /* Return variables */
2248 *return_authenticator = *r.out.return_authenticator;
2249 *forest_trust_info = *r.out.forest_trust_info;
2253 *werror = r.out.result;
2256 return werror_to_ntstatus(r.out.result);
2259 NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli,
2260 TALLOC_CTX *mem_ctx,
2261 const char *server_name,
2262 const char *computer_name,
2263 struct netr_Authenticator *credential,
2264 struct netr_Authenticator *return_authenticator,
2265 uint16_t logon_level,
2266 union netr_LogonLevel logon,
2267 uint16_t validation_level,
2268 union netr_Validation *validation,
2269 uint8_t *authoritative,
2272 struct netr_LogonSamLogonWithFlags r;
2276 r.in.server_name = server_name;
2277 r.in.computer_name = computer_name;
2278 r.in.credential = credential;
2279 r.in.return_authenticator = return_authenticator;
2280 r.in.logon_level = logon_level;
2282 r.in.validation_level = validation_level;
2285 if (DEBUGLEVEL >= 10) {
2286 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, &r);
2289 status = cli_do_rpc_ndr(cli,
2292 &ndr_table_netlogon,
2293 NDR_NETR_LOGONSAMLOGONWITHFLAGS,
2296 if (!NT_STATUS_IS_OK(status)) {
2300 if (DEBUGLEVEL >= 10) {
2301 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, &r);
2304 if (NT_STATUS_IS_ERR(status)) {
2308 /* Return variables */
2309 if (return_authenticator && r.out.return_authenticator) {
2310 *return_authenticator = *r.out.return_authenticator;
2312 *validation = *r.out.validation;
2313 *authoritative = *r.out.authoritative;
2314 *flags = *r.out.flags;
2317 return r.out.result;
2320 NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli,
2321 TALLOC_CTX *mem_ctx,
2324 struct netr_NETRSERVERGETTRUSTINFO r;
2329 if (DEBUGLEVEL >= 10) {
2330 NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
2333 status = cli_do_rpc_ndr(cli,
2336 &ndr_table_netlogon,
2337 NDR_NETR_NETRSERVERGETTRUSTINFO,
2340 if (!NT_STATUS_IS_OK(status)) {
2344 if (DEBUGLEVEL >= 10) {
2345 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
2348 if (NT_STATUS_IS_ERR(status)) {
2352 /* Return variables */
2356 *werror = r.out.result;
2359 return werror_to_ntstatus(r.out.result);