Path: blob/main/crypto/krb5/src/windows/leashdll/leashdll.h
34914 views
#ifndef _LEASHDLL_H_1#define _LEASHDLL_H_23#include <com_err.h>4#ifdef __cplusplus5extern "C" {6#endif78/* Internal Stuff */910#include <windows.h>11#define SECURITY_WIN3212#include <security.h>1314/* _WIN32_WINNT must be 0x0501 or greater to pull in definition of15* all required LSA data types when the Vista SDK NtSecAPI.h is used.16*/17#ifndef _WIN32_WINNT18#define _WIN32_WINNT 0x050119#else20#if _WIN32_WINNT < 0x050121#undef _WIN32_WINNT22#define _WIN32_WINNT 0x050123#endif24#endif25#include <ntsecapi.h>2627#include <krb5.h>2829extern HINSTANCE hKrb5;30extern HINSTANCE hProfile;3132#define TIMEHOST "TIMEHOST"3334#define LEASH_DEBUG_CLASS_GENERIC 03536#define LEASH_PRIORITY_LOW 037#define LEASH_PRIORITY_HIGH 13839///////////////////////////////////////////////////////////////////////////////4041#ifdef _WIN6442#define LEASH_DLL "leashw64.dll"43#define KRBCC32_DLL "krbcc64.dll"44#else45#define LEASH_DLL "leashw32.dll"46#define KRBCC32_DLL "krbcc32.dll"47#endif48#define SERVICE_DLL "advapi32.dll"49#define SECUR32_DLL "secur32.dll"5051//////////////////////////////////////////////////////////////////////////////5253#include <loadfuncs-com_err.h>54#include <loadfuncs-krb5.h>55#include <loadfuncs-profile.h>56#include <loadfuncs-lsa.h>5758#include <errno.h>5960// service definitions61typedef SC_HANDLE (WINAPI *FP_OpenSCManagerA)(char *, char *, DWORD);62typedef SC_HANDLE (WINAPI *FP_OpenServiceA)(SC_HANDLE, char *, DWORD);63typedef BOOL (WINAPI *FP_QueryServiceStatus)(SC_HANDLE, LPSERVICE_STATUS);64typedef BOOL (WINAPI *FP_CloseServiceHandle)(SC_HANDLE);6566//////////////////////////////////////////////////////////////////////////////6768// krb5 functions69extern DECL_FUNC_PTR(krb5_change_password);70extern DECL_FUNC_PTR(krb5_get_init_creds_opt_alloc);71extern DECL_FUNC_PTR(krb5_get_init_creds_opt_free);72extern DECL_FUNC_PTR(krb5_get_init_creds_opt_init);73extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_tkt_life);74extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_renew_life);75extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_forwardable);76extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_proxiable);77extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_renew_life);78extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_address_list);79extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_out_ccache);80extern DECL_FUNC_PTR(krb5_get_init_creds_password);81extern DECL_FUNC_PTR(krb5_build_principal_ext);82extern DECL_FUNC_PTR(krb5_cc_get_name);83extern DECL_FUNC_PTR(krb5_cc_resolve);84extern DECL_FUNC_PTR(krb5_cc_default);85extern DECL_FUNC_PTR(krb5_cc_default_name);86extern DECL_FUNC_PTR(krb5_cc_set_default_name);87extern DECL_FUNC_PTR(krb5_cc_initialize);88extern DECL_FUNC_PTR(krb5_cc_destroy);89extern DECL_FUNC_PTR(krb5_cc_close);90extern DECL_FUNC_PTR(krb5_cc_copy_creds);91extern DECL_FUNC_PTR(krb5_cc_store_cred);92// extern DECL_FUNC_PTR(krb5_cc_retrieve_cred);93extern DECL_FUNC_PTR(krb5_cc_get_principal);94extern DECL_FUNC_PTR(krb5_cc_start_seq_get);95extern DECL_FUNC_PTR(krb5_cc_next_cred);96extern DECL_FUNC_PTR(krb5_cc_end_seq_get);97// extern DECL_FUNC_PTR(krb5_cc_remove_cred);98extern DECL_FUNC_PTR(krb5_cc_set_flags);99// extern DECL_FUNC_PTR(krb5_cc_get_type);100extern DECL_FUNC_PTR(krb5_cc_get_full_name);101extern DECL_FUNC_PTR(krb5_free_context);102extern DECL_FUNC_PTR(krb5_free_cred_contents);103extern DECL_FUNC_PTR(krb5_free_principal);104extern DECL_FUNC_PTR(krb5_free_string);105extern DECL_FUNC_PTR(krb5_get_in_tkt_with_password);106extern DECL_FUNC_PTR(krb5_init_context);107extern DECL_FUNC_PTR(krb5_parse_name);108extern DECL_FUNC_PTR(krb5_timeofday);109extern DECL_FUNC_PTR(krb5_timestamp_to_sfstring);110extern DECL_FUNC_PTR(krb5_unparse_name);111extern DECL_FUNC_PTR(krb5_get_credentials);112extern DECL_FUNC_PTR(krb5_mk_req);113extern DECL_FUNC_PTR(krb5_sname_to_principal);114extern DECL_FUNC_PTR(krb5_get_credentials_renew);115extern DECL_FUNC_PTR(krb5_free_data);116extern DECL_FUNC_PTR(krb5_free_data_contents);117// extern DECL_FUNC_PTR(krb5_get_realm_domain);118extern DECL_FUNC_PTR(krb5_free_unparsed_name);119extern DECL_FUNC_PTR(krb5_os_localaddr);120extern DECL_FUNC_PTR(krb5_copy_keyblock_contents);121extern DECL_FUNC_PTR(krb5_copy_data);122extern DECL_FUNC_PTR(krb5_free_creds);123extern DECL_FUNC_PTR(krb5_build_principal);124extern DECL_FUNC_PTR(krb5_get_renewed_creds);125extern DECL_FUNC_PTR(krb5_free_addresses);126extern DECL_FUNC_PTR(krb5_get_default_config_files);127extern DECL_FUNC_PTR(krb5_free_config_files);128extern DECL_FUNC_PTR(krb5_get_default_realm);129extern DECL_FUNC_PTR(krb5_free_ticket);130extern DECL_FUNC_PTR(krb5_decode_ticket);131extern DECL_FUNC_PTR(krb5_get_host_realm);132extern DECL_FUNC_PTR(krb5_free_host_realm);133extern DECL_FUNC_PTR(krb5_c_random_make_octets);134extern DECL_FUNC_PTR(krb5_free_default_realm);135extern DECL_FUNC_PTR(krb5_principal_compare);136extern DECL_FUNC_PTR(krb5_string_to_deltat);137extern DECL_FUNC_PTR(krb5_is_config_principal);138extern DECL_FUNC_PTR(krb5_cccol_cursor_new);139extern DECL_FUNC_PTR(krb5_cccol_cursor_next);140extern DECL_FUNC_PTR(krb5_cccol_cursor_free);141extern DECL_FUNC_PTR(krb5_cc_cache_match);142extern DECL_FUNC_PTR(krb5_cc_get_type);143extern DECL_FUNC_PTR(krb5_cc_new_unique);144extern DECL_FUNC_PTR(krb5_cc_support_switch);145extern DECL_FUNC_PTR(krb5_cc_switch);146extern DECL_FUNC_PTR(krb5int_cc_user_set_default_name);147148// ComErr functions149extern DECL_FUNC_PTR(com_err);150extern DECL_FUNC_PTR(error_message);151152// Profile functions153extern DECL_FUNC_PTR(profile_init);154extern DECL_FUNC_PTR(profile_release);155extern DECL_FUNC_PTR(profile_get_subsection_names);156extern DECL_FUNC_PTR(profile_free_list);157extern DECL_FUNC_PTR(profile_get_string);158extern DECL_FUNC_PTR(profile_release_string);159extern DECL_FUNC_PTR(profile_get_integer);160161// Service functions162163extern DECL_FUNC_PTR(OpenSCManagerA);164extern DECL_FUNC_PTR(OpenServiceA);165extern DECL_FUNC_PTR(QueryServiceStatus);166extern DECL_FUNC_PTR(CloseServiceHandle);167extern DECL_FUNC_PTR(LsaNtStatusToWinError);168169// LSA Functions170171extern DECL_FUNC_PTR(LsaConnectUntrusted);172extern DECL_FUNC_PTR(LsaLookupAuthenticationPackage);173extern DECL_FUNC_PTR(LsaCallAuthenticationPackage);174extern DECL_FUNC_PTR(LsaFreeReturnBuffer);175extern DECL_FUNC_PTR(LsaGetLogonSessionData);176177#ifdef __cplusplus178}179#endif180181#endif /* _LEASHDLL_H_ */182183184