Conditional install of the cifs.upcall man page
[Samba.git] / source / librpc / gen_ndr / cli_netlogon.c
blobf5b47156090a837fe421e094f8b81bc02ff71316
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_netlogon.h"
9 NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
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] */,
15 WERROR *werror)
17 struct netr_LogonUasLogon r;
18 NTSTATUS status;
20 /* In parameters */
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,
30 mem_ctx,
31 PI_NETLOGON,
32 &ndr_table_netlogon,
33 NDR_NETR_LOGONUASLOGON,
34 &r);
36 if (!NT_STATUS_IS_OK(status)) {
37 return status;
40 if (DEBUGLEVEL >= 10) {
41 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon, &r);
44 if (NT_STATUS_IS_ERR(status)) {
45 return status;
48 /* Return variables */
49 *info = *r.out.info;
51 /* Return result */
52 if (werror) {
53 *werror = r.out.result;
56 return werror_to_ntstatus(r.out.result);
59 NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli,
60 TALLOC_CTX *mem_ctx,
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] */,
65 WERROR *werror)
67 struct netr_LogonUasLogoff r;
68 NTSTATUS status;
70 /* In parameters */
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,
80 mem_ctx,
81 PI_NETLOGON,
82 &ndr_table_netlogon,
83 NDR_NETR_LOGONUASLOGOFF,
84 &r);
86 if (!NT_STATUS_IS_OK(status)) {
87 return status;
90 if (DEBUGLEVEL >= 10) {
91 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, &r);
94 if (NT_STATUS_IS_ERR(status)) {
95 return status;
98 /* Return variables */
99 *info = *r.out.info;
101 /* Return result */
102 if (werror) {
103 *werror = r.out.result;
106 return werror_to_ntstatus(r.out.result);
109 NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli,
110 TALLOC_CTX *mem_ctx,
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;
122 NTSTATUS status;
124 /* In parameters */
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;
130 r.in.logon = logon;
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,
138 mem_ctx,
139 PI_NETLOGON,
140 &ndr_table_netlogon,
141 NDR_NETR_LOGONSAMLOGON,
142 &r);
144 if (!NT_STATUS_IS_OK(status)) {
145 return status;
148 if (DEBUGLEVEL >= 10) {
149 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, &r);
152 if (NT_STATUS_IS_ERR(status)) {
153 return 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;
163 /* Return result */
164 return r.out.result;
167 NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli,
168 TALLOC_CTX *mem_ctx,
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;
177 NTSTATUS status;
179 /* In parameters */
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;
185 r.in.logon = logon;
187 if (DEBUGLEVEL >= 10) {
188 NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff, &r);
191 status = cli_do_rpc_ndr(cli,
192 mem_ctx,
193 PI_NETLOGON,
194 &ndr_table_netlogon,
195 NDR_NETR_LOGONSAMLOGOFF,
196 &r);
198 if (!NT_STATUS_IS_OK(status)) {
199 return status;
202 if (DEBUGLEVEL >= 10) {
203 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, &r);
206 if (NT_STATUS_IS_ERR(status)) {
207 return status;
210 /* Return variables */
211 if (return_authenticator && r.out.return_authenticator) {
212 *return_authenticator = *r.out.return_authenticator;
215 /* Return result */
216 return r.out.result;
219 NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
220 TALLOC_CTX *mem_ctx,
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;
227 NTSTATUS status;
229 /* In parameters */
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,
239 mem_ctx,
240 PI_NETLOGON,
241 &ndr_table_netlogon,
242 NDR_NETR_SERVERREQCHALLENGE,
243 &r);
245 if (!NT_STATUS_IS_OK(status)) {
246 return status;
249 if (DEBUGLEVEL >= 10) {
250 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, &r);
253 if (NT_STATUS_IS_ERR(status)) {
254 return status;
257 /* Return variables */
258 *return_credentials = *r.out.return_credentials;
260 /* Return result */
261 return r.out.result;
264 NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
265 TALLOC_CTX *mem_ctx,
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;
274 NTSTATUS status;
276 /* In parameters */
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,
288 mem_ctx,
289 PI_NETLOGON,
290 &ndr_table_netlogon,
291 NDR_NETR_SERVERAUTHENTICATE,
292 &r);
294 if (!NT_STATUS_IS_OK(status)) {
295 return status;
298 if (DEBUGLEVEL >= 10) {
299 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, &r);
302 if (NT_STATUS_IS_ERR(status)) {
303 return status;
306 /* Return variables */
307 *return_credentials = *r.out.return_credentials;
309 /* Return result */
310 return r.out.result;
313 NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
314 TALLOC_CTX *mem_ctx,
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;
324 NTSTATUS status;
326 /* In parameters */
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,
339 mem_ctx,
340 PI_NETLOGON,
341 &ndr_table_netlogon,
342 NDR_NETR_SERVERPASSWORDSET,
343 &r);
345 if (!NT_STATUS_IS_OK(status)) {
346 return status;
349 if (DEBUGLEVEL >= 10) {
350 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, &r);
353 if (NT_STATUS_IS_ERR(status)) {
354 return status;
357 /* Return variables */
358 *return_authenticator = *r.out.return_authenticator;
360 /* Return result */
361 return r.out.result;
364 NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli,
365 TALLOC_CTX *mem_ctx,
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;
376 NTSTATUS status;
378 /* In parameters */
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,
392 mem_ctx,
393 PI_NETLOGON,
394 &ndr_table_netlogon,
395 NDR_NETR_DATABASEDELTAS,
396 &r);
398 if (!NT_STATUS_IS_OK(status)) {
399 return status;
402 if (DEBUGLEVEL >= 10) {
403 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, &r);
406 if (NT_STATUS_IS_ERR(status)) {
407 return 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;
415 /* Return result */
416 return r.out.result;
419 NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli,
420 TALLOC_CTX *mem_ctx,
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;
431 NTSTATUS status;
433 /* In parameters */
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,
447 mem_ctx,
448 PI_NETLOGON,
449 &ndr_table_netlogon,
450 NDR_NETR_DATABASESYNC,
451 &r);
453 if (!NT_STATUS_IS_OK(status)) {
454 return status;
457 if (DEBUGLEVEL >= 10) {
458 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, &r);
461 if (NT_STATUS_IS_ERR(status)) {
462 return 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;
470 /* Return result */
471 return r.out.result;
474 NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli,
475 TALLOC_CTX *mem_ctx,
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;
490 NTSTATUS status;
492 /* In parameters */
493 r.in.logon_server = logon_server;
494 r.in.computername = computername;
495 r.in.credential = credential;
496 r.in.return_authenticator = return_authenticator;
497 r.in.uas = uas;
498 r.in.count = count;
499 r.in.level = level;
500 r.in.buffersize = buffersize;
502 if (DEBUGLEVEL >= 10) {
503 NDR_PRINT_IN_DEBUG(netr_AccountDeltas, &r);
506 status = cli_do_rpc_ndr(cli,
507 mem_ctx,
508 PI_NETLOGON,
509 &ndr_table_netlogon,
510 NDR_NETR_ACCOUNTDELTAS,
511 &r);
513 if (!NT_STATUS_IS_OK(status)) {
514 return status;
517 if (DEBUGLEVEL >= 10) {
518 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, &r);
521 if (NT_STATUS_IS_ERR(status)) {
522 return 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;
532 /* Return result */
533 return r.out.result;
536 NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli,
537 TALLOC_CTX *mem_ctx,
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;
552 NTSTATUS status;
554 /* In parameters */
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;
560 r.in.level = level;
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,
569 mem_ctx,
570 PI_NETLOGON,
571 &ndr_table_netlogon,
572 NDR_NETR_ACCOUNTSYNC,
573 &r);
575 if (!NT_STATUS_IS_OK(status)) {
576 return status;
579 if (DEBUGLEVEL >= 10) {
580 NDR_PRINT_OUT_DEBUG(netr_AccountSync, &r);
583 if (NT_STATUS_IS_ERR(status)) {
584 return 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;
595 /* Return result */
596 return r.out.result;
599 NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli,
600 TALLOC_CTX *mem_ctx,
601 const char *logon_server /* [in] [charset(UTF16)] */,
602 const char *domainname /* [in] [unique,charset(UTF16)] */,
603 const char **dcname /* [out] [ref,charset(UTF16)] */,
604 WERROR *werror)
606 struct netr_GetDcName r;
607 NTSTATUS status;
609 /* In parameters */
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,
618 mem_ctx,
619 PI_NETLOGON,
620 &ndr_table_netlogon,
621 NDR_NETR_GETDCNAME,
622 &r);
624 if (!NT_STATUS_IS_OK(status)) {
625 return status;
628 if (DEBUGLEVEL >= 10) {
629 NDR_PRINT_OUT_DEBUG(netr_GetDcName, &r);
632 if (NT_STATUS_IS_ERR(status)) {
633 return status;
636 /* Return variables */
637 *dcname = *r.out.dcname;
639 /* Return result */
640 if (werror) {
641 *werror = r.out.result;
644 return werror_to_ntstatus(r.out.result);
647 NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli,
648 TALLOC_CTX *mem_ctx,
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)] */,
653 WERROR *werror)
655 struct netr_LogonControl r;
656 NTSTATUS status;
658 /* In parameters */
659 r.in.logon_server = logon_server;
660 r.in.function_code = function_code;
661 r.in.level = level;
663 if (DEBUGLEVEL >= 10) {
664 NDR_PRINT_IN_DEBUG(netr_LogonControl, &r);
667 status = cli_do_rpc_ndr(cli,
668 mem_ctx,
669 PI_NETLOGON,
670 &ndr_table_netlogon,
671 NDR_NETR_LOGONCONTROL,
672 &r);
674 if (!NT_STATUS_IS_OK(status)) {
675 return status;
678 if (DEBUGLEVEL >= 10) {
679 NDR_PRINT_OUT_DEBUG(netr_LogonControl, &r);
682 if (NT_STATUS_IS_ERR(status)) {
683 return status;
686 /* Return variables */
687 *info = *r.out.info;
689 /* Return result */
690 if (werror) {
691 *werror = r.out.result;
694 return werror_to_ntstatus(r.out.result);
697 NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli,
698 TALLOC_CTX *mem_ctx,
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)] */,
702 WERROR *werror)
704 struct netr_GetAnyDCName r;
705 NTSTATUS status;
707 /* In parameters */
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,
716 mem_ctx,
717 PI_NETLOGON,
718 &ndr_table_netlogon,
719 NDR_NETR_GETANYDCNAME,
720 &r);
722 if (!NT_STATUS_IS_OK(status)) {
723 return status;
726 if (DEBUGLEVEL >= 10) {
727 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, &r);
730 if (NT_STATUS_IS_ERR(status)) {
731 return status;
734 /* Return variables */
735 *dcname = *r.out.dcname;
737 /* Return result */
738 if (werror) {
739 *werror = r.out.result;
742 return werror_to_ntstatus(r.out.result);
745 NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli,
746 TALLOC_CTX *mem_ctx,
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)] */,
752 WERROR *werror)
754 struct netr_LogonControl2 r;
755 NTSTATUS status;
757 /* In parameters */
758 r.in.logon_server = logon_server;
759 r.in.function_code = function_code;
760 r.in.level = level;
761 r.in.data = data;
763 if (DEBUGLEVEL >= 10) {
764 NDR_PRINT_IN_DEBUG(netr_LogonControl2, &r);
767 status = cli_do_rpc_ndr(cli,
768 mem_ctx,
769 PI_NETLOGON,
770 &ndr_table_netlogon,
771 NDR_NETR_LOGONCONTROL2,
772 &r);
774 if (!NT_STATUS_IS_OK(status)) {
775 return status;
778 if (DEBUGLEVEL >= 10) {
779 NDR_PRINT_OUT_DEBUG(netr_LogonControl2, &r);
782 if (NT_STATUS_IS_ERR(status)) {
783 return status;
786 /* Return variables */
787 *query = *r.out.query;
789 /* Return result */
790 if (werror) {
791 *werror = r.out.result;
794 return werror_to_ntstatus(r.out.result);
797 NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
798 TALLOC_CTX *mem_ctx,
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;
808 NTSTATUS status;
810 /* In parameters */
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,
823 mem_ctx,
824 PI_NETLOGON,
825 &ndr_table_netlogon,
826 NDR_NETR_SERVERAUTHENTICATE2,
827 &r);
829 if (!NT_STATUS_IS_OK(status)) {
830 return status;
833 if (DEBUGLEVEL >= 10) {
834 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, &r);
837 if (NT_STATUS_IS_ERR(status)) {
838 return status;
841 /* Return variables */
842 *return_credentials = *r.out.return_credentials;
843 *negotiate_flags = *r.out.negotiate_flags;
845 /* Return result */
846 return r.out.result;
849 NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
850 TALLOC_CTX *mem_ctx,
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;
862 NTSTATUS status;
864 /* In parameters */
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,
879 mem_ctx,
880 PI_NETLOGON,
881 &ndr_table_netlogon,
882 NDR_NETR_DATABASESYNC2,
883 &r);
885 if (!NT_STATUS_IS_OK(status)) {
886 return status;
889 if (DEBUGLEVEL >= 10) {
890 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, &r);
893 if (NT_STATUS_IS_ERR(status)) {
894 return 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;
902 /* Return result */
903 return r.out.result;
906 NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
907 TALLOC_CTX *mem_ctx,
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;
917 NTSTATUS status;
919 /* In parameters */
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,
932 mem_ctx,
933 PI_NETLOGON,
934 &ndr_table_netlogon,
935 NDR_NETR_DATABASEREDO,
936 &r);
938 if (!NT_STATUS_IS_OK(status)) {
939 return status;
942 if (DEBUGLEVEL >= 10) {
943 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, &r);
946 if (NT_STATUS_IS_ERR(status)) {
947 return status;
950 /* Return variables */
951 *return_authenticator = *r.out.return_authenticator;
952 *delta_enum_array = *r.out.delta_enum_array;
954 /* Return result */
955 return r.out.result;
958 NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
959 TALLOC_CTX *mem_ctx,
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)] */,
965 WERROR *werror)
967 struct netr_LogonControl2Ex r;
968 NTSTATUS status;
970 /* In parameters */
971 r.in.logon_server = logon_server;
972 r.in.function_code = function_code;
973 r.in.level = level;
974 r.in.data = data;
976 if (DEBUGLEVEL >= 10) {
977 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &r);
980 status = cli_do_rpc_ndr(cli,
981 mem_ctx,
982 PI_NETLOGON,
983 &ndr_table_netlogon,
984 NDR_NETR_LOGONCONTROL2EX,
985 &r);
987 if (!NT_STATUS_IS_OK(status)) {
988 return status;
991 if (DEBUGLEVEL >= 10) {
992 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, &r);
995 if (NT_STATUS_IS_ERR(status)) {
996 return status;
999 /* Return variables */
1000 *query = *r.out.query;
1002 /* Return result */
1003 if (werror) {
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] */,
1014 WERROR *werror)
1016 struct netr_NetrEnumerateTrustedDomains r;
1017 NTSTATUS status;
1019 /* In parameters */
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,
1027 mem_ctx,
1028 PI_NETLOGON,
1029 &ndr_table_netlogon,
1030 NDR_NETR_NETRENUMERATETRUSTEDDOMAINS,
1031 &r);
1033 if (!NT_STATUS_IS_OK(status)) {
1034 return status;
1037 if (DEBUGLEVEL >= 10) {
1038 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
1041 if (NT_STATUS_IS_ERR(status)) {
1042 return status;
1045 /* Return variables */
1046 *trusted_domains_blob = *r.out.trusted_domains_blob;
1048 /* Return result */
1049 if (werror) {
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] */,
1064 WERROR *werror)
1066 struct netr_DsRGetDCName r;
1067 NTSTATUS status;
1069 /* In parameters */
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;
1074 r.in.flags = flags;
1076 if (DEBUGLEVEL >= 10) {
1077 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &r);
1080 status = cli_do_rpc_ndr(cli,
1081 mem_ctx,
1082 PI_NETLOGON,
1083 &ndr_table_netlogon,
1084 NDR_NETR_DSRGETDCNAME,
1085 &r);
1087 if (!NT_STATUS_IS_OK(status)) {
1088 return status;
1091 if (DEBUGLEVEL >= 10) {
1092 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, &r);
1095 if (NT_STATUS_IS_ERR(status)) {
1096 return status;
1099 /* Return variables */
1100 *info = *r.out.info;
1102 /* Return result */
1103 if (werror) {
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,
1112 WERROR *werror)
1114 struct netr_NETRLOGONDUMMYROUTINE1 r;
1115 NTSTATUS status;
1117 /* In parameters */
1119 if (DEBUGLEVEL >= 10) {
1120 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1123 status = cli_do_rpc_ndr(cli,
1124 mem_ctx,
1125 PI_NETLOGON,
1126 &ndr_table_netlogon,
1127 NDR_NETR_NETRLOGONDUMMYROUTINE1,
1128 &r);
1130 if (!NT_STATUS_IS_OK(status)) {
1131 return status;
1134 if (DEBUGLEVEL >= 10) {
1135 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1138 if (NT_STATUS_IS_ERR(status)) {
1139 return status;
1142 /* Return variables */
1144 /* Return result */
1145 if (werror) {
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,
1154 WERROR *werror)
1156 struct netr_NETRLOGONSETSERVICEBITS r;
1157 NTSTATUS status;
1159 /* In parameters */
1161 if (DEBUGLEVEL >= 10) {
1162 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1165 status = cli_do_rpc_ndr(cli,
1166 mem_ctx,
1167 PI_NETLOGON,
1168 &ndr_table_netlogon,
1169 NDR_NETR_NETRLOGONSETSERVICEBITS,
1170 &r);
1172 if (!NT_STATUS_IS_OK(status)) {
1173 return status;
1176 if (DEBUGLEVEL >= 10) {
1177 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1180 if (NT_STATUS_IS_ERR(status)) {
1181 return status;
1184 /* Return variables */
1186 /* Return result */
1187 if (werror) {
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] */,
1199 WERROR *werror)
1201 struct netr_LogonGetTrustRid r;
1202 NTSTATUS status;
1204 /* In parameters */
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,
1213 mem_ctx,
1214 PI_NETLOGON,
1215 &ndr_table_netlogon,
1216 NDR_NETR_LOGONGETTRUSTRID,
1217 &r);
1219 if (!NT_STATUS_IS_OK(status)) {
1220 return status;
1223 if (DEBUGLEVEL >= 10) {
1224 NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, &r);
1227 if (NT_STATUS_IS_ERR(status)) {
1228 return status;
1231 /* Return variables */
1232 *rid = *r.out.rid;
1234 /* Return result */
1235 if (werror) {
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,
1244 WERROR *werror)
1246 struct netr_NETRLOGONCOMPUTESERVERDIGEST r;
1247 NTSTATUS status;
1249 /* In parameters */
1251 if (DEBUGLEVEL >= 10) {
1252 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1255 status = cli_do_rpc_ndr(cli,
1256 mem_ctx,
1257 PI_NETLOGON,
1258 &ndr_table_netlogon,
1259 NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST,
1260 &r);
1262 if (!NT_STATUS_IS_OK(status)) {
1263 return status;
1266 if (DEBUGLEVEL >= 10) {
1267 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1270 if (NT_STATUS_IS_ERR(status)) {
1271 return status;
1274 /* Return variables */
1276 /* Return result */
1277 if (werror) {
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,
1286 WERROR *werror)
1288 struct netr_NETRLOGONCOMPUTECLIENTDIGEST r;
1289 NTSTATUS status;
1291 /* In parameters */
1293 if (DEBUGLEVEL >= 10) {
1294 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1297 status = cli_do_rpc_ndr(cli,
1298 mem_ctx,
1299 PI_NETLOGON,
1300 &ndr_table_netlogon,
1301 NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST,
1302 &r);
1304 if (!NT_STATUS_IS_OK(status)) {
1305 return status;
1308 if (DEBUGLEVEL >= 10) {
1309 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1312 if (NT_STATUS_IS_ERR(status)) {
1313 return status;
1316 /* Return variables */
1318 /* Return result */
1319 if (werror) {
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;
1337 NTSTATUS status;
1339 /* In parameters */
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,
1352 mem_ctx,
1353 PI_NETLOGON,
1354 &ndr_table_netlogon,
1355 NDR_NETR_SERVERAUTHENTICATE3,
1356 &r);
1358 if (!NT_STATUS_IS_OK(status)) {
1359 return status;
1362 if (DEBUGLEVEL >= 10) {
1363 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, &r);
1366 if (NT_STATUS_IS_ERR(status)) {
1367 return status;
1370 /* Return variables */
1371 *credentials = *r.out.credentials;
1372 *negotiate_flags = *r.out.negotiate_flags;
1373 *rid = *r.out.rid;
1375 /* Return result */
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] */,
1387 WERROR *werror)
1389 struct netr_DsRGetDCNameEx r;
1390 NTSTATUS status;
1392 /* In parameters */
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;
1397 r.in.flags = flags;
1399 if (DEBUGLEVEL >= 10) {
1400 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &r);
1403 status = cli_do_rpc_ndr(cli,
1404 mem_ctx,
1405 PI_NETLOGON,
1406 &ndr_table_netlogon,
1407 NDR_NETR_DSRGETDCNAMEEX,
1408 &r);
1410 if (!NT_STATUS_IS_OK(status)) {
1411 return status;
1414 if (DEBUGLEVEL >= 10) {
1415 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, &r);
1418 if (NT_STATUS_IS_ERR(status)) {
1419 return status;
1422 /* Return variables */
1423 *info = *r.out.info;
1425 /* Return result */
1426 if (werror) {
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)] */,
1437 WERROR *werror)
1439 struct netr_DsRGetSiteName r;
1440 NTSTATUS status;
1442 /* In parameters */
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,
1450 mem_ctx,
1451 PI_NETLOGON,
1452 &ndr_table_netlogon,
1453 NDR_NETR_DSRGETSITENAME,
1454 &r);
1456 if (!NT_STATUS_IS_OK(status)) {
1457 return status;
1460 if (DEBUGLEVEL >= 10) {
1461 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, &r);
1464 if (NT_STATUS_IS_ERR(status)) {
1465 return status;
1468 /* Return variables */
1469 *site = *r.out.site;
1471 /* Return result */
1472 if (werror) {
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;
1490 NTSTATUS status;
1492 /* In parameters */
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;
1497 r.in.level = level;
1498 r.in.query = query;
1500 if (DEBUGLEVEL >= 10) {
1501 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, &r);
1504 status = cli_do_rpc_ndr(cli,
1505 mem_ctx,
1506 PI_NETLOGON,
1507 &ndr_table_netlogon,
1508 NDR_NETR_LOGONGETDOMAININFO,
1509 &r);
1511 if (!NT_STATUS_IS_OK(status)) {
1512 return status;
1515 if (DEBUGLEVEL >= 10) {
1516 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, &r);
1519 if (NT_STATUS_IS_ERR(status)) {
1520 return status;
1523 /* Return variables */
1524 *return_authenticator = *r.out.return_authenticator;
1525 *info = *r.out.info;
1527 /* Return result */
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;
1542 NTSTATUS status;
1544 /* In parameters */
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,
1557 mem_ctx,
1558 PI_NETLOGON,
1559 &ndr_table_netlogon,
1560 NDR_NETR_SERVERPASSWORDSET2,
1561 &r);
1563 if (!NT_STATUS_IS_OK(status)) {
1564 return status;
1567 if (DEBUGLEVEL >= 10) {
1568 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, &r);
1571 if (NT_STATUS_IS_ERR(status)) {
1572 return status;
1575 /* Return variables */
1576 *return_authenticator = *r.out.return_authenticator;
1578 /* Return result */
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] */,
1591 WERROR *werror)
1593 struct netr_ServerPasswordGet r;
1594 NTSTATUS status;
1596 /* In parameters */
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,
1608 mem_ctx,
1609 PI_NETLOGON,
1610 &ndr_table_netlogon,
1611 NDR_NETR_SERVERPASSWORDGET,
1612 &r);
1614 if (!NT_STATUS_IS_OK(status)) {
1615 return status;
1618 if (DEBUGLEVEL >= 10) {
1619 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, &r);
1622 if (NT_STATUS_IS_ERR(status)) {
1623 return status;
1626 /* Return variables */
1627 *return_authenticator = *r.out.return_authenticator;
1628 *password = *r.out.password;
1630 /* Return result */
1631 if (werror) {
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,
1640 WERROR *werror)
1642 struct netr_NETRLOGONSENDTOSAM r;
1643 NTSTATUS status;
1645 /* In parameters */
1647 if (DEBUGLEVEL >= 10) {
1648 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1651 status = cli_do_rpc_ndr(cli,
1652 mem_ctx,
1653 PI_NETLOGON,
1654 &ndr_table_netlogon,
1655 NDR_NETR_NETRLOGONSENDTOSAM,
1656 &r);
1658 if (!NT_STATUS_IS_OK(status)) {
1659 return status;
1662 if (DEBUGLEVEL >= 10) {
1663 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1666 if (NT_STATUS_IS_ERR(status)) {
1667 return status;
1670 /* Return variables */
1672 /* Return result */
1673 if (werror) {
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] */,
1686 WERROR *werror)
1688 struct netr_DsRAddressToSitenamesW r;
1689 NTSTATUS status;
1691 /* In parameters */
1692 r.in.server_name = server_name;
1693 r.in.count = count;
1694 r.in.addresses = addresses;
1696 if (DEBUGLEVEL >= 10) {
1697 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, &r);
1700 status = cli_do_rpc_ndr(cli,
1701 mem_ctx,
1702 PI_NETLOGON,
1703 &ndr_table_netlogon,
1704 NDR_NETR_DSRADDRESSTOSITENAMESW,
1705 &r);
1707 if (!NT_STATUS_IS_OK(status)) {
1708 return status;
1711 if (DEBUGLEVEL >= 10) {
1712 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, &r);
1715 if (NT_STATUS_IS_ERR(status)) {
1716 return status;
1719 /* Return variables */
1720 *ctr = *r.out.ctr;
1722 /* Return result */
1723 if (werror) {
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] */,
1740 WERROR *werror)
1742 struct netr_DsRGetDCNameEx2 r;
1743 NTSTATUS status;
1745 /* In parameters */
1746 r.in.server_unc = server_unc;
1747 r.in.client_account = client_account;
1748 r.in.mask = mask;
1749 r.in.domain_name = domain_name;
1750 r.in.domain_guid = domain_guid;
1751 r.in.site_name = site_name;
1752 r.in.flags = flags;
1754 if (DEBUGLEVEL >= 10) {
1755 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &r);
1758 status = cli_do_rpc_ndr(cli,
1759 mem_ctx,
1760 PI_NETLOGON,
1761 &ndr_table_netlogon,
1762 NDR_NETR_DSRGETDCNAMEEX2,
1763 &r);
1765 if (!NT_STATUS_IS_OK(status)) {
1766 return status;
1769 if (DEBUGLEVEL >= 10) {
1770 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, &r);
1773 if (NT_STATUS_IS_ERR(status)) {
1774 return status;
1777 /* Return variables */
1778 *info = *r.out.info;
1780 /* Return result */
1781 if (werror) {
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,
1790 WERROR *werror)
1792 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r;
1793 NTSTATUS status;
1795 /* In parameters */
1797 if (DEBUGLEVEL >= 10) {
1798 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1801 status = cli_do_rpc_ndr(cli,
1802 mem_ctx,
1803 PI_NETLOGON,
1804 &ndr_table_netlogon,
1805 NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
1806 &r);
1808 if (!NT_STATUS_IS_OK(status)) {
1809 return status;
1812 if (DEBUGLEVEL >= 10) {
1813 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1816 if (NT_STATUS_IS_ERR(status)) {
1817 return status;
1820 /* Return variables */
1822 /* Return result */
1823 if (werror) {
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] */,
1834 WERROR *werror)
1836 struct netr_NetrEnumerateTrustedDomainsEx r;
1837 NTSTATUS status;
1839 /* In parameters */
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,
1847 mem_ctx,
1848 PI_NETLOGON,
1849 &ndr_table_netlogon,
1850 NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX,
1851 &r);
1853 if (!NT_STATUS_IS_OK(status)) {
1854 return status;
1857 if (DEBUGLEVEL >= 10) {
1858 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
1861 if (NT_STATUS_IS_ERR(status)) {
1862 return status;
1865 /* Return variables */
1866 *dom_trust_list = *r.out.dom_trust_list;
1868 /* Return result */
1869 if (werror) {
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] */,
1882 WERROR *werror)
1884 struct netr_DsRAddressToSitenamesExW r;
1885 NTSTATUS status;
1887 /* In parameters */
1888 r.in.server_name = server_name;
1889 r.in.count = count;
1890 r.in.addresses = addresses;
1892 if (DEBUGLEVEL >= 10) {
1893 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1896 status = cli_do_rpc_ndr(cli,
1897 mem_ctx,
1898 PI_NETLOGON,
1899 &ndr_table_netlogon,
1900 NDR_NETR_DSRADDRESSTOSITENAMESEXW,
1901 &r);
1903 if (!NT_STATUS_IS_OK(status)) {
1904 return status;
1907 if (DEBUGLEVEL >= 10) {
1908 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1911 if (NT_STATUS_IS_ERR(status)) {
1912 return status;
1915 /* Return variables */
1916 *ctr = *r.out.ctr;
1918 /* Return result */
1919 if (werror) {
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] */,
1930 WERROR *werror)
1932 struct netr_DsrGetDcSiteCoverageW r;
1933 NTSTATUS status;
1935 /* In parameters */
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,
1943 mem_ctx,
1944 PI_NETLOGON,
1945 &ndr_table_netlogon,
1946 NDR_NETR_DSRGETDCSITECOVERAGEW,
1947 &r);
1949 if (!NT_STATUS_IS_OK(status)) {
1950 return status;
1953 if (DEBUGLEVEL >= 10) {
1954 NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
1957 if (NT_STATUS_IS_ERR(status)) {
1958 return status;
1961 /* Return variables */
1962 *ctr = *r.out.ctr;
1964 /* Return result */
1965 if (werror) {
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;
1984 NTSTATUS status;
1986 /* In parameters */
1987 r.in.server_name = server_name;
1988 r.in.computer_name = computer_name;
1989 r.in.logon_level = logon_level;
1990 r.in.logon = logon;
1991 r.in.validation_level = validation_level;
1992 r.in.flags = flags;
1994 if (DEBUGLEVEL >= 10) {
1995 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &r);
1998 status = cli_do_rpc_ndr(cli,
1999 mem_ctx,
2000 PI_NETLOGON,
2001 &ndr_table_netlogon,
2002 NDR_NETR_LOGONSAMLOGONEX,
2003 &r);
2005 if (!NT_STATUS_IS_OK(status)) {
2006 return status;
2009 if (DEBUGLEVEL >= 10) {
2010 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, &r);
2013 if (NT_STATUS_IS_ERR(status)) {
2014 return status;
2017 /* Return variables */
2018 *validation = *r.out.validation;
2019 *authoritative = *r.out.authoritative;
2020 *flags = *r.out.flags;
2022 /* Return result */
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] */,
2031 WERROR *werror)
2033 struct netr_DsrEnumerateDomainTrusts r;
2034 NTSTATUS status;
2036 /* In parameters */
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,
2045 mem_ctx,
2046 PI_NETLOGON,
2047 &ndr_table_netlogon,
2048 NDR_NETR_DSRENUMERATEDOMAINTRUSTS,
2049 &r);
2051 if (!NT_STATUS_IS_OK(status)) {
2052 return status;
2055 if (DEBUGLEVEL >= 10) {
2056 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
2059 if (NT_STATUS_IS_ERR(status)) {
2060 return status;
2063 /* Return variables */
2064 *trusts = *r.out.trusts;
2066 /* Return result */
2067 if (werror) {
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)] */,
2081 WERROR *werror)
2083 struct netr_DsrDeregisterDNSHostRecords r;
2084 NTSTATUS status;
2086 /* In parameters */
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,
2098 mem_ctx,
2099 PI_NETLOGON,
2100 &ndr_table_netlogon,
2101 NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS,
2102 &r);
2104 if (!NT_STATUS_IS_OK(status)) {
2105 return status;
2108 if (DEBUGLEVEL >= 10) {
2109 NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, &r);
2112 if (NT_STATUS_IS_ERR(status)) {
2113 return status;
2116 /* Return variables */
2118 /* Return result */
2119 if (werror) {
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;
2138 NTSTATUS status;
2140 /* In parameters */
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,
2152 mem_ctx,
2153 PI_NETLOGON,
2154 &ndr_table_netlogon,
2155 NDR_NETR_SERVERTRUSTPASSWORDSGET,
2156 &r);
2158 if (!NT_STATUS_IS_OK(status)) {
2159 return status;
2162 if (DEBUGLEVEL >= 10) {
2163 NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, &r);
2166 if (NT_STATUS_IS_ERR(status)) {
2167 return status;
2170 /* Return variables */
2171 *return_authenticator = *r.out.return_authenticator;
2172 *password = *r.out.password;
2173 *password2 = *r.out.password2;
2175 /* Return result */
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] */,
2185 WERROR *werror)
2187 struct netr_DsRGetForestTrustInformation r;
2188 NTSTATUS status;
2190 /* In parameters */
2191 r.in.server_name = server_name;
2192 r.in.trusted_domain_name = trusted_domain_name;
2193 r.in.flags = flags;
2195 if (DEBUGLEVEL >= 10) {
2196 NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, &r);
2199 status = cli_do_rpc_ndr(cli,
2200 mem_ctx,
2201 PI_NETLOGON,
2202 &ndr_table_netlogon,
2203 NDR_NETR_DSRGETFORESTTRUSTINFORMATION,
2204 &r);
2206 if (!NT_STATUS_IS_OK(status)) {
2207 return status;
2210 if (DEBUGLEVEL >= 10) {
2211 NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, &r);
2214 if (NT_STATUS_IS_ERR(status)) {
2215 return status;
2218 /* Return variables */
2219 *forest_trust_info = *r.out.forest_trust_info;
2221 /* Return result */
2222 if (werror) {
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] */,
2237 WERROR *werror)
2239 struct netr_GetForestTrustInformation r;
2240 NTSTATUS status;
2242 /* In parameters */
2243 r.in.server_name = server_name;
2244 r.in.trusted_domain_name = trusted_domain_name;
2245 r.in.credential = credential;
2246 r.in.flags = flags;
2248 if (DEBUGLEVEL >= 10) {
2249 NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, &r);
2252 status = cli_do_rpc_ndr(cli,
2253 mem_ctx,
2254 PI_NETLOGON,
2255 &ndr_table_netlogon,
2256 NDR_NETR_GETFORESTTRUSTINFORMATION,
2257 &r);
2259 if (!NT_STATUS_IS_OK(status)) {
2260 return status;
2263 if (DEBUGLEVEL >= 10) {
2264 NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, &r);
2267 if (NT_STATUS_IS_ERR(status)) {
2268 return status;
2271 /* Return variables */
2272 *return_authenticator = *r.out.return_authenticator;
2273 *forest_trust_info = *r.out.forest_trust_info;
2275 /* Return result */
2276 if (werror) {
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;
2297 NTSTATUS status;
2299 /* In parameters */
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;
2305 r.in.logon = logon;
2306 r.in.validation_level = validation_level;
2307 r.in.flags = flags;
2309 if (DEBUGLEVEL >= 10) {
2310 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, &r);
2313 status = cli_do_rpc_ndr(cli,
2314 mem_ctx,
2315 PI_NETLOGON,
2316 &ndr_table_netlogon,
2317 NDR_NETR_LOGONSAMLOGONWITHFLAGS,
2318 &r);
2320 if (!NT_STATUS_IS_OK(status)) {
2321 return status;
2324 if (DEBUGLEVEL >= 10) {
2325 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, &r);
2328 if (NT_STATUS_IS_ERR(status)) {
2329 return 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;
2340 /* Return result */
2341 return r.out.result;
2344 NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli,
2345 TALLOC_CTX *mem_ctx,
2346 WERROR *werror)
2348 struct netr_NETRSERVERGETTRUSTINFO r;
2349 NTSTATUS status;
2351 /* In parameters */
2353 if (DEBUGLEVEL >= 10) {
2354 NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
2357 status = cli_do_rpc_ndr(cli,
2358 mem_ctx,
2359 PI_NETLOGON,
2360 &ndr_table_netlogon,
2361 NDR_NETR_NETRSERVERGETTRUSTINFO,
2362 &r);
2364 if (!NT_STATUS_IS_OK(status)) {
2365 return status;
2368 if (DEBUGLEVEL >= 10) {
2369 NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
2372 if (NT_STATUS_IS_ERR(status)) {
2373 return status;
2376 /* Return variables */
2378 /* Return result */
2379 if (werror) {
2380 *werror = r.out.result;
2383 return werror_to_ntstatus(r.out.result);