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,
604 struct netr_GetDcName r;
608 r.in.logon_server = logon_server;
609 r.in.domainname = domainname;
611 if (DEBUGLEVEL >= 10) {
612 NDR_PRINT_IN_DEBUG(netr_GetDcName, &r);
615 status = cli_do_rpc_ndr(cli,
622 if (!NT_STATUS_IS_OK(status)) {
626 if (DEBUGLEVEL >= 10) {
627 NDR_PRINT_OUT_DEBUG(netr_GetDcName, &r);
630 if (NT_STATUS_IS_ERR(status)) {
634 /* Return variables */
635 *dcname = *r.out.dcname;
639 *werror = r.out.result;
642 return werror_to_ntstatus(r.out.result);
645 NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli,
647 const char *logon_server,
648 enum netr_LogonControlCode function_code,
650 union netr_CONTROL_QUERY_INFORMATION *info,
653 struct netr_LogonControl r;
657 r.in.logon_server = logon_server;
658 r.in.function_code = function_code;
661 if (DEBUGLEVEL >= 10) {
662 NDR_PRINT_IN_DEBUG(netr_LogonControl, &r);
665 status = cli_do_rpc_ndr(cli,
669 NDR_NETR_LOGONCONTROL,
672 if (!NT_STATUS_IS_OK(status)) {
676 if (DEBUGLEVEL >= 10) {
677 NDR_PRINT_OUT_DEBUG(netr_LogonControl, &r);
680 if (NT_STATUS_IS_ERR(status)) {
684 /* Return variables */
689 *werror = r.out.result;
692 return werror_to_ntstatus(r.out.result);
695 NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli,
697 const char *logon_server,
698 const char *domainname,
702 struct netr_GetAnyDCName r;
706 r.in.logon_server = logon_server;
707 r.in.domainname = domainname;
709 if (DEBUGLEVEL >= 10) {
710 NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, &r);
713 status = cli_do_rpc_ndr(cli,
717 NDR_NETR_GETANYDCNAME,
720 if (!NT_STATUS_IS_OK(status)) {
724 if (DEBUGLEVEL >= 10) {
725 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, &r);
728 if (NT_STATUS_IS_ERR(status)) {
732 /* Return variables */
733 *dcname = *r.out.dcname;
737 *werror = r.out.result;
740 return werror_to_ntstatus(r.out.result);
743 NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli,
745 const char *logon_server,
746 uint32_t function_code,
748 union netr_CONTROL_DATA_INFORMATION data,
749 union netr_CONTROL_QUERY_INFORMATION *query,
752 struct netr_LogonControl2 r;
756 r.in.logon_server = logon_server;
757 r.in.function_code = function_code;
761 if (DEBUGLEVEL >= 10) {
762 NDR_PRINT_IN_DEBUG(netr_LogonControl2, &r);
765 status = cli_do_rpc_ndr(cli,
769 NDR_NETR_LOGONCONTROL2,
772 if (!NT_STATUS_IS_OK(status)) {
776 if (DEBUGLEVEL >= 10) {
777 NDR_PRINT_OUT_DEBUG(netr_LogonControl2, &r);
780 if (NT_STATUS_IS_ERR(status)) {
784 /* Return variables */
785 *query = *r.out.query;
789 *werror = r.out.result;
792 return werror_to_ntstatus(r.out.result);
795 NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
797 const char *server_name,
798 const char *account_name,
799 enum netr_SchannelType secure_channel_type,
800 const char *computer_name,
801 struct netr_Credential *credentials,
802 uint32_t *negotiate_flags)
804 struct netr_ServerAuthenticate2 r;
808 r.in.server_name = server_name;
809 r.in.account_name = account_name;
810 r.in.secure_channel_type = secure_channel_type;
811 r.in.computer_name = computer_name;
812 r.in.credentials = credentials;
813 r.in.negotiate_flags = negotiate_flags;
815 if (DEBUGLEVEL >= 10) {
816 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2, &r);
819 status = cli_do_rpc_ndr(cli,
823 NDR_NETR_SERVERAUTHENTICATE2,
826 if (!NT_STATUS_IS_OK(status)) {
830 if (DEBUGLEVEL >= 10) {
831 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, &r);
834 if (NT_STATUS_IS_ERR(status)) {
838 /* Return variables */
839 *credentials = *r.out.credentials;
840 *negotiate_flags = *r.out.negotiate_flags;
846 NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
848 const char *logon_server,
849 const char *computername,
850 struct netr_Authenticator credential,
851 struct netr_Authenticator *return_authenticator,
852 enum netr_SamDatabaseID database_id,
853 uint16_t restart_state,
854 uint32_t *sync_context,
855 uint32_t preferredmaximumlength,
856 struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
858 struct netr_DatabaseSync2 r;
862 r.in.logon_server = logon_server;
863 r.in.computername = computername;
864 r.in.credential = credential;
865 r.in.return_authenticator = return_authenticator;
866 r.in.database_id = database_id;
867 r.in.restart_state = restart_state;
868 r.in.sync_context = sync_context;
869 r.in.preferredmaximumlength = preferredmaximumlength;
871 if (DEBUGLEVEL >= 10) {
872 NDR_PRINT_IN_DEBUG(netr_DatabaseSync2, &r);
875 status = cli_do_rpc_ndr(cli,
879 NDR_NETR_DATABASESYNC2,
882 if (!NT_STATUS_IS_OK(status)) {
886 if (DEBUGLEVEL >= 10) {
887 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, &r);
890 if (NT_STATUS_IS_ERR(status)) {
894 /* Return variables */
895 *return_authenticator = *r.out.return_authenticator;
896 *sync_context = *r.out.sync_context;
897 *delta_enum_array = *r.out.delta_enum_array;
903 NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
905 const char *logon_server,
906 const char *computername,
907 struct netr_Authenticator credential,
908 struct netr_Authenticator *return_authenticator,
909 uint8_t *change_log_entry,
910 uint32_t change_log_entry_size,
911 struct netr_DELTA_ENUM_ARRAY *delta_enum_array)
913 struct netr_DatabaseRedo r;
917 r.in.logon_server = logon_server;
918 r.in.computername = computername;
919 r.in.credential = credential;
920 r.in.return_authenticator = return_authenticator;
921 r.in.change_log_entry = change_log_entry;
922 r.in.change_log_entry_size = change_log_entry_size;
924 if (DEBUGLEVEL >= 10) {
925 NDR_PRINT_IN_DEBUG(netr_DatabaseRedo, &r);
928 status = cli_do_rpc_ndr(cli,
932 NDR_NETR_DATABASEREDO,
935 if (!NT_STATUS_IS_OK(status)) {
939 if (DEBUGLEVEL >= 10) {
940 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, &r);
943 if (NT_STATUS_IS_ERR(status)) {
947 /* Return variables */
948 *return_authenticator = *r.out.return_authenticator;
949 *delta_enum_array = *r.out.delta_enum_array;
955 NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
957 const char *logon_server,
958 uint32_t function_code,
960 union netr_CONTROL_DATA_INFORMATION data,
961 union netr_CONTROL_QUERY_INFORMATION *query,
964 struct netr_LogonControl2Ex r;
968 r.in.logon_server = logon_server;
969 r.in.function_code = function_code;
973 if (DEBUGLEVEL >= 10) {
974 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &r);
977 status = cli_do_rpc_ndr(cli,
981 NDR_NETR_LOGONCONTROL2EX,
984 if (!NT_STATUS_IS_OK(status)) {
988 if (DEBUGLEVEL >= 10) {
989 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, &r);
992 if (NT_STATUS_IS_ERR(status)) {
996 /* Return variables */
997 *query = *r.out.query;
1001 *werror = r.out.result;
1004 return werror_to_ntstatus(r.out.result);
1007 NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli,
1008 TALLOC_CTX *mem_ctx,
1009 const char *server_name,
1010 struct netr_Blob *trusted_domains_blob,
1013 struct netr_NetrEnumerateTrustedDomains r;
1017 r.in.server_name = server_name;
1019 if (DEBUGLEVEL >= 10) {
1020 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
1023 status = cli_do_rpc_ndr(cli,
1026 &ndr_table_netlogon,
1027 NDR_NETR_NETRENUMERATETRUSTEDDOMAINS,
1030 if (!NT_STATUS_IS_OK(status)) {
1034 if (DEBUGLEVEL >= 10) {
1035 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
1038 if (NT_STATUS_IS_ERR(status)) {
1042 /* Return variables */
1043 *trusted_domains_blob = *r.out.trusted_domains_blob;
1047 *werror = r.out.result;
1050 return werror_to_ntstatus(r.out.result);
1053 NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
1054 TALLOC_CTX *mem_ctx,
1055 const char *server_unc,
1056 const char *domain_name,
1057 struct GUID *domain_guid,
1058 struct GUID *site_guid,
1060 struct netr_DsRGetDCNameInfo *info,
1063 struct netr_DsRGetDCName r;
1067 r.in.server_unc = server_unc;
1068 r.in.domain_name = domain_name;
1069 r.in.domain_guid = domain_guid;
1070 r.in.site_guid = site_guid;
1073 if (DEBUGLEVEL >= 10) {
1074 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &r);
1077 status = cli_do_rpc_ndr(cli,
1080 &ndr_table_netlogon,
1081 NDR_NETR_DSRGETDCNAME,
1084 if (!NT_STATUS_IS_OK(status)) {
1088 if (DEBUGLEVEL >= 10) {
1089 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, &r);
1092 if (NT_STATUS_IS_ERR(status)) {
1096 /* Return variables */
1097 *info = *r.out.info;
1101 *werror = r.out.result;
1104 return werror_to_ntstatus(r.out.result);
1107 NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
1108 TALLOC_CTX *mem_ctx,
1111 struct netr_NETRLOGONDUMMYROUTINE1 r;
1116 if (DEBUGLEVEL >= 10) {
1117 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1120 status = cli_do_rpc_ndr(cli,
1123 &ndr_table_netlogon,
1124 NDR_NETR_NETRLOGONDUMMYROUTINE1,
1127 if (!NT_STATUS_IS_OK(status)) {
1131 if (DEBUGLEVEL >= 10) {
1132 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1135 if (NT_STATUS_IS_ERR(status)) {
1139 /* Return variables */
1143 *werror = r.out.result;
1146 return werror_to_ntstatus(r.out.result);
1149 NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli,
1150 TALLOC_CTX *mem_ctx,
1153 struct netr_NETRLOGONSETSERVICEBITS r;
1158 if (DEBUGLEVEL >= 10) {
1159 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1162 status = cli_do_rpc_ndr(cli,
1165 &ndr_table_netlogon,
1166 NDR_NETR_NETRLOGONSETSERVICEBITS,
1169 if (!NT_STATUS_IS_OK(status)) {
1173 if (DEBUGLEVEL >= 10) {
1174 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1177 if (NT_STATUS_IS_ERR(status)) {
1181 /* Return variables */
1185 *werror = r.out.result;
1188 return werror_to_ntstatus(r.out.result);
1191 NTSTATUS rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client *cli,
1192 TALLOC_CTX *mem_ctx,
1193 const char *server_name,
1194 const char *domain_name,
1198 struct netr_LogonGetTrustRid r;
1202 r.in.server_name = server_name;
1203 r.in.domain_name = domain_name;
1205 if (DEBUGLEVEL >= 10) {
1206 NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid, &r);
1209 status = cli_do_rpc_ndr(cli,
1212 &ndr_table_netlogon,
1213 NDR_NETR_LOGONGETTRUSTRID,
1216 if (!NT_STATUS_IS_OK(status)) {
1220 if (DEBUGLEVEL >= 10) {
1221 NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, &r);
1224 if (NT_STATUS_IS_ERR(status)) {
1228 /* Return variables */
1233 *werror = r.out.result;
1236 return werror_to_ntstatus(r.out.result);
1239 NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli,
1240 TALLOC_CTX *mem_ctx,
1243 struct netr_NETRLOGONCOMPUTESERVERDIGEST r;
1248 if (DEBUGLEVEL >= 10) {
1249 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1252 status = cli_do_rpc_ndr(cli,
1255 &ndr_table_netlogon,
1256 NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST,
1259 if (!NT_STATUS_IS_OK(status)) {
1263 if (DEBUGLEVEL >= 10) {
1264 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1267 if (NT_STATUS_IS_ERR(status)) {
1271 /* Return variables */
1275 *werror = r.out.result;
1278 return werror_to_ntstatus(r.out.result);
1281 NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli,
1282 TALLOC_CTX *mem_ctx,
1285 struct netr_NETRLOGONCOMPUTECLIENTDIGEST r;
1290 if (DEBUGLEVEL >= 10) {
1291 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1294 status = cli_do_rpc_ndr(cli,
1297 &ndr_table_netlogon,
1298 NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST,
1301 if (!NT_STATUS_IS_OK(status)) {
1305 if (DEBUGLEVEL >= 10) {
1306 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1309 if (NT_STATUS_IS_ERR(status)) {
1313 /* Return variables */
1317 *werror = r.out.result;
1320 return werror_to_ntstatus(r.out.result);
1323 NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli,
1324 TALLOC_CTX *mem_ctx,
1325 const char *server_name,
1326 const char *account_name,
1327 enum netr_SchannelType secure_channel_type,
1328 const char *computer_name,
1329 struct netr_Credential *credentials,
1330 uint32_t *negotiate_flags,
1333 struct netr_ServerAuthenticate3 r;
1337 r.in.server_name = server_name;
1338 r.in.account_name = account_name;
1339 r.in.secure_channel_type = secure_channel_type;
1340 r.in.computer_name = computer_name;
1341 r.in.credentials = credentials;
1342 r.in.negotiate_flags = negotiate_flags;
1344 if (DEBUGLEVEL >= 10) {
1345 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3, &r);
1348 status = cli_do_rpc_ndr(cli,
1351 &ndr_table_netlogon,
1352 NDR_NETR_SERVERAUTHENTICATE3,
1355 if (!NT_STATUS_IS_OK(status)) {
1359 if (DEBUGLEVEL >= 10) {
1360 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, &r);
1363 if (NT_STATUS_IS_ERR(status)) {
1367 /* Return variables */
1368 *credentials = *r.out.credentials;
1369 *negotiate_flags = *r.out.negotiate_flags;
1373 return r.out.result;
1376 NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli,
1377 TALLOC_CTX *mem_ctx,
1378 const char *server_unc,
1379 const char *domain_name,
1380 struct GUID *domain_guid,
1381 const char *site_name,
1383 struct netr_DsRGetDCNameInfo **info,
1386 struct netr_DsRGetDCNameEx r;
1390 r.in.server_unc = server_unc;
1391 r.in.domain_name = domain_name;
1392 r.in.domain_guid = domain_guid;
1393 r.in.site_name = site_name;
1396 if (DEBUGLEVEL >= 10) {
1397 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &r);
1400 status = cli_do_rpc_ndr(cli,
1403 &ndr_table_netlogon,
1404 NDR_NETR_DSRGETDCNAMEEX,
1407 if (!NT_STATUS_IS_OK(status)) {
1411 if (DEBUGLEVEL >= 10) {
1412 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, &r);
1415 if (NT_STATUS_IS_ERR(status)) {
1419 /* Return variables */
1420 *info = *r.out.info;
1424 *werror = r.out.result;
1427 return werror_to_ntstatus(r.out.result);
1430 NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli,
1431 TALLOC_CTX *mem_ctx,
1432 const char *computer_name,
1436 struct netr_DsRGetSiteName r;
1440 r.in.computer_name = computer_name;
1442 if (DEBUGLEVEL >= 10) {
1443 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, &r);
1446 status = cli_do_rpc_ndr(cli,
1449 &ndr_table_netlogon,
1450 NDR_NETR_DSRGETSITENAME,
1453 if (!NT_STATUS_IS_OK(status)) {
1457 if (DEBUGLEVEL >= 10) {
1458 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, &r);
1461 if (NT_STATUS_IS_ERR(status)) {
1465 /* Return variables */
1466 *site = *r.out.site;
1470 *werror = r.out.result;
1473 return werror_to_ntstatus(r.out.result);
1476 NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli,
1477 TALLOC_CTX *mem_ctx,
1478 const char *server_name,
1479 const char *computer_name,
1480 struct netr_Authenticator *credential,
1481 struct netr_Authenticator *return_authenticator,
1483 union netr_DomainQuery query,
1484 union netr_DomainInfo *info)
1486 struct netr_LogonGetDomainInfo r;
1490 r.in.server_name = server_name;
1491 r.in.computer_name = computer_name;
1492 r.in.credential = credential;
1493 r.in.return_authenticator = return_authenticator;
1497 if (DEBUGLEVEL >= 10) {
1498 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, &r);
1501 status = cli_do_rpc_ndr(cli,
1504 &ndr_table_netlogon,
1505 NDR_NETR_LOGONGETDOMAININFO,
1508 if (!NT_STATUS_IS_OK(status)) {
1512 if (DEBUGLEVEL >= 10) {
1513 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, &r);
1516 if (NT_STATUS_IS_ERR(status)) {
1520 /* Return variables */
1521 *return_authenticator = *r.out.return_authenticator;
1522 *info = *r.out.info;
1525 return r.out.result;
1528 NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli,
1529 TALLOC_CTX *mem_ctx,
1530 const char *server_name,
1531 const char *account_name,
1532 enum netr_SchannelType secure_channel_type,
1533 const char *computer_name,
1534 struct netr_Authenticator credential,
1535 struct netr_CryptPassword new_password,
1536 struct netr_Authenticator *return_authenticator)
1538 struct netr_ServerPasswordSet2 r;
1542 r.in.server_name = server_name;
1543 r.in.account_name = account_name;
1544 r.in.secure_channel_type = secure_channel_type;
1545 r.in.computer_name = computer_name;
1546 r.in.credential = credential;
1547 r.in.new_password = new_password;
1549 if (DEBUGLEVEL >= 10) {
1550 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, &r);
1553 status = cli_do_rpc_ndr(cli,
1556 &ndr_table_netlogon,
1557 NDR_NETR_SERVERPASSWORDSET2,
1560 if (!NT_STATUS_IS_OK(status)) {
1564 if (DEBUGLEVEL >= 10) {
1565 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, &r);
1568 if (NT_STATUS_IS_ERR(status)) {
1572 /* Return variables */
1573 *return_authenticator = *r.out.return_authenticator;
1576 return r.out.result;
1579 NTSTATUS rpccli_netr_ServerPasswordGet(struct rpc_pipe_client *cli,
1580 TALLOC_CTX *mem_ctx,
1581 const char *server_name,
1582 const char *account_name,
1583 enum netr_SchannelType secure_channel_type,
1584 const char *computer_name,
1585 struct netr_Authenticator *credential,
1586 struct netr_Authenticator *return_authenticator,
1587 struct samr_Password *password,
1590 struct netr_ServerPasswordGet r;
1594 r.in.server_name = server_name;
1595 r.in.account_name = account_name;
1596 r.in.secure_channel_type = secure_channel_type;
1597 r.in.computer_name = computer_name;
1598 r.in.credential = credential;
1600 if (DEBUGLEVEL >= 10) {
1601 NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, &r);
1604 status = cli_do_rpc_ndr(cli,
1607 &ndr_table_netlogon,
1608 NDR_NETR_SERVERPASSWORDGET,
1611 if (!NT_STATUS_IS_OK(status)) {
1615 if (DEBUGLEVEL >= 10) {
1616 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, &r);
1619 if (NT_STATUS_IS_ERR(status)) {
1623 /* Return variables */
1624 *return_authenticator = *r.out.return_authenticator;
1625 *password = *r.out.password;
1629 *werror = r.out.result;
1632 return werror_to_ntstatus(r.out.result);
1635 NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli,
1636 TALLOC_CTX *mem_ctx,
1639 struct netr_NETRLOGONSENDTOSAM r;
1644 if (DEBUGLEVEL >= 10) {
1645 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1648 status = cli_do_rpc_ndr(cli,
1651 &ndr_table_netlogon,
1652 NDR_NETR_NETRLOGONSENDTOSAM,
1655 if (!NT_STATUS_IS_OK(status)) {
1659 if (DEBUGLEVEL >= 10) {
1660 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1663 if (NT_STATUS_IS_ERR(status)) {
1667 /* Return variables */
1671 *werror = r.out.result;
1674 return werror_to_ntstatus(r.out.result);
1677 NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli,
1678 TALLOC_CTX *mem_ctx,
1679 const char *server_name,
1681 struct netr_DsRAddress *addresses,
1682 struct netr_DsRAddressToSitenamesWCtr **ctr,
1685 struct netr_DsRAddressToSitenamesW r;
1689 r.in.server_name = server_name;
1691 r.in.addresses = addresses;
1693 if (DEBUGLEVEL >= 10) {
1694 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, &r);
1697 status = cli_do_rpc_ndr(cli,
1700 &ndr_table_netlogon,
1701 NDR_NETR_DSRADDRESSTOSITENAMESW,
1704 if (!NT_STATUS_IS_OK(status)) {
1708 if (DEBUGLEVEL >= 10) {
1709 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, &r);
1712 if (NT_STATUS_IS_ERR(status)) {
1716 /* Return variables */
1721 *werror = r.out.result;
1724 return werror_to_ntstatus(r.out.result);
1727 NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli,
1728 TALLOC_CTX *mem_ctx,
1729 const char *server_unc,
1730 const char *client_account,
1732 const char *domain_name,
1733 struct GUID *domain_guid,
1734 const char *site_name,
1736 struct netr_DsRGetDCNameInfo **info,
1739 struct netr_DsRGetDCNameEx2 r;
1743 r.in.server_unc = server_unc;
1744 r.in.client_account = client_account;
1746 r.in.domain_name = domain_name;
1747 r.in.domain_guid = domain_guid;
1748 r.in.site_name = site_name;
1751 if (DEBUGLEVEL >= 10) {
1752 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &r);
1755 status = cli_do_rpc_ndr(cli,
1758 &ndr_table_netlogon,
1759 NDR_NETR_DSRGETDCNAMEEX2,
1762 if (!NT_STATUS_IS_OK(status)) {
1766 if (DEBUGLEVEL >= 10) {
1767 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, &r);
1770 if (NT_STATUS_IS_ERR(status)) {
1774 /* Return variables */
1775 *info = *r.out.info;
1779 *werror = r.out.result;
1782 return werror_to_ntstatus(r.out.result);
1785 NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli,
1786 TALLOC_CTX *mem_ctx,
1789 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r;
1794 if (DEBUGLEVEL >= 10) {
1795 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1798 status = cli_do_rpc_ndr(cli,
1801 &ndr_table_netlogon,
1802 NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
1805 if (!NT_STATUS_IS_OK(status)) {
1809 if (DEBUGLEVEL >= 10) {
1810 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1813 if (NT_STATUS_IS_ERR(status)) {
1817 /* Return variables */
1821 *werror = r.out.result;
1824 return werror_to_ntstatus(r.out.result);
1827 NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli,
1828 TALLOC_CTX *mem_ctx,
1829 const char *server_name,
1830 struct netr_DomainTrustList *dom_trust_list,
1833 struct netr_NetrEnumerateTrustedDomainsEx r;
1837 r.in.server_name = server_name;
1839 if (DEBUGLEVEL >= 10) {
1840 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
1843 status = cli_do_rpc_ndr(cli,
1846 &ndr_table_netlogon,
1847 NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX,
1850 if (!NT_STATUS_IS_OK(status)) {
1854 if (DEBUGLEVEL >= 10) {
1855 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
1858 if (NT_STATUS_IS_ERR(status)) {
1862 /* Return variables */
1863 *dom_trust_list = *r.out.dom_trust_list;
1867 *werror = r.out.result;
1870 return werror_to_ntstatus(r.out.result);
1873 NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli,
1874 TALLOC_CTX *mem_ctx,
1875 const char *server_name,
1877 struct netr_DsRAddress *addresses,
1878 struct netr_DsRAddressToSitenamesExWCtr **ctr,
1881 struct netr_DsRAddressToSitenamesExW r;
1885 r.in.server_name = server_name;
1887 r.in.addresses = addresses;
1889 if (DEBUGLEVEL >= 10) {
1890 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1893 status = cli_do_rpc_ndr(cli,
1896 &ndr_table_netlogon,
1897 NDR_NETR_DSRADDRESSTOSITENAMESEXW,
1900 if (!NT_STATUS_IS_OK(status)) {
1904 if (DEBUGLEVEL >= 10) {
1905 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1908 if (NT_STATUS_IS_ERR(status)) {
1912 /* Return variables */
1917 *werror = r.out.result;
1920 return werror_to_ntstatus(r.out.result);
1923 NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli,
1924 TALLOC_CTX *mem_ctx,
1925 const char *server_name,
1926 struct DcSitesCtr *ctr,
1929 struct netr_DsrGetDcSiteCoverageW r;
1933 r.in.server_name = server_name;
1935 if (DEBUGLEVEL >= 10) {
1936 NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
1939 status = cli_do_rpc_ndr(cli,
1942 &ndr_table_netlogon,
1943 NDR_NETR_DSRGETDCSITECOVERAGEW,
1946 if (!NT_STATUS_IS_OK(status)) {
1950 if (DEBUGLEVEL >= 10) {
1951 NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
1954 if (NT_STATUS_IS_ERR(status)) {
1958 /* Return variables */
1963 *werror = r.out.result;
1966 return werror_to_ntstatus(r.out.result);
1969 NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
1970 TALLOC_CTX *mem_ctx,
1971 const char *server_name,
1972 const char *computer_name,
1973 uint16_t logon_level,
1974 union netr_LogonLevel logon,
1975 uint16_t validation_level,
1976 union netr_Validation *validation,
1977 uint8_t *authoritative,
1980 struct netr_LogonSamLogonEx r;
1984 r.in.server_name = server_name;
1985 r.in.computer_name = computer_name;
1986 r.in.logon_level = logon_level;
1988 r.in.validation_level = validation_level;
1991 if (DEBUGLEVEL >= 10) {
1992 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &r);
1995 status = cli_do_rpc_ndr(cli,
1998 &ndr_table_netlogon,
1999 NDR_NETR_LOGONSAMLOGONEX,
2002 if (!NT_STATUS_IS_OK(status)) {
2006 if (DEBUGLEVEL >= 10) {
2007 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, &r);
2010 if (NT_STATUS_IS_ERR(status)) {
2014 /* Return variables */
2015 *validation = *r.out.validation;
2016 *authoritative = *r.out.authoritative;
2017 *flags = *r.out.flags;
2020 return r.out.result;
2023 NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli,
2024 TALLOC_CTX *mem_ctx,
2025 const char *server_name,
2026 uint32_t trust_flags,
2027 struct netr_DomainTrustList *trusts,
2030 struct netr_DsrEnumerateDomainTrusts r;
2034 r.in.server_name = server_name;
2035 r.in.trust_flags = trust_flags;
2037 if (DEBUGLEVEL >= 10) {
2038 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
2041 status = cli_do_rpc_ndr(cli,
2044 &ndr_table_netlogon,
2045 NDR_NETR_DSRENUMERATEDOMAINTRUSTS,
2048 if (!NT_STATUS_IS_OK(status)) {
2052 if (DEBUGLEVEL >= 10) {
2053 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
2056 if (NT_STATUS_IS_ERR(status)) {
2060 /* Return variables */
2061 *trusts = *r.out.trusts;
2065 *werror = r.out.result;
2068 return werror_to_ntstatus(r.out.result);
2071 NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli,
2072 TALLOC_CTX *mem_ctx,
2073 const char *server_name,
2075 struct GUID *domain_guid,
2076 struct GUID *dsa_guid,
2077 const char *dns_host,
2080 struct netr_DsrDeregisterDNSHostRecords r;
2084 r.in.server_name = server_name;
2085 r.in.domain = domain;
2086 r.in.domain_guid = domain_guid;
2087 r.in.dsa_guid = dsa_guid;
2088 r.in.dns_host = dns_host;
2090 if (DEBUGLEVEL >= 10) {
2091 NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords, &r);
2094 status = cli_do_rpc_ndr(cli,
2097 &ndr_table_netlogon,
2098 NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS,
2101 if (!NT_STATUS_IS_OK(status)) {
2105 if (DEBUGLEVEL >= 10) {
2106 NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, &r);
2109 if (NT_STATUS_IS_ERR(status)) {
2113 /* Return variables */
2117 *werror = r.out.result;
2120 return werror_to_ntstatus(r.out.result);
2123 NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli,
2124 TALLOC_CTX *mem_ctx,
2125 const char *server_name,
2126 const char *account_name,
2127 enum netr_SchannelType secure_channel_type,
2128 const char *computer_name,
2129 struct netr_Authenticator *credential,
2130 struct netr_Authenticator *return_authenticator,
2131 struct samr_Password *password,
2132 struct samr_Password *password2)
2134 struct netr_ServerTrustPasswordsGet r;
2138 r.in.server_name = server_name;
2139 r.in.account_name = account_name;
2140 r.in.secure_channel_type = secure_channel_type;
2141 r.in.computer_name = computer_name;
2142 r.in.credential = credential;
2144 if (DEBUGLEVEL >= 10) {
2145 NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, &r);
2148 status = cli_do_rpc_ndr(cli,
2151 &ndr_table_netlogon,
2152 NDR_NETR_SERVERTRUSTPASSWORDSGET,
2155 if (!NT_STATUS_IS_OK(status)) {
2159 if (DEBUGLEVEL >= 10) {
2160 NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, &r);
2163 if (NT_STATUS_IS_ERR(status)) {
2167 /* Return variables */
2168 *return_authenticator = *r.out.return_authenticator;
2169 *password = *r.out.password;
2170 *password2 = *r.out.password2;
2173 return r.out.result;
2176 NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli,
2177 TALLOC_CTX *mem_ctx,
2178 const char *server_name,
2179 const char *trusted_domain_name,
2181 struct lsa_ForestTrustInformation **forest_trust_info,
2184 struct netr_DsRGetForestTrustInformation r;
2188 r.in.server_name = server_name;
2189 r.in.trusted_domain_name = trusted_domain_name;
2192 if (DEBUGLEVEL >= 10) {
2193 NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, &r);
2196 status = cli_do_rpc_ndr(cli,
2199 &ndr_table_netlogon,
2200 NDR_NETR_DSRGETFORESTTRUSTINFORMATION,
2203 if (!NT_STATUS_IS_OK(status)) {
2207 if (DEBUGLEVEL >= 10) {
2208 NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, &r);
2211 if (NT_STATUS_IS_ERR(status)) {
2215 /* Return variables */
2216 *forest_trust_info = *r.out.forest_trust_info;
2220 *werror = r.out.result;
2223 return werror_to_ntstatus(r.out.result);
2226 NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli,
2227 TALLOC_CTX *mem_ctx,
2228 const char *server_name,
2229 const char *trusted_domain_name,
2230 struct netr_Authenticator *credential,
2231 struct netr_Authenticator *return_authenticator,
2233 struct lsa_ForestTrustInformation **forest_trust_info,
2236 struct netr_GetForestTrustInformation r;
2240 r.in.server_name = server_name;
2241 r.in.trusted_domain_name = trusted_domain_name;
2242 r.in.credential = credential;
2245 if (DEBUGLEVEL >= 10) {
2246 NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, &r);
2249 status = cli_do_rpc_ndr(cli,
2252 &ndr_table_netlogon,
2253 NDR_NETR_GETFORESTTRUSTINFORMATION,
2256 if (!NT_STATUS_IS_OK(status)) {
2260 if (DEBUGLEVEL >= 10) {
2261 NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, &r);
2264 if (NT_STATUS_IS_ERR(status)) {
2268 /* Return variables */
2269 *return_authenticator = *r.out.return_authenticator;
2270 *forest_trust_info = *r.out.forest_trust_info;
2274 *werror = r.out.result;
2277 return werror_to_ntstatus(r.out.result);
2280 NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli,
2281 TALLOC_CTX *mem_ctx,
2282 const char *server_name,
2283 const char *computer_name,
2284 struct netr_Authenticator *credential,
2285 struct netr_Authenticator *return_authenticator,
2286 uint16_t logon_level,
2287 union netr_LogonLevel logon,
2288 uint16_t validation_level,
2289 union netr_Validation *validation,
2290 uint8_t *authoritative,
2293 struct netr_LogonSamLogonWithFlags r;
2297 r.in.server_name = server_name;
2298 r.in.computer_name = computer_name;
2299 r.in.credential = credential;
2300 r.in.return_authenticator = return_authenticator;
2301 r.in.logon_level = logon_level;
2303 r.in.validation_level = validation_level;
2306 if (DEBUGLEVEL >= 10) {
2307 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, &r);
2310 status = cli_do_rpc_ndr(cli,
2313 &ndr_table_netlogon,
2314 NDR_NETR_LOGONSAMLOGONWITHFLAGS,
2317 if (!NT_STATUS_IS_OK(status)) {
2321 if (DEBUGLEVEL >= 10) {
2322 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, &r);
2325 if (NT_STATUS_IS_ERR(status)) {
2329 /* Return variables */
2330 if (return_authenticator && r.out.return_authenticator) {
2331 *return_authenticator = *r.out.return_authenticator;
2333 *validation = *r.out.validation;
2334 *authoritative = *r.out.authoritative;
2335 *flags = *r.out.flags;
2338 return r.out.result;
2341 NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli,
2342 TALLOC_CTX *mem_ctx,
2345 struct netr_NETRSERVERGETTRUSTINFO r;
2350 if (DEBUGLEVEL >= 10) {
2351 NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
2354 status = cli_do_rpc_ndr(cli,
2357 &ndr_table_netlogon,
2358 NDR_NETR_NETRSERVERGETTRUSTINFO,
2361 if (!NT_STATUS_IS_OK(status)) {
2365 if (DEBUGLEVEL >= 10) {
2366 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
2369 if (NT_STATUS_IS_ERR(status)) {
2373 /* Return variables */
2377 *werror = r.out.result;
2380 return werror_to_ntstatus(r.out.result);