2013-04-18 21:16:42 +04:00
/*
Unix SMB / CIFS implementation .
module to store / fetch session keys for the schannel client
Copyright ( C ) Stefan Metzmacher 2013
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
# ifndef NETLOGON_CREDS_CLI_H
# define NETLOGON_CREDS_CLI_H
# include "librpc/gen_ndr/dcerpc.h"
# include "librpc/gen_ndr/schannel.h"
struct netlogon_creds_cli_context ;
2017-09-07 13:36:14 +03:00
struct cli_credentials ;
2013-04-18 21:16:42 +04:00
struct messaging_context ;
struct dcerpc_binding_handle ;
2014-01-17 17:00:27 +04:00
struct db_context ;
2013-04-18 21:16:42 +04:00
2014-01-17 17:00:27 +04:00
NTSTATUS netlogon_creds_cli_set_global_db ( struct db_context * * db ) ;
2013-04-18 21:16:42 +04:00
NTSTATUS netlogon_creds_cli_open_global_db ( struct loadparm_context * lp_ctx ) ;
2017-07-25 00:49:47 +03:00
void netlogon_creds_cli_close_global_db ( void ) ;
2013-04-18 21:16:42 +04:00
NTSTATUS netlogon_creds_cli_context_global ( struct loadparm_context * lp_ctx ,
struct messaging_context * msg_ctx ,
const char * client_account ,
enum netr_SchannelType type ,
const char * server_computer ,
const char * server_netbios_domain ,
2017-09-06 14:32:34 +03:00
const char * server_dns_domain ,
2013-04-18 21:16:42 +04:00
TALLOC_CTX * mem_ctx ,
struct netlogon_creds_cli_context * * _context ) ;
2017-09-07 13:36:14 +03:00
NTSTATUS netlogon_creds_bind_cli_credentials (
struct netlogon_creds_cli_context * context , TALLOC_CTX * mem_ctx ,
struct cli_credentials * * pcli_creds ) ;
2013-04-18 21:16:42 +04:00
2017-02-09 23:47:52 +03:00
char * netlogon_creds_cli_debug_string (
const struct netlogon_creds_cli_context * context ,
TALLOC_CTX * mem_ctx ) ;
2013-04-18 21:16:42 +04:00
enum dcerpc_AuthLevel netlogon_creds_cli_auth_level (
struct netlogon_creds_cli_context * context ) ;
NTSTATUS netlogon_creds_cli_get ( struct netlogon_creds_cli_context * context ,
TALLOC_CTX * mem_ctx ,
struct netlogon_creds_CredentialState * * _creds ) ;
bool netlogon_creds_cli_validate ( struct netlogon_creds_cli_context * context ,
const struct netlogon_creds_CredentialState * creds1 ) ;
NTSTATUS netlogon_creds_cli_store ( struct netlogon_creds_cli_context * context ,
2017-09-10 15:55:13 +03:00
struct netlogon_creds_CredentialState * creds ) ;
2013-04-18 21:16:42 +04:00
NTSTATUS netlogon_creds_cli_delete ( struct netlogon_creds_cli_context * context ,
2017-09-10 15:55:13 +03:00
struct netlogon_creds_CredentialState * creds ) ;
2017-09-16 05:39:01 +03:00
NTSTATUS netlogon_creds_cli_delete_lck (
struct netlogon_creds_cli_context * context ) ;
2013-04-18 21:16:42 +04:00
struct tevent_req * netlogon_creds_cli_lock_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ) ;
NTSTATUS netlogon_creds_cli_lock_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
struct netlogon_creds_CredentialState * * creds ) ;
NTSTATUS netlogon_creds_cli_lock ( struct netlogon_creds_cli_context * context ,
TALLOC_CTX * mem_ctx ,
struct netlogon_creds_CredentialState * * creds ) ;
2017-09-12 02:48:27 +03:00
struct netlogon_creds_cli_lck ;
enum netlogon_creds_cli_lck_type {
NETLOGON_CREDS_CLI_LCK_NONE ,
NETLOGON_CREDS_CLI_LCK_SHARED ,
NETLOGON_CREDS_CLI_LCK_EXCLUSIVE ,
} ;
struct tevent_req * netlogon_creds_cli_lck_send (
TALLOC_CTX * mem_ctx , struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
enum netlogon_creds_cli_lck_type type ) ;
NTSTATUS netlogon_creds_cli_lck_recv (
struct tevent_req * req , TALLOC_CTX * mem_ctx ,
struct netlogon_creds_cli_lck * * lck ) ;
NTSTATUS netlogon_creds_cli_lck (
struct netlogon_creds_cli_context * context ,
enum netlogon_creds_cli_lck_type type ,
TALLOC_CTX * mem_ctx , struct netlogon_creds_cli_lck * * lck ) ;
2013-04-18 21:16:42 +04:00
struct tevent_req * netlogon_creds_cli_auth_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
2017-05-22 21:44:40 +03:00
uint8_t num_nt_hashes ,
const struct samr_Password * const * nt_hashes ) ;
NTSTATUS netlogon_creds_cli_auth_recv ( struct tevent_req * req ,
uint8_t * idx_nt_hashes ) ;
2013-04-18 21:16:42 +04:00
NTSTATUS netlogon_creds_cli_auth ( struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
2017-05-22 21:44:40 +03:00
uint8_t num_nt_hashes ,
const struct samr_Password * const * nt_hashes ,
uint8_t * idx_nt_hashes ) ;
2013-04-18 21:16:42 +04:00
struct tevent_req * netlogon_creds_cli_check_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ) ;
2017-09-20 02:45:27 +03:00
NTSTATUS netlogon_creds_cli_check_recv ( struct tevent_req * req ,
union netr_Capabilities * capabilities ) ;
2013-04-18 21:16:42 +04:00
NTSTATUS netlogon_creds_cli_check ( struct netlogon_creds_cli_context * context ,
2017-09-20 02:45:27 +03:00
struct dcerpc_binding_handle * b ,
union netr_Capabilities * capabilities ) ;
2013-04-18 21:16:42 +04:00
struct tevent_req * netlogon_creds_cli_ServerPasswordSet_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
2017-06-13 12:18:37 +03:00
const DATA_BLOB * new_password ,
2013-04-18 21:16:42 +04:00
const uint32_t * new_version ) ;
NTSTATUS netlogon_creds_cli_ServerPasswordSet_recv ( struct tevent_req * req ) ;
NTSTATUS netlogon_creds_cli_ServerPasswordSet (
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
2017-06-13 12:18:37 +03:00
const DATA_BLOB * new_password ,
2013-04-18 21:16:42 +04:00
const uint32_t * new_version ) ;
struct tevent_req * netlogon_creds_cli_LogonSamLogon_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
enum netr_LogonInfoClass logon_level ,
const union netr_LogonLevel * logon ,
uint32_t flags ) ;
NTSTATUS netlogon_creds_cli_LogonSamLogon_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
uint16_t * validation_level ,
union netr_Validation * * validation ,
uint8_t * authoritative ,
uint32_t * flags ) ;
NTSTATUS netlogon_creds_cli_LogonSamLogon (
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
enum netr_LogonInfoClass logon_level ,
const union netr_LogonLevel * logon ,
TALLOC_CTX * mem_ctx ,
uint16_t * validation_level ,
union netr_Validation * * validation ,
uint8_t * authoritative ,
uint32_t * flags ) ;
2014-05-06 09:00:09 +04:00
struct tevent_req * netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
const char * site_name ,
uint32_t dns_ttl ,
struct NL_DNS_NAME_INFO_ARRAY * dns_names ) ;
NTSTATUS netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords_recv ( struct tevent_req * req ) ;
NTSTATUS netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords (
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
const char * site_name ,
uint32_t dns_ttl ,
struct NL_DNS_NAME_INFO_ARRAY * dns_names ) ;
2013-04-18 21:16:42 +04:00
2014-12-22 23:48:18 +03:00
struct tevent_req * netlogon_creds_cli_ServerGetTrustInfo_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ) ;
NTSTATUS netlogon_creds_cli_ServerGetTrustInfo_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
struct samr_Password * new_owf_password ,
struct samr_Password * old_owf_password ,
struct netr_TrustInfo * * trust_info ) ;
NTSTATUS netlogon_creds_cli_ServerGetTrustInfo (
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
TALLOC_CTX * mem_ctx ,
struct samr_Password * new_owf_password ,
struct samr_Password * old_owf_password ,
struct netr_TrustInfo * * trust_info ) ;
2014-12-23 00:02:04 +03:00
struct tevent_req * netlogon_creds_cli_GetForestTrustInformation_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ) ;
NTSTATUS netlogon_creds_cli_GetForestTrustInformation_recv ( struct tevent_req * req ,
TALLOC_CTX * mem_ctx ,
struct lsa_ForestTrustInformation * * forest_trust_info ) ;
NTSTATUS netlogon_creds_cli_GetForestTrustInformation (
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
TALLOC_CTX * mem_ctx ,
struct lsa_ForestTrustInformation * * forest_trust_info ) ;
2017-04-11 06:51:50 +03:00
struct tevent_req * netlogon_creds_cli_SendToSam_send ( TALLOC_CTX * mem_ctx ,
struct tevent_context * ev ,
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
struct netr_SendToSamBase * message ) ;
NTSTATUS netlogon_creds_cli_SendToSam (
struct netlogon_creds_cli_context * context ,
struct dcerpc_binding_handle * b ,
struct netr_SendToSamBase * message ) ;
2013-04-18 21:16:42 +04:00
# endif /* NETLOGON_CREDS_CLI_H */