lib: handle NTTIME_THAW in nt_time_to_full_timespec()
[Samba.git] / source3 / rpc_client / cli_netlogon.h
blob362321f312f2be6e65f922795200526d61c452e4
1 /*
2 Unix SMB/CIFS implementation.
3 NT Domain Authentication SMB / MSRPC client
4 Copyright (C) Andrew Tridgell 1992-2000
5 Copyright (C) Jeremy Allison 1998.
6 Largely re-written by Jeremy Allison (C) 2005.
7 Copyright (C) Guenther Deschner 2008.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef _RPC_CLIENT_CLI_NETLOGON_H_
24 #define _RPC_CLIENT_CLI_NETLOGON_H_
26 struct cli_state;
27 struct messaging_context;
28 struct cli_credentials;
29 struct netlogon_creds_cli_context;
30 struct dcerpc_binding_handle;
31 #include "librpc/rpc/rpc_common.h"
33 /* The following definitions come from rpc_client/cli_netlogon.c */
35 NTSTATUS rpccli_pre_open_netlogon_creds(void);
36 NTSTATUS rpccli_create_netlogon_creds_ctx(
37 struct cli_credentials *creds,
38 const char *server_computer,
39 struct messaging_context *msg_ctx,
40 TALLOC_CTX *mem_ctx,
41 struct netlogon_creds_cli_context **creds_ctx);
42 NTSTATUS rpccli_setup_netlogon_creds_locked(
43 struct cli_state *cli,
44 enum dcerpc_transport_t transport,
45 struct netlogon_creds_cli_context *creds_ctx,
46 bool force_reauth,
47 struct cli_credentials *cli_creds,
48 uint32_t *negotiate_flags);
49 NTSTATUS rpccli_setup_netlogon_creds(
50 struct cli_state *cli,
51 enum dcerpc_transport_t transport,
52 struct netlogon_creds_cli_context *creds_ctx,
53 bool force_reauth,
54 struct cli_credentials *cli_creds);
55 NTSTATUS rpccli_connect_netlogon(
56 struct cli_state *cli,
57 enum dcerpc_transport_t transport,
58 struct netlogon_creds_cli_context *creds_ctx,
59 bool force_reauth,
60 struct cli_credentials *trust_creds,
61 struct rpc_pipe_client **_rpccli);
62 NTSTATUS rpccli_netlogon_password_logon(
63 struct netlogon_creds_cli_context *creds,
64 struct dcerpc_binding_handle *binding_handle,
65 TALLOC_CTX *mem_ctx,
66 uint32_t logon_parameters,
67 const char *domain,
68 const char *username,
69 const char *password,
70 const char *workstation,
71 const uint64_t logon_id,
72 enum netr_LogonInfoClass logon_type,
73 uint8_t *authoritative,
74 uint32_t *flags,
75 uint16_t *_validation_level,
76 union netr_Validation **_validation);
77 NTSTATUS rpccli_netlogon_network_logon(
78 struct netlogon_creds_cli_context *creds_ctx,
79 struct dcerpc_binding_handle *binding_handle,
80 TALLOC_CTX *mem_ctx,
81 uint32_t logon_parameters,
82 const char *username,
83 const char *domain,
84 const char *workstation,
85 const uint64_t logon_id,
86 const uint8_t chal[8],
87 DATA_BLOB lm_response,
88 DATA_BLOB nt_response,
89 enum netr_LogonInfoClass logon_type,
90 uint8_t *authoritative,
91 uint32_t *flags,
92 uint16_t *_validation_level,
93 union netr_Validation **_validation);
94 NTSTATUS rpccli_netlogon_interactive_logon(
95 struct netlogon_creds_cli_context *creds_ctx,
96 struct dcerpc_binding_handle *binding_handle,
97 TALLOC_CTX *mem_ctx,
98 uint32_t logon_parameters,
99 const char *username,
100 const char *domain,
101 const char *workstation,
102 const uint64_t logon_id,
103 DATA_BLOB lm_hash,
104 DATA_BLOB nt_hash,
105 enum netr_LogonInfoClass logon_type,
106 uint8_t *authoritative,
107 uint32_t *flags,
108 uint16_t *_validation_level,
109 union netr_Validation **_validation);
111 #endif /* _RPC_CLIENT_CLI_NETLOGON_H_ */