Fix standalone configure scripts
[Samba.git] / librpc / gen_ndr / cli_netlogon.c
blob456bb71a3db5877b8b392abe511739bf9453749e
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->dispatch(cli,
30 mem_ctx,
31 &ndr_table_netlogon,
32 NDR_NETR_LOGONUASLOGON,
33 &r);
35 if (!NT_STATUS_IS_OK(status)) {
36 return status;
39 if (DEBUGLEVEL >= 10) {
40 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon, &r);
43 if (NT_STATUS_IS_ERR(status)) {
44 return status;
47 /* Return variables */
48 *info = *r.out.info;
50 /* Return result */
51 if (werror) {
52 *werror = r.out.result;
55 return werror_to_ntstatus(r.out.result);
58 NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli,
59 TALLOC_CTX *mem_ctx,
60 const char *server_name /* [in] [unique,charset(UTF16)] */,
61 const char *account_name /* [in] [charset(UTF16)] */,
62 const char *workstation /* [in] [charset(UTF16)] */,
63 struct netr_UasLogoffInfo *info /* [out] [ref] */,
64 WERROR *werror)
66 struct netr_LogonUasLogoff r;
67 NTSTATUS status;
69 /* In parameters */
70 r.in.server_name = server_name;
71 r.in.account_name = account_name;
72 r.in.workstation = workstation;
74 if (DEBUGLEVEL >= 10) {
75 NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff, &r);
78 status = cli->dispatch(cli,
79 mem_ctx,
80 &ndr_table_netlogon,
81 NDR_NETR_LOGONUASLOGOFF,
82 &r);
84 if (!NT_STATUS_IS_OK(status)) {
85 return status;
88 if (DEBUGLEVEL >= 10) {
89 NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, &r);
92 if (NT_STATUS_IS_ERR(status)) {
93 return status;
96 /* Return variables */
97 *info = *r.out.info;
99 /* Return result */
100 if (werror) {
101 *werror = r.out.result;
104 return werror_to_ntstatus(r.out.result);
107 NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli,
108 TALLOC_CTX *mem_ctx,
109 const char *server_name /* [in] [unique,charset(UTF16)] */,
110 const char *computer_name /* [in] [unique,charset(UTF16)] */,
111 struct netr_Authenticator *credential /* [in] [unique] */,
112 struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
113 enum netr_LogonInfoClass logon_level /* [in] */,
114 union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */,
115 uint16_t validation_level /* [in] */,
116 union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
117 uint8_t *authoritative /* [out] [ref] */)
119 struct netr_LogonSamLogon r;
120 NTSTATUS status;
122 /* In parameters */
123 r.in.server_name = server_name;
124 r.in.computer_name = computer_name;
125 r.in.credential = credential;
126 r.in.return_authenticator = return_authenticator;
127 r.in.logon_level = logon_level;
128 r.in.logon = logon;
129 r.in.validation_level = validation_level;
131 if (DEBUGLEVEL >= 10) {
132 NDR_PRINT_IN_DEBUG(netr_LogonSamLogon, &r);
135 status = cli->dispatch(cli,
136 mem_ctx,
137 &ndr_table_netlogon,
138 NDR_NETR_LOGONSAMLOGON,
139 &r);
141 if (!NT_STATUS_IS_OK(status)) {
142 return status;
145 if (DEBUGLEVEL >= 10) {
146 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, &r);
149 if (NT_STATUS_IS_ERR(status)) {
150 return status;
153 /* Return variables */
154 if (return_authenticator && r.out.return_authenticator) {
155 *return_authenticator = *r.out.return_authenticator;
157 *validation = *r.out.validation;
158 *authoritative = *r.out.authoritative;
160 /* Return result */
161 return r.out.result;
164 NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli,
165 TALLOC_CTX *mem_ctx,
166 const char *server_name /* [in] [unique,charset(UTF16)] */,
167 const char *computer_name /* [in] [unique,charset(UTF16)] */,
168 struct netr_Authenticator *credential /* [in] [unique] */,
169 struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
170 enum netr_LogonInfoClass logon_level /* [in] */,
171 union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */)
173 struct netr_LogonSamLogoff r;
174 NTSTATUS status;
176 /* In parameters */
177 r.in.server_name = server_name;
178 r.in.computer_name = computer_name;
179 r.in.credential = credential;
180 r.in.return_authenticator = return_authenticator;
181 r.in.logon_level = logon_level;
182 r.in.logon = logon;
184 if (DEBUGLEVEL >= 10) {
185 NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff, &r);
188 status = cli->dispatch(cli,
189 mem_ctx,
190 &ndr_table_netlogon,
191 NDR_NETR_LOGONSAMLOGOFF,
192 &r);
194 if (!NT_STATUS_IS_OK(status)) {
195 return status;
198 if (DEBUGLEVEL >= 10) {
199 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, &r);
202 if (NT_STATUS_IS_ERR(status)) {
203 return status;
206 /* Return variables */
207 if (return_authenticator && r.out.return_authenticator) {
208 *return_authenticator = *r.out.return_authenticator;
211 /* Return result */
212 return r.out.result;
215 NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
216 TALLOC_CTX *mem_ctx,
217 const char *server_name /* [in] [unique,charset(UTF16)] */,
218 const char *computer_name /* [in] [charset(UTF16)] */,
219 struct netr_Credential *credentials /* [in] [ref] */,
220 struct netr_Credential *return_credentials /* [out] [ref] */)
222 struct netr_ServerReqChallenge r;
223 NTSTATUS status;
225 /* In parameters */
226 r.in.server_name = server_name;
227 r.in.computer_name = computer_name;
228 r.in.credentials = credentials;
230 if (DEBUGLEVEL >= 10) {
231 NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge, &r);
234 status = cli->dispatch(cli,
235 mem_ctx,
236 &ndr_table_netlogon,
237 NDR_NETR_SERVERREQCHALLENGE,
238 &r);
240 if (!NT_STATUS_IS_OK(status)) {
241 return status;
244 if (DEBUGLEVEL >= 10) {
245 NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, &r);
248 if (NT_STATUS_IS_ERR(status)) {
249 return status;
252 /* Return variables */
253 *return_credentials = *r.out.return_credentials;
255 /* Return result */
256 return r.out.result;
259 NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
260 TALLOC_CTX *mem_ctx,
261 const char *server_name /* [in] [unique,charset(UTF16)] */,
262 const char *account_name /* [in] [charset(UTF16)] */,
263 enum netr_SchannelType secure_channel_type /* [in] */,
264 const char *computer_name /* [in] [charset(UTF16)] */,
265 struct netr_Credential *credentials /* [in] [ref] */,
266 struct netr_Credential *return_credentials /* [out] [ref] */)
268 struct netr_ServerAuthenticate r;
269 NTSTATUS status;
271 /* In parameters */
272 r.in.server_name = server_name;
273 r.in.account_name = account_name;
274 r.in.secure_channel_type = secure_channel_type;
275 r.in.computer_name = computer_name;
276 r.in.credentials = credentials;
278 if (DEBUGLEVEL >= 10) {
279 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate, &r);
282 status = cli->dispatch(cli,
283 mem_ctx,
284 &ndr_table_netlogon,
285 NDR_NETR_SERVERAUTHENTICATE,
286 &r);
288 if (!NT_STATUS_IS_OK(status)) {
289 return status;
292 if (DEBUGLEVEL >= 10) {
293 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, &r);
296 if (NT_STATUS_IS_ERR(status)) {
297 return status;
300 /* Return variables */
301 *return_credentials = *r.out.return_credentials;
303 /* Return result */
304 return r.out.result;
307 NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
308 TALLOC_CTX *mem_ctx,
309 const char *server_name /* [in] [unique,charset(UTF16)] */,
310 const char *account_name /* [in] [charset(UTF16)] */,
311 enum netr_SchannelType secure_channel_type /* [in] */,
312 const char *computer_name /* [in] [charset(UTF16)] */,
313 struct netr_Authenticator *credential /* [in] [ref] */,
314 struct netr_Authenticator *return_authenticator /* [out] [ref] */,
315 struct samr_Password *new_password /* [in] [ref] */)
317 struct netr_ServerPasswordSet r;
318 NTSTATUS status;
320 /* In parameters */
321 r.in.server_name = server_name;
322 r.in.account_name = account_name;
323 r.in.secure_channel_type = secure_channel_type;
324 r.in.computer_name = computer_name;
325 r.in.credential = credential;
326 r.in.new_password = new_password;
328 if (DEBUGLEVEL >= 10) {
329 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, &r);
332 status = cli->dispatch(cli,
333 mem_ctx,
334 &ndr_table_netlogon,
335 NDR_NETR_SERVERPASSWORDSET,
336 &r);
338 if (!NT_STATUS_IS_OK(status)) {
339 return status;
342 if (DEBUGLEVEL >= 10) {
343 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, &r);
346 if (NT_STATUS_IS_ERR(status)) {
347 return status;
350 /* Return variables */
351 *return_authenticator = *r.out.return_authenticator;
353 /* Return result */
354 return r.out.result;
357 NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli,
358 TALLOC_CTX *mem_ctx,
359 const char *logon_server /* [in] [charset(UTF16)] */,
360 const char *computername /* [in] [charset(UTF16)] */,
361 struct netr_Authenticator *credential /* [in] [ref] */,
362 struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
363 enum netr_SamDatabaseID database_id /* [in] */,
364 uint64_t *sequence_num /* [in,out] [ref] */,
365 struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */,
366 uint32_t preferredmaximumlength /* [in] */)
368 struct netr_DatabaseDeltas r;
369 NTSTATUS status;
371 /* In parameters */
372 r.in.logon_server = logon_server;
373 r.in.computername = computername;
374 r.in.credential = credential;
375 r.in.return_authenticator = return_authenticator;
376 r.in.database_id = database_id;
377 r.in.sequence_num = sequence_num;
378 r.in.preferredmaximumlength = preferredmaximumlength;
380 if (DEBUGLEVEL >= 10) {
381 NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas, &r);
384 status = cli->dispatch(cli,
385 mem_ctx,
386 &ndr_table_netlogon,
387 NDR_NETR_DATABASEDELTAS,
388 &r);
390 if (!NT_STATUS_IS_OK(status)) {
391 return status;
394 if (DEBUGLEVEL >= 10) {
395 NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, &r);
398 if (NT_STATUS_IS_ERR(status)) {
399 return status;
402 /* Return variables */
403 *return_authenticator = *r.out.return_authenticator;
404 *sequence_num = *r.out.sequence_num;
405 *delta_enum_array = *r.out.delta_enum_array;
407 /* Return result */
408 return r.out.result;
411 NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli,
412 TALLOC_CTX *mem_ctx,
413 const char *logon_server /* [in] [charset(UTF16)] */,
414 const char *computername /* [in] [charset(UTF16)] */,
415 struct netr_Authenticator *credential /* [in] [ref] */,
416 struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
417 enum netr_SamDatabaseID database_id /* [in] */,
418 uint32_t *sync_context /* [in,out] [ref] */,
419 struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */,
420 uint32_t preferredmaximumlength /* [in] */)
422 struct netr_DatabaseSync r;
423 NTSTATUS status;
425 /* In parameters */
426 r.in.logon_server = logon_server;
427 r.in.computername = computername;
428 r.in.credential = credential;
429 r.in.return_authenticator = return_authenticator;
430 r.in.database_id = database_id;
431 r.in.sync_context = sync_context;
432 r.in.preferredmaximumlength = preferredmaximumlength;
434 if (DEBUGLEVEL >= 10) {
435 NDR_PRINT_IN_DEBUG(netr_DatabaseSync, &r);
438 status = cli->dispatch(cli,
439 mem_ctx,
440 &ndr_table_netlogon,
441 NDR_NETR_DATABASESYNC,
442 &r);
444 if (!NT_STATUS_IS_OK(status)) {
445 return status;
448 if (DEBUGLEVEL >= 10) {
449 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, &r);
452 if (NT_STATUS_IS_ERR(status)) {
453 return status;
456 /* Return variables */
457 *return_authenticator = *r.out.return_authenticator;
458 *sync_context = *r.out.sync_context;
459 *delta_enum_array = *r.out.delta_enum_array;
461 /* Return result */
462 return r.out.result;
465 NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli,
466 TALLOC_CTX *mem_ctx,
467 const char *logon_server /* [in] [unique,charset(UTF16)] */,
468 const char *computername /* [in] [charset(UTF16)] */,
469 struct netr_Authenticator credential /* [in] */,
470 struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
471 struct netr_UAS_INFO_0 uas /* [in] */,
472 uint32_t count /* [in] */,
473 uint32_t level /* [in] */,
474 uint32_t buffersize /* [in] */,
475 struct netr_AccountBuffer *buffer /* [out] [ref,subcontext(4)] */,
476 uint32_t *count_returned /* [out] [ref] */,
477 uint32_t *total_entries /* [out] [ref] */,
478 struct netr_UAS_INFO_0 *recordid /* [out] [ref] */)
480 struct netr_AccountDeltas r;
481 NTSTATUS status;
483 /* In parameters */
484 r.in.logon_server = logon_server;
485 r.in.computername = computername;
486 r.in.credential = credential;
487 r.in.return_authenticator = return_authenticator;
488 r.in.uas = uas;
489 r.in.count = count;
490 r.in.level = level;
491 r.in.buffersize = buffersize;
493 if (DEBUGLEVEL >= 10) {
494 NDR_PRINT_IN_DEBUG(netr_AccountDeltas, &r);
497 status = cli->dispatch(cli,
498 mem_ctx,
499 &ndr_table_netlogon,
500 NDR_NETR_ACCOUNTDELTAS,
501 &r);
503 if (!NT_STATUS_IS_OK(status)) {
504 return status;
507 if (DEBUGLEVEL >= 10) {
508 NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, &r);
511 if (NT_STATUS_IS_ERR(status)) {
512 return status;
515 /* Return variables */
516 *return_authenticator = *r.out.return_authenticator;
517 *buffer = *r.out.buffer;
518 *count_returned = *r.out.count_returned;
519 *total_entries = *r.out.total_entries;
520 *recordid = *r.out.recordid;
522 /* Return result */
523 return r.out.result;
526 NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli,
527 TALLOC_CTX *mem_ctx,
528 const char *logon_server /* [in] [unique,charset(UTF16)] */,
529 const char *computername /* [in] [charset(UTF16)] */,
530 struct netr_Authenticator credential /* [in] */,
531 struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
532 uint32_t reference /* [in] */,
533 uint32_t level /* [in] */,
534 uint32_t buffersize /* [in] */,
535 struct netr_AccountBuffer *buffer /* [out] [ref,subcontext(4)] */,
536 uint32_t *count_returned /* [out] [ref] */,
537 uint32_t *total_entries /* [out] [ref] */,
538 uint32_t *next_reference /* [out] [ref] */,
539 struct netr_UAS_INFO_0 *recordid /* [in,out] [ref] */)
541 struct netr_AccountSync r;
542 NTSTATUS status;
544 /* In parameters */
545 r.in.logon_server = logon_server;
546 r.in.computername = computername;
547 r.in.credential = credential;
548 r.in.return_authenticator = return_authenticator;
549 r.in.reference = reference;
550 r.in.level = level;
551 r.in.buffersize = buffersize;
552 r.in.recordid = recordid;
554 if (DEBUGLEVEL >= 10) {
555 NDR_PRINT_IN_DEBUG(netr_AccountSync, &r);
558 status = cli->dispatch(cli,
559 mem_ctx,
560 &ndr_table_netlogon,
561 NDR_NETR_ACCOUNTSYNC,
562 &r);
564 if (!NT_STATUS_IS_OK(status)) {
565 return status;
568 if (DEBUGLEVEL >= 10) {
569 NDR_PRINT_OUT_DEBUG(netr_AccountSync, &r);
572 if (NT_STATUS_IS_ERR(status)) {
573 return status;
576 /* Return variables */
577 *return_authenticator = *r.out.return_authenticator;
578 *buffer = *r.out.buffer;
579 *count_returned = *r.out.count_returned;
580 *total_entries = *r.out.total_entries;
581 *next_reference = *r.out.next_reference;
582 *recordid = *r.out.recordid;
584 /* Return result */
585 return r.out.result;
588 NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli,
589 TALLOC_CTX *mem_ctx,
590 const char *logon_server /* [in] [charset(UTF16)] */,
591 const char *domainname /* [in] [unique,charset(UTF16)] */,
592 const char **dcname /* [out] [ref,charset(UTF16)] */,
593 WERROR *werror)
595 struct netr_GetDcName r;
596 NTSTATUS status;
598 /* In parameters */
599 r.in.logon_server = logon_server;
600 r.in.domainname = domainname;
602 if (DEBUGLEVEL >= 10) {
603 NDR_PRINT_IN_DEBUG(netr_GetDcName, &r);
606 status = cli->dispatch(cli,
607 mem_ctx,
608 &ndr_table_netlogon,
609 NDR_NETR_GETDCNAME,
610 &r);
612 if (!NT_STATUS_IS_OK(status)) {
613 return status;
616 if (DEBUGLEVEL >= 10) {
617 NDR_PRINT_OUT_DEBUG(netr_GetDcName, &r);
620 if (NT_STATUS_IS_ERR(status)) {
621 return status;
624 /* Return variables */
625 *dcname = *r.out.dcname;
627 /* Return result */
628 if (werror) {
629 *werror = r.out.result;
632 return werror_to_ntstatus(r.out.result);
635 NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli,
636 TALLOC_CTX *mem_ctx,
637 const char *logon_server /* [in] [unique,charset(UTF16)] */,
638 enum netr_LogonControlCode function_code /* [in] */,
639 uint32_t level /* [in] */,
640 union netr_CONTROL_QUERY_INFORMATION *info /* [out] [ref,switch_is(level)] */,
641 WERROR *werror)
643 struct netr_LogonControl r;
644 NTSTATUS status;
646 /* In parameters */
647 r.in.logon_server = logon_server;
648 r.in.function_code = function_code;
649 r.in.level = level;
651 if (DEBUGLEVEL >= 10) {
652 NDR_PRINT_IN_DEBUG(netr_LogonControl, &r);
655 status = cli->dispatch(cli,
656 mem_ctx,
657 &ndr_table_netlogon,
658 NDR_NETR_LOGONCONTROL,
659 &r);
661 if (!NT_STATUS_IS_OK(status)) {
662 return status;
665 if (DEBUGLEVEL >= 10) {
666 NDR_PRINT_OUT_DEBUG(netr_LogonControl, &r);
669 if (NT_STATUS_IS_ERR(status)) {
670 return status;
673 /* Return variables */
674 *info = *r.out.info;
676 /* Return result */
677 if (werror) {
678 *werror = r.out.result;
681 return werror_to_ntstatus(r.out.result);
684 NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli,
685 TALLOC_CTX *mem_ctx,
686 const char *logon_server /* [in] [unique,charset(UTF16)] */,
687 const char *domainname /* [in] [unique,charset(UTF16)] */,
688 const char **dcname /* [out] [ref,charset(UTF16)] */,
689 WERROR *werror)
691 struct netr_GetAnyDCName r;
692 NTSTATUS status;
694 /* In parameters */
695 r.in.logon_server = logon_server;
696 r.in.domainname = domainname;
698 if (DEBUGLEVEL >= 10) {
699 NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, &r);
702 status = cli->dispatch(cli,
703 mem_ctx,
704 &ndr_table_netlogon,
705 NDR_NETR_GETANYDCNAME,
706 &r);
708 if (!NT_STATUS_IS_OK(status)) {
709 return status;
712 if (DEBUGLEVEL >= 10) {
713 NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, &r);
716 if (NT_STATUS_IS_ERR(status)) {
717 return status;
720 /* Return variables */
721 *dcname = *r.out.dcname;
723 /* Return result */
724 if (werror) {
725 *werror = r.out.result;
728 return werror_to_ntstatus(r.out.result);
731 NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli,
732 TALLOC_CTX *mem_ctx,
733 const char *logon_server /* [in] [unique,charset(UTF16)] */,
734 enum netr_LogonControlCode function_code /* [in] */,
735 uint32_t level /* [in] */,
736 union netr_CONTROL_DATA_INFORMATION *data /* [in] [ref,switch_is(function_code)] */,
737 union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */,
738 WERROR *werror)
740 struct netr_LogonControl2 r;
741 NTSTATUS status;
743 /* In parameters */
744 r.in.logon_server = logon_server;
745 r.in.function_code = function_code;
746 r.in.level = level;
747 r.in.data = data;
749 if (DEBUGLEVEL >= 10) {
750 NDR_PRINT_IN_DEBUG(netr_LogonControl2, &r);
753 status = cli->dispatch(cli,
754 mem_ctx,
755 &ndr_table_netlogon,
756 NDR_NETR_LOGONCONTROL2,
757 &r);
759 if (!NT_STATUS_IS_OK(status)) {
760 return status;
763 if (DEBUGLEVEL >= 10) {
764 NDR_PRINT_OUT_DEBUG(netr_LogonControl2, &r);
767 if (NT_STATUS_IS_ERR(status)) {
768 return status;
771 /* Return variables */
772 *query = *r.out.query;
774 /* Return result */
775 if (werror) {
776 *werror = r.out.result;
779 return werror_to_ntstatus(r.out.result);
782 NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
783 TALLOC_CTX *mem_ctx,
784 const char *server_name /* [in] [unique,charset(UTF16)] */,
785 const char *account_name /* [in] [charset(UTF16)] */,
786 enum netr_SchannelType secure_channel_type /* [in] */,
787 const char *computer_name /* [in] [charset(UTF16)] */,
788 struct netr_Credential *credentials /* [in] [ref] */,
789 struct netr_Credential *return_credentials /* [out] [ref] */,
790 uint32_t *negotiate_flags /* [in,out] [ref] */)
792 struct netr_ServerAuthenticate2 r;
793 NTSTATUS status;
795 /* In parameters */
796 r.in.server_name = server_name;
797 r.in.account_name = account_name;
798 r.in.secure_channel_type = secure_channel_type;
799 r.in.computer_name = computer_name;
800 r.in.credentials = credentials;
801 r.in.negotiate_flags = negotiate_flags;
803 if (DEBUGLEVEL >= 10) {
804 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2, &r);
807 status = cli->dispatch(cli,
808 mem_ctx,
809 &ndr_table_netlogon,
810 NDR_NETR_SERVERAUTHENTICATE2,
811 &r);
813 if (!NT_STATUS_IS_OK(status)) {
814 return status;
817 if (DEBUGLEVEL >= 10) {
818 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, &r);
821 if (NT_STATUS_IS_ERR(status)) {
822 return status;
825 /* Return variables */
826 *return_credentials = *r.out.return_credentials;
827 *negotiate_flags = *r.out.negotiate_flags;
829 /* Return result */
830 return r.out.result;
833 NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
834 TALLOC_CTX *mem_ctx,
835 const char *logon_server /* [in] [charset(UTF16)] */,
836 const char *computername /* [in] [charset(UTF16)] */,
837 struct netr_Authenticator *credential /* [in] [ref] */,
838 struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
839 enum netr_SamDatabaseID database_id /* [in] */,
840 uint16_t restart_state /* [in] */,
841 uint32_t *sync_context /* [in,out] [ref] */,
842 struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */,
843 uint32_t preferredmaximumlength /* [in] */)
845 struct netr_DatabaseSync2 r;
846 NTSTATUS status;
848 /* In parameters */
849 r.in.logon_server = logon_server;
850 r.in.computername = computername;
851 r.in.credential = credential;
852 r.in.return_authenticator = return_authenticator;
853 r.in.database_id = database_id;
854 r.in.restart_state = restart_state;
855 r.in.sync_context = sync_context;
856 r.in.preferredmaximumlength = preferredmaximumlength;
858 if (DEBUGLEVEL >= 10) {
859 NDR_PRINT_IN_DEBUG(netr_DatabaseSync2, &r);
862 status = cli->dispatch(cli,
863 mem_ctx,
864 &ndr_table_netlogon,
865 NDR_NETR_DATABASESYNC2,
866 &r);
868 if (!NT_STATUS_IS_OK(status)) {
869 return status;
872 if (DEBUGLEVEL >= 10) {
873 NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, &r);
876 if (NT_STATUS_IS_ERR(status)) {
877 return status;
880 /* Return variables */
881 *return_authenticator = *r.out.return_authenticator;
882 *sync_context = *r.out.sync_context;
883 *delta_enum_array = *r.out.delta_enum_array;
885 /* Return result */
886 return r.out.result;
889 NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
890 TALLOC_CTX *mem_ctx,
891 const char *logon_server /* [in] [charset(UTF16)] */,
892 const char *computername /* [in] [charset(UTF16)] */,
893 struct netr_Authenticator *credential /* [in] [ref] */,
894 struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
895 struct netr_ChangeLogEntry change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */,
896 uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */,
897 struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */)
899 struct netr_DatabaseRedo r;
900 NTSTATUS status;
902 /* In parameters */
903 r.in.logon_server = logon_server;
904 r.in.computername = computername;
905 r.in.credential = credential;
906 r.in.return_authenticator = return_authenticator;
907 r.in.change_log_entry = change_log_entry;
908 r.in.change_log_entry_size = change_log_entry_size;
910 if (DEBUGLEVEL >= 10) {
911 NDR_PRINT_IN_DEBUG(netr_DatabaseRedo, &r);
914 status = cli->dispatch(cli,
915 mem_ctx,
916 &ndr_table_netlogon,
917 NDR_NETR_DATABASEREDO,
918 &r);
920 if (!NT_STATUS_IS_OK(status)) {
921 return status;
924 if (DEBUGLEVEL >= 10) {
925 NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, &r);
928 if (NT_STATUS_IS_ERR(status)) {
929 return status;
932 /* Return variables */
933 *return_authenticator = *r.out.return_authenticator;
934 *delta_enum_array = *r.out.delta_enum_array;
936 /* Return result */
937 return r.out.result;
940 NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
941 TALLOC_CTX *mem_ctx,
942 const char *logon_server /* [in] [unique,charset(UTF16)] */,
943 enum netr_LogonControlCode function_code /* [in] */,
944 uint32_t level /* [in] */,
945 union netr_CONTROL_DATA_INFORMATION *data /* [in] [ref,switch_is(function_code)] */,
946 union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */,
947 WERROR *werror)
949 struct netr_LogonControl2Ex r;
950 NTSTATUS status;
952 /* In parameters */
953 r.in.logon_server = logon_server;
954 r.in.function_code = function_code;
955 r.in.level = level;
956 r.in.data = data;
958 if (DEBUGLEVEL >= 10) {
959 NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &r);
962 status = cli->dispatch(cli,
963 mem_ctx,
964 &ndr_table_netlogon,
965 NDR_NETR_LOGONCONTROL2EX,
966 &r);
968 if (!NT_STATUS_IS_OK(status)) {
969 return status;
972 if (DEBUGLEVEL >= 10) {
973 NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, &r);
976 if (NT_STATUS_IS_ERR(status)) {
977 return status;
980 /* Return variables */
981 *query = *r.out.query;
983 /* Return result */
984 if (werror) {
985 *werror = r.out.result;
988 return werror_to_ntstatus(r.out.result);
991 NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli,
992 TALLOC_CTX *mem_ctx,
993 const char *server_name /* [in] [unique,charset(UTF16)] */,
994 struct netr_Blob *trusted_domains_blob /* [out] [ref] */,
995 WERROR *werror)
997 struct netr_NetrEnumerateTrustedDomains r;
998 NTSTATUS status;
1000 /* In parameters */
1001 r.in.server_name = server_name;
1003 if (DEBUGLEVEL >= 10) {
1004 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
1007 status = cli->dispatch(cli,
1008 mem_ctx,
1009 &ndr_table_netlogon,
1010 NDR_NETR_NETRENUMERATETRUSTEDDOMAINS,
1011 &r);
1013 if (!NT_STATUS_IS_OK(status)) {
1014 return status;
1017 if (DEBUGLEVEL >= 10) {
1018 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
1021 if (NT_STATUS_IS_ERR(status)) {
1022 return status;
1025 /* Return variables */
1026 *trusted_domains_blob = *r.out.trusted_domains_blob;
1028 /* Return result */
1029 if (werror) {
1030 *werror = r.out.result;
1033 return werror_to_ntstatus(r.out.result);
1036 NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
1037 TALLOC_CTX *mem_ctx,
1038 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1039 const char *domain_name /* [in] [unique,charset(UTF16)] */,
1040 struct GUID *domain_guid /* [in] [unique] */,
1041 struct GUID *site_guid /* [in] [unique] */,
1042 uint32_t flags /* [in] */,
1043 struct netr_DsRGetDCNameInfo **info /* [out] [ref] */,
1044 WERROR *werror)
1046 struct netr_DsRGetDCName r;
1047 NTSTATUS status;
1049 /* In parameters */
1050 r.in.server_unc = server_unc;
1051 r.in.domain_name = domain_name;
1052 r.in.domain_guid = domain_guid;
1053 r.in.site_guid = site_guid;
1054 r.in.flags = flags;
1056 if (DEBUGLEVEL >= 10) {
1057 NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &r);
1060 status = cli->dispatch(cli,
1061 mem_ctx,
1062 &ndr_table_netlogon,
1063 NDR_NETR_DSRGETDCNAME,
1064 &r);
1066 if (!NT_STATUS_IS_OK(status)) {
1067 return status;
1070 if (DEBUGLEVEL >= 10) {
1071 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, &r);
1074 if (NT_STATUS_IS_ERR(status)) {
1075 return status;
1078 /* Return variables */
1079 *info = *r.out.info;
1081 /* Return result */
1082 if (werror) {
1083 *werror = r.out.result;
1086 return werror_to_ntstatus(r.out.result);
1089 NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
1090 TALLOC_CTX *mem_ctx,
1091 WERROR *werror)
1093 struct netr_NETRLOGONDUMMYROUTINE1 r;
1094 NTSTATUS status;
1096 /* In parameters */
1098 if (DEBUGLEVEL >= 10) {
1099 NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1102 status = cli->dispatch(cli,
1103 mem_ctx,
1104 &ndr_table_netlogon,
1105 NDR_NETR_NETRLOGONDUMMYROUTINE1,
1106 &r);
1108 if (!NT_STATUS_IS_OK(status)) {
1109 return status;
1112 if (DEBUGLEVEL >= 10) {
1113 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
1116 if (NT_STATUS_IS_ERR(status)) {
1117 return status;
1120 /* Return variables */
1122 /* Return result */
1123 if (werror) {
1124 *werror = r.out.result;
1127 return werror_to_ntstatus(r.out.result);
1130 NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli,
1131 TALLOC_CTX *mem_ctx,
1132 WERROR *werror)
1134 struct netr_NETRLOGONSETSERVICEBITS r;
1135 NTSTATUS status;
1137 /* In parameters */
1139 if (DEBUGLEVEL >= 10) {
1140 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1143 status = cli->dispatch(cli,
1144 mem_ctx,
1145 &ndr_table_netlogon,
1146 NDR_NETR_NETRLOGONSETSERVICEBITS,
1147 &r);
1149 if (!NT_STATUS_IS_OK(status)) {
1150 return status;
1153 if (DEBUGLEVEL >= 10) {
1154 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
1157 if (NT_STATUS_IS_ERR(status)) {
1158 return status;
1161 /* Return variables */
1163 /* Return result */
1164 if (werror) {
1165 *werror = r.out.result;
1168 return werror_to_ntstatus(r.out.result);
1171 NTSTATUS rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client *cli,
1172 TALLOC_CTX *mem_ctx,
1173 const char *server_name /* [in] [unique,charset(UTF16)] */,
1174 const char *domain_name /* [in] [unique,charset(UTF16)] */,
1175 uint32_t *rid /* [out] [ref] */,
1176 WERROR *werror)
1178 struct netr_LogonGetTrustRid r;
1179 NTSTATUS status;
1181 /* In parameters */
1182 r.in.server_name = server_name;
1183 r.in.domain_name = domain_name;
1185 if (DEBUGLEVEL >= 10) {
1186 NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid, &r);
1189 status = cli->dispatch(cli,
1190 mem_ctx,
1191 &ndr_table_netlogon,
1192 NDR_NETR_LOGONGETTRUSTRID,
1193 &r);
1195 if (!NT_STATUS_IS_OK(status)) {
1196 return status;
1199 if (DEBUGLEVEL >= 10) {
1200 NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, &r);
1203 if (NT_STATUS_IS_ERR(status)) {
1204 return status;
1207 /* Return variables */
1208 *rid = *r.out.rid;
1210 /* Return result */
1211 if (werror) {
1212 *werror = r.out.result;
1215 return werror_to_ntstatus(r.out.result);
1218 NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli,
1219 TALLOC_CTX *mem_ctx,
1220 WERROR *werror)
1222 struct netr_NETRLOGONCOMPUTESERVERDIGEST r;
1223 NTSTATUS status;
1225 /* In parameters */
1227 if (DEBUGLEVEL >= 10) {
1228 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1231 status = cli->dispatch(cli,
1232 mem_ctx,
1233 &ndr_table_netlogon,
1234 NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST,
1235 &r);
1237 if (!NT_STATUS_IS_OK(status)) {
1238 return status;
1241 if (DEBUGLEVEL >= 10) {
1242 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
1245 if (NT_STATUS_IS_ERR(status)) {
1246 return status;
1249 /* Return variables */
1251 /* Return result */
1252 if (werror) {
1253 *werror = r.out.result;
1256 return werror_to_ntstatus(r.out.result);
1259 NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli,
1260 TALLOC_CTX *mem_ctx,
1261 WERROR *werror)
1263 struct netr_NETRLOGONCOMPUTECLIENTDIGEST r;
1264 NTSTATUS status;
1266 /* In parameters */
1268 if (DEBUGLEVEL >= 10) {
1269 NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1272 status = cli->dispatch(cli,
1273 mem_ctx,
1274 &ndr_table_netlogon,
1275 NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST,
1276 &r);
1278 if (!NT_STATUS_IS_OK(status)) {
1279 return status;
1282 if (DEBUGLEVEL >= 10) {
1283 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
1286 if (NT_STATUS_IS_ERR(status)) {
1287 return status;
1290 /* Return variables */
1292 /* Return result */
1293 if (werror) {
1294 *werror = r.out.result;
1297 return werror_to_ntstatus(r.out.result);
1300 NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli,
1301 TALLOC_CTX *mem_ctx,
1302 const char *server_name /* [in] [unique,charset(UTF16)] */,
1303 const char *account_name /* [in] [charset(UTF16)] */,
1304 enum netr_SchannelType secure_channel_type /* [in] */,
1305 const char *computer_name /* [in] [charset(UTF16)] */,
1306 struct netr_Credential *credentials /* [in] [ref] */,
1307 struct netr_Credential *return_credentials /* [out] [ref] */,
1308 uint32_t *negotiate_flags /* [in,out] [ref] */,
1309 uint32_t *rid /* [out] [ref] */)
1311 struct netr_ServerAuthenticate3 r;
1312 NTSTATUS status;
1314 /* In parameters */
1315 r.in.server_name = server_name;
1316 r.in.account_name = account_name;
1317 r.in.secure_channel_type = secure_channel_type;
1318 r.in.computer_name = computer_name;
1319 r.in.credentials = credentials;
1320 r.in.negotiate_flags = negotiate_flags;
1322 if (DEBUGLEVEL >= 10) {
1323 NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3, &r);
1326 status = cli->dispatch(cli,
1327 mem_ctx,
1328 &ndr_table_netlogon,
1329 NDR_NETR_SERVERAUTHENTICATE3,
1330 &r);
1332 if (!NT_STATUS_IS_OK(status)) {
1333 return status;
1336 if (DEBUGLEVEL >= 10) {
1337 NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, &r);
1340 if (NT_STATUS_IS_ERR(status)) {
1341 return status;
1344 /* Return variables */
1345 *return_credentials = *r.out.return_credentials;
1346 *negotiate_flags = *r.out.negotiate_flags;
1347 *rid = *r.out.rid;
1349 /* Return result */
1350 return r.out.result;
1353 NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli,
1354 TALLOC_CTX *mem_ctx,
1355 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1356 const char *domain_name /* [in] [unique,charset(UTF16)] */,
1357 struct GUID *domain_guid /* [in] [unique] */,
1358 const char *site_name /* [in] [unique,charset(UTF16)] */,
1359 uint32_t flags /* [in] */,
1360 struct netr_DsRGetDCNameInfo **info /* [out] [ref] */,
1361 WERROR *werror)
1363 struct netr_DsRGetDCNameEx r;
1364 NTSTATUS status;
1366 /* In parameters */
1367 r.in.server_unc = server_unc;
1368 r.in.domain_name = domain_name;
1369 r.in.domain_guid = domain_guid;
1370 r.in.site_name = site_name;
1371 r.in.flags = flags;
1373 if (DEBUGLEVEL >= 10) {
1374 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &r);
1377 status = cli->dispatch(cli,
1378 mem_ctx,
1379 &ndr_table_netlogon,
1380 NDR_NETR_DSRGETDCNAMEEX,
1381 &r);
1383 if (!NT_STATUS_IS_OK(status)) {
1384 return status;
1387 if (DEBUGLEVEL >= 10) {
1388 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, &r);
1391 if (NT_STATUS_IS_ERR(status)) {
1392 return status;
1395 /* Return variables */
1396 *info = *r.out.info;
1398 /* Return result */
1399 if (werror) {
1400 *werror = r.out.result;
1403 return werror_to_ntstatus(r.out.result);
1406 NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli,
1407 TALLOC_CTX *mem_ctx,
1408 const char *computer_name /* [in] [unique,charset(UTF16)] */,
1409 const char **site /* [out] [ref,charset(UTF16)] */,
1410 WERROR *werror)
1412 struct netr_DsRGetSiteName r;
1413 NTSTATUS status;
1415 /* In parameters */
1416 r.in.computer_name = computer_name;
1418 if (DEBUGLEVEL >= 10) {
1419 NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, &r);
1422 status = cli->dispatch(cli,
1423 mem_ctx,
1424 &ndr_table_netlogon,
1425 NDR_NETR_DSRGETSITENAME,
1426 &r);
1428 if (!NT_STATUS_IS_OK(status)) {
1429 return status;
1432 if (DEBUGLEVEL >= 10) {
1433 NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, &r);
1436 if (NT_STATUS_IS_ERR(status)) {
1437 return status;
1440 /* Return variables */
1441 *site = *r.out.site;
1443 /* Return result */
1444 if (werror) {
1445 *werror = r.out.result;
1448 return werror_to_ntstatus(r.out.result);
1451 NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli,
1452 TALLOC_CTX *mem_ctx,
1453 const char *server_name /* [in] [charset(UTF16)] */,
1454 const char *computer_name /* [in] [unique,charset(UTF16)] */,
1455 struct netr_Authenticator *credential /* [in] [ref] */,
1456 struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
1457 uint32_t level /* [in] */,
1458 union netr_DomainQuery query /* [in] [switch_is(level)] */,
1459 union netr_DomainInfo *info /* [out] [ref,switch_is(level)] */)
1461 struct netr_LogonGetDomainInfo r;
1462 NTSTATUS status;
1464 /* In parameters */
1465 r.in.server_name = server_name;
1466 r.in.computer_name = computer_name;
1467 r.in.credential = credential;
1468 r.in.return_authenticator = return_authenticator;
1469 r.in.level = level;
1470 r.in.query = query;
1472 if (DEBUGLEVEL >= 10) {
1473 NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, &r);
1476 status = cli->dispatch(cli,
1477 mem_ctx,
1478 &ndr_table_netlogon,
1479 NDR_NETR_LOGONGETDOMAININFO,
1480 &r);
1482 if (!NT_STATUS_IS_OK(status)) {
1483 return status;
1486 if (DEBUGLEVEL >= 10) {
1487 NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, &r);
1490 if (NT_STATUS_IS_ERR(status)) {
1491 return status;
1494 /* Return variables */
1495 *return_authenticator = *r.out.return_authenticator;
1496 *info = *r.out.info;
1498 /* Return result */
1499 return r.out.result;
1502 NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli,
1503 TALLOC_CTX *mem_ctx,
1504 const char *server_name /* [in] [unique,charset(UTF16)] */,
1505 const char *account_name /* [in] [charset(UTF16)] */,
1506 enum netr_SchannelType secure_channel_type /* [in] */,
1507 const char *computer_name /* [in] [charset(UTF16)] */,
1508 struct netr_Authenticator *credential /* [in] [ref] */,
1509 struct netr_Authenticator *return_authenticator /* [out] [ref] */,
1510 struct netr_CryptPassword *new_password /* [in] [ref] */)
1512 struct netr_ServerPasswordSet2 r;
1513 NTSTATUS status;
1515 /* In parameters */
1516 r.in.server_name = server_name;
1517 r.in.account_name = account_name;
1518 r.in.secure_channel_type = secure_channel_type;
1519 r.in.computer_name = computer_name;
1520 r.in.credential = credential;
1521 r.in.new_password = new_password;
1523 if (DEBUGLEVEL >= 10) {
1524 NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, &r);
1527 status = cli->dispatch(cli,
1528 mem_ctx,
1529 &ndr_table_netlogon,
1530 NDR_NETR_SERVERPASSWORDSET2,
1531 &r);
1533 if (!NT_STATUS_IS_OK(status)) {
1534 return status;
1537 if (DEBUGLEVEL >= 10) {
1538 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, &r);
1541 if (NT_STATUS_IS_ERR(status)) {
1542 return status;
1545 /* Return variables */
1546 *return_authenticator = *r.out.return_authenticator;
1548 /* Return result */
1549 return r.out.result;
1552 NTSTATUS rpccli_netr_ServerPasswordGet(struct rpc_pipe_client *cli,
1553 TALLOC_CTX *mem_ctx,
1554 const char *server_name /* [in] [unique,charset(UTF16)] */,
1555 const char *account_name /* [in] [charset(UTF16)] */,
1556 enum netr_SchannelType secure_channel_type /* [in] */,
1557 const char *computer_name /* [in] [charset(UTF16)] */,
1558 struct netr_Authenticator *credential /* [in] [ref] */,
1559 struct netr_Authenticator *return_authenticator /* [out] [ref] */,
1560 struct samr_Password *password /* [out] [ref] */,
1561 WERROR *werror)
1563 struct netr_ServerPasswordGet r;
1564 NTSTATUS status;
1566 /* In parameters */
1567 r.in.server_name = server_name;
1568 r.in.account_name = account_name;
1569 r.in.secure_channel_type = secure_channel_type;
1570 r.in.computer_name = computer_name;
1571 r.in.credential = credential;
1573 if (DEBUGLEVEL >= 10) {
1574 NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, &r);
1577 status = cli->dispatch(cli,
1578 mem_ctx,
1579 &ndr_table_netlogon,
1580 NDR_NETR_SERVERPASSWORDGET,
1581 &r);
1583 if (!NT_STATUS_IS_OK(status)) {
1584 return status;
1587 if (DEBUGLEVEL >= 10) {
1588 NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, &r);
1591 if (NT_STATUS_IS_ERR(status)) {
1592 return status;
1595 /* Return variables */
1596 *return_authenticator = *r.out.return_authenticator;
1597 *password = *r.out.password;
1599 /* Return result */
1600 if (werror) {
1601 *werror = r.out.result;
1604 return werror_to_ntstatus(r.out.result);
1607 NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli,
1608 TALLOC_CTX *mem_ctx,
1609 WERROR *werror)
1611 struct netr_NETRLOGONSENDTOSAM r;
1612 NTSTATUS status;
1614 /* In parameters */
1616 if (DEBUGLEVEL >= 10) {
1617 NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1620 status = cli->dispatch(cli,
1621 mem_ctx,
1622 &ndr_table_netlogon,
1623 NDR_NETR_NETRLOGONSENDTOSAM,
1624 &r);
1626 if (!NT_STATUS_IS_OK(status)) {
1627 return status;
1630 if (DEBUGLEVEL >= 10) {
1631 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
1634 if (NT_STATUS_IS_ERR(status)) {
1635 return status;
1638 /* Return variables */
1640 /* Return result */
1641 if (werror) {
1642 *werror = r.out.result;
1645 return werror_to_ntstatus(r.out.result);
1648 NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli,
1649 TALLOC_CTX *mem_ctx,
1650 const char *server_name /* [in] [unique,charset(UTF16)] */,
1651 uint32_t count /* [in] [range(0,32000)] */,
1652 struct netr_DsRAddress *addresses /* [in] [ref,size_is(count)] */,
1653 struct netr_DsRAddressToSitenamesWCtr **ctr /* [out] [ref] */,
1654 WERROR *werror)
1656 struct netr_DsRAddressToSitenamesW r;
1657 NTSTATUS status;
1659 /* In parameters */
1660 r.in.server_name = server_name;
1661 r.in.count = count;
1662 r.in.addresses = addresses;
1664 if (DEBUGLEVEL >= 10) {
1665 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, &r);
1668 status = cli->dispatch(cli,
1669 mem_ctx,
1670 &ndr_table_netlogon,
1671 NDR_NETR_DSRADDRESSTOSITENAMESW,
1672 &r);
1674 if (!NT_STATUS_IS_OK(status)) {
1675 return status;
1678 if (DEBUGLEVEL >= 10) {
1679 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, &r);
1682 if (NT_STATUS_IS_ERR(status)) {
1683 return status;
1686 /* Return variables */
1687 *ctr = *r.out.ctr;
1689 /* Return result */
1690 if (werror) {
1691 *werror = r.out.result;
1694 return werror_to_ntstatus(r.out.result);
1697 NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli,
1698 TALLOC_CTX *mem_ctx,
1699 const char *server_unc /* [in] [unique,charset(UTF16)] */,
1700 const char *client_account /* [in] [unique,charset(UTF16)] */,
1701 uint32_t mask /* [in] */,
1702 const char *domain_name /* [in] [unique,charset(UTF16)] */,
1703 struct GUID *domain_guid /* [in] [unique] */,
1704 const char *site_name /* [in] [unique,charset(UTF16)] */,
1705 uint32_t flags /* [in] */,
1706 struct netr_DsRGetDCNameInfo **info /* [out] [ref] */,
1707 WERROR *werror)
1709 struct netr_DsRGetDCNameEx2 r;
1710 NTSTATUS status;
1712 /* In parameters */
1713 r.in.server_unc = server_unc;
1714 r.in.client_account = client_account;
1715 r.in.mask = mask;
1716 r.in.domain_name = domain_name;
1717 r.in.domain_guid = domain_guid;
1718 r.in.site_name = site_name;
1719 r.in.flags = flags;
1721 if (DEBUGLEVEL >= 10) {
1722 NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &r);
1725 status = cli->dispatch(cli,
1726 mem_ctx,
1727 &ndr_table_netlogon,
1728 NDR_NETR_DSRGETDCNAMEEX2,
1729 &r);
1731 if (!NT_STATUS_IS_OK(status)) {
1732 return status;
1735 if (DEBUGLEVEL >= 10) {
1736 NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, &r);
1739 if (NT_STATUS_IS_ERR(status)) {
1740 return status;
1743 /* Return variables */
1744 *info = *r.out.info;
1746 /* Return result */
1747 if (werror) {
1748 *werror = r.out.result;
1751 return werror_to_ntstatus(r.out.result);
1754 NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli,
1755 TALLOC_CTX *mem_ctx,
1756 WERROR *werror)
1758 struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r;
1759 NTSTATUS status;
1761 /* In parameters */
1763 if (DEBUGLEVEL >= 10) {
1764 NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1767 status = cli->dispatch(cli,
1768 mem_ctx,
1769 &ndr_table_netlogon,
1770 NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
1771 &r);
1773 if (!NT_STATUS_IS_OK(status)) {
1774 return status;
1777 if (DEBUGLEVEL >= 10) {
1778 NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
1781 if (NT_STATUS_IS_ERR(status)) {
1782 return status;
1785 /* Return variables */
1787 /* Return result */
1788 if (werror) {
1789 *werror = r.out.result;
1792 return werror_to_ntstatus(r.out.result);
1795 NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli,
1796 TALLOC_CTX *mem_ctx,
1797 const char *server_name /* [in] [unique,charset(UTF16)] */,
1798 struct netr_DomainTrustList *dom_trust_list /* [out] [ref] */,
1799 WERROR *werror)
1801 struct netr_NetrEnumerateTrustedDomainsEx r;
1802 NTSTATUS status;
1804 /* In parameters */
1805 r.in.server_name = server_name;
1807 if (DEBUGLEVEL >= 10) {
1808 NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
1811 status = cli->dispatch(cli,
1812 mem_ctx,
1813 &ndr_table_netlogon,
1814 NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX,
1815 &r);
1817 if (!NT_STATUS_IS_OK(status)) {
1818 return status;
1821 if (DEBUGLEVEL >= 10) {
1822 NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
1825 if (NT_STATUS_IS_ERR(status)) {
1826 return status;
1829 /* Return variables */
1830 *dom_trust_list = *r.out.dom_trust_list;
1832 /* Return result */
1833 if (werror) {
1834 *werror = r.out.result;
1837 return werror_to_ntstatus(r.out.result);
1840 NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli,
1841 TALLOC_CTX *mem_ctx,
1842 const char *server_name /* [in] [unique,charset(UTF16)] */,
1843 uint32_t count /* [in] [range(0,32000)] */,
1844 struct netr_DsRAddress *addresses /* [in] [ref,size_is(count)] */,
1845 struct netr_DsRAddressToSitenamesExWCtr **ctr /* [out] [ref] */,
1846 WERROR *werror)
1848 struct netr_DsRAddressToSitenamesExW r;
1849 NTSTATUS status;
1851 /* In parameters */
1852 r.in.server_name = server_name;
1853 r.in.count = count;
1854 r.in.addresses = addresses;
1856 if (DEBUGLEVEL >= 10) {
1857 NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1860 status = cli->dispatch(cli,
1861 mem_ctx,
1862 &ndr_table_netlogon,
1863 NDR_NETR_DSRADDRESSTOSITENAMESEXW,
1864 &r);
1866 if (!NT_STATUS_IS_OK(status)) {
1867 return status;
1870 if (DEBUGLEVEL >= 10) {
1871 NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, &r);
1874 if (NT_STATUS_IS_ERR(status)) {
1875 return status;
1878 /* Return variables */
1879 *ctr = *r.out.ctr;
1881 /* Return result */
1882 if (werror) {
1883 *werror = r.out.result;
1886 return werror_to_ntstatus(r.out.result);
1889 NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli,
1890 TALLOC_CTX *mem_ctx,
1891 const char *server_name /* [in] [unique,charset(UTF16)] */,
1892 struct DcSitesCtr **ctr /* [out] [ref] */,
1893 WERROR *werror)
1895 struct netr_DsrGetDcSiteCoverageW r;
1896 NTSTATUS status;
1898 /* In parameters */
1899 r.in.server_name = server_name;
1901 if (DEBUGLEVEL >= 10) {
1902 NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
1905 status = cli->dispatch(cli,
1906 mem_ctx,
1907 &ndr_table_netlogon,
1908 NDR_NETR_DSRGETDCSITECOVERAGEW,
1909 &r);
1911 if (!NT_STATUS_IS_OK(status)) {
1912 return status;
1915 if (DEBUGLEVEL >= 10) {
1916 NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
1919 if (NT_STATUS_IS_ERR(status)) {
1920 return status;
1923 /* Return variables */
1924 *ctr = *r.out.ctr;
1926 /* Return result */
1927 if (werror) {
1928 *werror = r.out.result;
1931 return werror_to_ntstatus(r.out.result);
1934 NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
1935 TALLOC_CTX *mem_ctx,
1936 const char *server_name /* [in] [unique,charset(UTF16)] */,
1937 const char *computer_name /* [in] [unique,charset(UTF16)] */,
1938 enum netr_LogonInfoClass logon_level /* [in] */,
1939 union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */,
1940 uint16_t validation_level /* [in] */,
1941 union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
1942 uint8_t *authoritative /* [out] [ref] */,
1943 uint32_t *flags /* [in,out] [ref] */)
1945 struct netr_LogonSamLogonEx r;
1946 NTSTATUS status;
1948 /* In parameters */
1949 r.in.server_name = server_name;
1950 r.in.computer_name = computer_name;
1951 r.in.logon_level = logon_level;
1952 r.in.logon = logon;
1953 r.in.validation_level = validation_level;
1954 r.in.flags = flags;
1956 if (DEBUGLEVEL >= 10) {
1957 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &r);
1960 status = cli->dispatch(cli,
1961 mem_ctx,
1962 &ndr_table_netlogon,
1963 NDR_NETR_LOGONSAMLOGONEX,
1964 &r);
1966 if (!NT_STATUS_IS_OK(status)) {
1967 return status;
1970 if (DEBUGLEVEL >= 10) {
1971 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, &r);
1974 if (NT_STATUS_IS_ERR(status)) {
1975 return status;
1978 /* Return variables */
1979 *validation = *r.out.validation;
1980 *authoritative = *r.out.authoritative;
1981 *flags = *r.out.flags;
1983 /* Return result */
1984 return r.out.result;
1987 NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli,
1988 TALLOC_CTX *mem_ctx,
1989 const char *server_name /* [in] [unique,charset(UTF16)] */,
1990 uint32_t trust_flags /* [in] */,
1991 struct netr_DomainTrustList *trusts /* [out] [ref] */,
1992 WERROR *werror)
1994 struct netr_DsrEnumerateDomainTrusts r;
1995 NTSTATUS status;
1997 /* In parameters */
1998 r.in.server_name = server_name;
1999 r.in.trust_flags = trust_flags;
2001 if (DEBUGLEVEL >= 10) {
2002 NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
2005 status = cli->dispatch(cli,
2006 mem_ctx,
2007 &ndr_table_netlogon,
2008 NDR_NETR_DSRENUMERATEDOMAINTRUSTS,
2009 &r);
2011 if (!NT_STATUS_IS_OK(status)) {
2012 return status;
2015 if (DEBUGLEVEL >= 10) {
2016 NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
2019 if (NT_STATUS_IS_ERR(status)) {
2020 return status;
2023 /* Return variables */
2024 *trusts = *r.out.trusts;
2026 /* Return result */
2027 if (werror) {
2028 *werror = r.out.result;
2031 return werror_to_ntstatus(r.out.result);
2034 NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli,
2035 TALLOC_CTX *mem_ctx,
2036 const char *server_name /* [in] [unique,charset(UTF16)] */,
2037 const char *domain /* [in] [unique,charset(UTF16)] */,
2038 struct GUID *domain_guid /* [in] [unique] */,
2039 struct GUID *dsa_guid /* [in] [unique] */,
2040 const char *dns_host /* [in] [ref,charset(UTF16)] */,
2041 WERROR *werror)
2043 struct netr_DsrDeregisterDNSHostRecords r;
2044 NTSTATUS status;
2046 /* In parameters */
2047 r.in.server_name = server_name;
2048 r.in.domain = domain;
2049 r.in.domain_guid = domain_guid;
2050 r.in.dsa_guid = dsa_guid;
2051 r.in.dns_host = dns_host;
2053 if (DEBUGLEVEL >= 10) {
2054 NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords, &r);
2057 status = cli->dispatch(cli,
2058 mem_ctx,
2059 &ndr_table_netlogon,
2060 NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS,
2061 &r);
2063 if (!NT_STATUS_IS_OK(status)) {
2064 return status;
2067 if (DEBUGLEVEL >= 10) {
2068 NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, &r);
2071 if (NT_STATUS_IS_ERR(status)) {
2072 return status;
2075 /* Return variables */
2077 /* Return result */
2078 if (werror) {
2079 *werror = r.out.result;
2082 return werror_to_ntstatus(r.out.result);
2085 NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli,
2086 TALLOC_CTX *mem_ctx,
2087 const char *server_name /* [in] [unique,charset(UTF16)] */,
2088 const char *account_name /* [in] [charset(UTF16)] */,
2089 enum netr_SchannelType secure_channel_type /* [in] */,
2090 const char *computer_name /* [in] [charset(UTF16)] */,
2091 struct netr_Authenticator *credential /* [in] [ref] */,
2092 struct netr_Authenticator *return_authenticator /* [out] [ref] */,
2093 struct samr_Password *password /* [out] [ref] */,
2094 struct samr_Password *password2 /* [out] [ref] */)
2096 struct netr_ServerTrustPasswordsGet r;
2097 NTSTATUS status;
2099 /* In parameters */
2100 r.in.server_name = server_name;
2101 r.in.account_name = account_name;
2102 r.in.secure_channel_type = secure_channel_type;
2103 r.in.computer_name = computer_name;
2104 r.in.credential = credential;
2106 if (DEBUGLEVEL >= 10) {
2107 NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, &r);
2110 status = cli->dispatch(cli,
2111 mem_ctx,
2112 &ndr_table_netlogon,
2113 NDR_NETR_SERVERTRUSTPASSWORDSGET,
2114 &r);
2116 if (!NT_STATUS_IS_OK(status)) {
2117 return status;
2120 if (DEBUGLEVEL >= 10) {
2121 NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, &r);
2124 if (NT_STATUS_IS_ERR(status)) {
2125 return status;
2128 /* Return variables */
2129 *return_authenticator = *r.out.return_authenticator;
2130 *password = *r.out.password;
2131 *password2 = *r.out.password2;
2133 /* Return result */
2134 return r.out.result;
2137 NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli,
2138 TALLOC_CTX *mem_ctx,
2139 const char *server_name /* [in] [unique,charset(UTF16)] */,
2140 const char *trusted_domain_name /* [in] [unique,charset(UTF16)] */,
2141 uint32_t flags /* [in] */,
2142 struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */,
2143 WERROR *werror)
2145 struct netr_DsRGetForestTrustInformation r;
2146 NTSTATUS status;
2148 /* In parameters */
2149 r.in.server_name = server_name;
2150 r.in.trusted_domain_name = trusted_domain_name;
2151 r.in.flags = flags;
2153 if (DEBUGLEVEL >= 10) {
2154 NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, &r);
2157 status = cli->dispatch(cli,
2158 mem_ctx,
2159 &ndr_table_netlogon,
2160 NDR_NETR_DSRGETFORESTTRUSTINFORMATION,
2161 &r);
2163 if (!NT_STATUS_IS_OK(status)) {
2164 return status;
2167 if (DEBUGLEVEL >= 10) {
2168 NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, &r);
2171 if (NT_STATUS_IS_ERR(status)) {
2172 return status;
2175 /* Return variables */
2176 *forest_trust_info = *r.out.forest_trust_info;
2178 /* Return result */
2179 if (werror) {
2180 *werror = r.out.result;
2183 return werror_to_ntstatus(r.out.result);
2186 NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli,
2187 TALLOC_CTX *mem_ctx,
2188 const char *server_name /* [in] [unique,charset(UTF16)] */,
2189 const char *trusted_domain_name /* [in] [ref,charset(UTF16)] */,
2190 struct netr_Authenticator *credential /* [in] [ref] */,
2191 struct netr_Authenticator *return_authenticator /* [out] [ref] */,
2192 uint32_t flags /* [in] */,
2193 struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */,
2194 WERROR *werror)
2196 struct netr_GetForestTrustInformation r;
2197 NTSTATUS status;
2199 /* In parameters */
2200 r.in.server_name = server_name;
2201 r.in.trusted_domain_name = trusted_domain_name;
2202 r.in.credential = credential;
2203 r.in.flags = flags;
2205 if (DEBUGLEVEL >= 10) {
2206 NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, &r);
2209 status = cli->dispatch(cli,
2210 mem_ctx,
2211 &ndr_table_netlogon,
2212 NDR_NETR_GETFORESTTRUSTINFORMATION,
2213 &r);
2215 if (!NT_STATUS_IS_OK(status)) {
2216 return status;
2219 if (DEBUGLEVEL >= 10) {
2220 NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, &r);
2223 if (NT_STATUS_IS_ERR(status)) {
2224 return status;
2227 /* Return variables */
2228 *return_authenticator = *r.out.return_authenticator;
2229 *forest_trust_info = *r.out.forest_trust_info;
2231 /* Return result */
2232 if (werror) {
2233 *werror = r.out.result;
2236 return werror_to_ntstatus(r.out.result);
2239 NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli,
2240 TALLOC_CTX *mem_ctx,
2241 const char *server_name /* [in] [unique,charset(UTF16)] */,
2242 const char *computer_name /* [in] [unique,charset(UTF16)] */,
2243 struct netr_Authenticator *credential /* [in] [unique] */,
2244 struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
2245 enum netr_LogonInfoClass logon_level /* [in] */,
2246 union netr_LogonLevel *logon /* [in] [ref,switch_is(logon_level)] */,
2247 uint16_t validation_level /* [in] */,
2248 union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
2249 uint8_t *authoritative /* [out] [ref] */,
2250 uint32_t *flags /* [in,out] [ref] */)
2252 struct netr_LogonSamLogonWithFlags r;
2253 NTSTATUS status;
2255 /* In parameters */
2256 r.in.server_name = server_name;
2257 r.in.computer_name = computer_name;
2258 r.in.credential = credential;
2259 r.in.return_authenticator = return_authenticator;
2260 r.in.logon_level = logon_level;
2261 r.in.logon = logon;
2262 r.in.validation_level = validation_level;
2263 r.in.flags = flags;
2265 if (DEBUGLEVEL >= 10) {
2266 NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, &r);
2269 status = cli->dispatch(cli,
2270 mem_ctx,
2271 &ndr_table_netlogon,
2272 NDR_NETR_LOGONSAMLOGONWITHFLAGS,
2273 &r);
2275 if (!NT_STATUS_IS_OK(status)) {
2276 return status;
2279 if (DEBUGLEVEL >= 10) {
2280 NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, &r);
2283 if (NT_STATUS_IS_ERR(status)) {
2284 return status;
2287 /* Return variables */
2288 if (return_authenticator && r.out.return_authenticator) {
2289 *return_authenticator = *r.out.return_authenticator;
2291 *validation = *r.out.validation;
2292 *authoritative = *r.out.authoritative;
2293 *flags = *r.out.flags;
2295 /* Return result */
2296 return r.out.result;
2299 NTSTATUS rpccli_netr_ServerGetTrustInfo(struct rpc_pipe_client *cli,
2300 TALLOC_CTX *mem_ctx,
2301 const char *server_name /* [in] [unique,charset(UTF16)] */,
2302 const char *account_name /* [in] [ref,charset(UTF16)] */,
2303 enum netr_SchannelType secure_channel_type /* [in] */,
2304 const char *computer_name /* [in] [ref,charset(UTF16)] */,
2305 struct netr_Authenticator *credential /* [in] [ref] */,
2306 struct netr_Authenticator *return_authenticator /* [out] [ref] */,
2307 struct samr_Password *new_owf_password /* [out] [ref] */,
2308 struct samr_Password *old_owf_password /* [out] [ref] */,
2309 struct netr_TrustInfo **trust_info /* [out] [ref] */)
2311 struct netr_ServerGetTrustInfo r;
2312 NTSTATUS status;
2314 /* In parameters */
2315 r.in.server_name = server_name;
2316 r.in.account_name = account_name;
2317 r.in.secure_channel_type = secure_channel_type;
2318 r.in.computer_name = computer_name;
2319 r.in.credential = credential;
2321 if (DEBUGLEVEL >= 10) {
2322 NDR_PRINT_IN_DEBUG(netr_ServerGetTrustInfo, &r);
2325 status = cli->dispatch(cli,
2326 mem_ctx,
2327 &ndr_table_netlogon,
2328 NDR_NETR_SERVERGETTRUSTINFO,
2329 &r);
2331 if (!NT_STATUS_IS_OK(status)) {
2332 return status;
2335 if (DEBUGLEVEL >= 10) {
2336 NDR_PRINT_OUT_DEBUG(netr_ServerGetTrustInfo, &r);
2339 if (NT_STATUS_IS_ERR(status)) {
2340 return status;
2343 /* Return variables */
2344 *return_authenticator = *r.out.return_authenticator;
2345 *new_owf_password = *r.out.new_owf_password;
2346 *old_owf_password = *r.out.old_owf_password;
2347 *trust_info = *r.out.trust_info;
2349 /* Return result */
2350 return r.out.result;