netlogon_creds_cli: Remove unused code
[Samba.git] / libcli / auth / netlogon_creds_cli.h
blob1e7df6600cbacae410ff36aed9a648db00ef5d19
1 /*
2 Unix SMB/CIFS implementation.
4 module to store/fetch session keys for the schannel client
6 Copyright (C) Stefan Metzmacher 2013
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef NETLOGON_CREDS_CLI_H
23 #define NETLOGON_CREDS_CLI_H
25 #include "librpc/gen_ndr/dcerpc.h"
26 #include "librpc/gen_ndr/schannel.h"
28 struct netlogon_creds_cli_context;
29 struct messaging_context;
30 struct dcerpc_binding_handle;
31 struct db_context;
33 NTSTATUS netlogon_creds_cli_set_global_db(struct db_context **db);
34 NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx);
35 void netlogon_creds_cli_close_global_db(void);
37 NTSTATUS netlogon_creds_cli_context_global(struct loadparm_context *lp_ctx,
38 struct messaging_context *msg_ctx,
39 const char *client_account,
40 enum netr_SchannelType type,
41 const char *server_computer,
42 const char *server_netbios_domain,
43 const char *server_dns_domain,
44 TALLOC_CTX *mem_ctx,
45 struct netlogon_creds_cli_context **_context);
47 char *netlogon_creds_cli_debug_string(
48 const struct netlogon_creds_cli_context *context,
49 TALLOC_CTX *mem_ctx);
51 enum dcerpc_AuthLevel netlogon_creds_cli_auth_level(
52 struct netlogon_creds_cli_context *context);
54 NTSTATUS netlogon_creds_cli_get(struct netlogon_creds_cli_context *context,
55 TALLOC_CTX *mem_ctx,
56 struct netlogon_creds_CredentialState **_creds);
57 bool netlogon_creds_cli_validate(struct netlogon_creds_cli_context *context,
58 const struct netlogon_creds_CredentialState *creds1);
60 NTSTATUS netlogon_creds_cli_store(struct netlogon_creds_cli_context *context,
61 struct netlogon_creds_CredentialState *creds);
62 NTSTATUS netlogon_creds_cli_delete(struct netlogon_creds_cli_context *context,
63 struct netlogon_creds_CredentialState *creds);
65 struct tevent_req *netlogon_creds_cli_lock_send(TALLOC_CTX *mem_ctx,
66 struct tevent_context *ev,
67 struct netlogon_creds_cli_context *context);
68 NTSTATUS netlogon_creds_cli_lock_recv(struct tevent_req *req,
69 TALLOC_CTX *mem_ctx,
70 struct netlogon_creds_CredentialState **creds);
71 NTSTATUS netlogon_creds_cli_lock(struct netlogon_creds_cli_context *context,
72 TALLOC_CTX *mem_ctx,
73 struct netlogon_creds_CredentialState **creds);
75 struct tevent_req *netlogon_creds_cli_auth_send(TALLOC_CTX *mem_ctx,
76 struct tevent_context *ev,
77 struct netlogon_creds_cli_context *context,
78 struct dcerpc_binding_handle *b,
79 uint8_t num_nt_hashes,
80 const struct samr_Password * const *nt_hashes);
81 NTSTATUS netlogon_creds_cli_auth_recv(struct tevent_req *req,
82 uint8_t *idx_nt_hashes);
83 NTSTATUS netlogon_creds_cli_auth(struct netlogon_creds_cli_context *context,
84 struct dcerpc_binding_handle *b,
85 uint8_t num_nt_hashes,
86 const struct samr_Password * const *nt_hashes,
87 uint8_t *idx_nt_hashes);
89 struct tevent_req *netlogon_creds_cli_check_send(TALLOC_CTX *mem_ctx,
90 struct tevent_context *ev,
91 struct netlogon_creds_cli_context *context,
92 struct dcerpc_binding_handle *b);
93 NTSTATUS netlogon_creds_cli_check_recv(struct tevent_req *req);
94 NTSTATUS netlogon_creds_cli_check(struct netlogon_creds_cli_context *context,
95 struct dcerpc_binding_handle *b);
97 struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx,
98 struct tevent_context *ev,
99 struct netlogon_creds_cli_context *context,
100 struct dcerpc_binding_handle *b,
101 const DATA_BLOB *new_password,
102 const uint32_t *new_version);
103 NTSTATUS netlogon_creds_cli_ServerPasswordSet_recv(struct tevent_req *req);
104 NTSTATUS netlogon_creds_cli_ServerPasswordSet(
105 struct netlogon_creds_cli_context *context,
106 struct dcerpc_binding_handle *b,
107 const DATA_BLOB *new_password,
108 const uint32_t *new_version);
110 struct tevent_req *netlogon_creds_cli_LogonSamLogon_send(TALLOC_CTX *mem_ctx,
111 struct tevent_context *ev,
112 struct netlogon_creds_cli_context *context,
113 struct dcerpc_binding_handle *b,
114 enum netr_LogonInfoClass logon_level,
115 const union netr_LogonLevel *logon,
116 uint32_t flags);
117 NTSTATUS netlogon_creds_cli_LogonSamLogon_recv(struct tevent_req *req,
118 TALLOC_CTX *mem_ctx,
119 uint16_t *validation_level,
120 union netr_Validation **validation,
121 uint8_t *authoritative,
122 uint32_t *flags);
123 NTSTATUS netlogon_creds_cli_LogonSamLogon(
124 struct netlogon_creds_cli_context *context,
125 struct dcerpc_binding_handle *b,
126 enum netr_LogonInfoClass logon_level,
127 const union netr_LogonLevel *logon,
128 TALLOC_CTX *mem_ctx,
129 uint16_t *validation_level,
130 union netr_Validation **validation,
131 uint8_t *authoritative,
132 uint32_t *flags);
133 struct tevent_req *netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords_send(TALLOC_CTX *mem_ctx,
134 struct tevent_context *ev,
135 struct netlogon_creds_cli_context *context,
136 struct dcerpc_binding_handle *b,
137 const char *site_name,
138 uint32_t dns_ttl,
139 struct NL_DNS_NAME_INFO_ARRAY *dns_names);
140 NTSTATUS netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords_recv(struct tevent_req *req);
141 NTSTATUS netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords(
142 struct netlogon_creds_cli_context *context,
143 struct dcerpc_binding_handle *b,
144 const char *site_name,
145 uint32_t dns_ttl,
146 struct NL_DNS_NAME_INFO_ARRAY *dns_names);
148 struct tevent_req *netlogon_creds_cli_ServerGetTrustInfo_send(TALLOC_CTX *mem_ctx,
149 struct tevent_context *ev,
150 struct netlogon_creds_cli_context *context,
151 struct dcerpc_binding_handle *b);
152 NTSTATUS netlogon_creds_cli_ServerGetTrustInfo_recv(struct tevent_req *req,
153 TALLOC_CTX *mem_ctx,
154 struct samr_Password *new_owf_password,
155 struct samr_Password *old_owf_password,
156 struct netr_TrustInfo **trust_info);
157 NTSTATUS netlogon_creds_cli_ServerGetTrustInfo(
158 struct netlogon_creds_cli_context *context,
159 struct dcerpc_binding_handle *b,
160 TALLOC_CTX *mem_ctx,
161 struct samr_Password *new_owf_password,
162 struct samr_Password *old_owf_password,
163 struct netr_TrustInfo **trust_info);
165 struct tevent_req *netlogon_creds_cli_GetForestTrustInformation_send(TALLOC_CTX *mem_ctx,
166 struct tevent_context *ev,
167 struct netlogon_creds_cli_context *context,
168 struct dcerpc_binding_handle *b);
169 NTSTATUS netlogon_creds_cli_GetForestTrustInformation_recv(struct tevent_req *req,
170 TALLOC_CTX *mem_ctx,
171 struct lsa_ForestTrustInformation **forest_trust_info);
172 NTSTATUS netlogon_creds_cli_GetForestTrustInformation(
173 struct netlogon_creds_cli_context *context,
174 struct dcerpc_binding_handle *b,
175 TALLOC_CTX *mem_ctx,
176 struct lsa_ForestTrustInformation **forest_trust_info);
178 struct tevent_req *netlogon_creds_cli_SendToSam_send(TALLOC_CTX *mem_ctx,
179 struct tevent_context *ev,
180 struct netlogon_creds_cli_context *context,
181 struct dcerpc_binding_handle *b,
182 struct netr_SendToSamBase *message);
184 NTSTATUS netlogon_creds_cli_SendToSam(
185 struct netlogon_creds_cli_context *context,
186 struct dcerpc_binding_handle *b,
187 struct netr_SendToSamBase *message);
189 #endif /* NETLOGON_CREDS_CLI_H */