diff options
Diffstat (limited to 'src/windows/leashdll/include')
-rw-r--r-- | src/windows/leashdll/include/krb4/conf-pc.h | 108 | ||||
-rw-r--r-- | src/windows/leashdll/include/krb4/conf.h | 74 | ||||
-rw-r--r-- | src/windows/leashdll/include/krb4/osconf.h | 59 | ||||
-rw-r--r-- | src/windows/leashdll/include/leasherr.h | 32 | ||||
-rw-r--r-- | src/windows/leashdll/include/leashinfo.h | 2 | ||||
-rw-r--r-- | src/windows/leashdll/include/leashwin.h | 188 | ||||
-rw-r--r-- | src/windows/leashdll/include/loadfuncs-com_err.h | 44 | ||||
-rw-r--r-- | src/windows/leashdll/include/loadfuncs-krb5.h | 1757 | ||||
-rw-r--r-- | src/windows/leashdll/include/loadfuncs-lsa.h | 45 | ||||
-rw-r--r-- | src/windows/leashdll/include/loadfuncs-profile.h | 151 | ||||
-rw-r--r-- | src/windows/leashdll/include/loadfuncs.h | 41 |
11 files changed, 2501 insertions, 0 deletions
diff --git a/src/windows/leashdll/include/krb4/conf-pc.h b/src/windows/leashdll/include/krb4/conf-pc.h new file mode 100644 index 0000000000..65a8779caf --- /dev/null +++ b/src/windows/leashdll/include/krb4/conf-pc.h @@ -0,0 +1,108 @@ +/* + * Copyright 1988 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * <mit-copyright.h>. + * + * Machine-type definitions: IBM PC 8086 + */ + +#if defined(_WIN32) && !defined(WIN32) +#define WIN32 +#endif + +#if ( defined(WIN16) || defined(WIN32) || defined(_WINDOWS)) && !defined(WINDOWS) +#define WINDOWS +#endif + +#if defined(__OS2__) && !defined(OS2) +#define OS2 +#endif + +#ifdef WIN16 +#define BITS16 +#else +#ifdef MSDOS +#define BITS16 +#else +#define BITS32 +#endif +#endif +#define LSBFIRST + +#define index(s,c) strchr(s,c) /* PC version of index */ +#define rindex(s,c) strrchr(s,c) +#if !defined(OS2) && !defined(LWP) /* utils.h under OS/2 */ +#define bcmp(s1,s2,n) memcmp((s1),(s2),(n)) +#define bcopy(a,b,c) memcpy( (b), (a), (c) ) +#define bzero(a,b) memset( (a), 0, (b) ) +#endif + +typedef unsigned char u_char; +typedef unsigned long u_long; +typedef unsigned short u_short; +typedef unsigned int u_int; +#define NO_UIDGID_T + +#if !defined(WINDOWS) && !defined(DWORD) +typedef long DWORD; +#endif + +#if defined(PC)&&!defined(WINDOWS) +#ifndef LPSTR +typedef char *LPSTR; +typedef char *LPBYTE; +typedef char *CHARPTR; +typedef char *LPINT; +typedef unsigned int WORD; +#endif +#define LONG long +#define FAR +#define PASCAL +#define EXPORT +#endif + +#ifdef OS2 +#include <utils.h> +#define lstrcpy strcpy +#define lstrlen strlen +#define lstrcmp strcmp +#define lstrcpyn strncpy +#endif + +#ifdef WIN32 +#define _export +#endif + +#if defined(BITS32) +#define far +#define near +#endif + +#ifdef WINDOWS +#include <windows.h> +#endif + +#ifdef WIN32 +#include <windowsx.h> +#endif + +#ifdef WIN16 +#pragma message ( "WIN16 in " __FILE__ ) +#include <time.h> +#include <process.h> +#ifndef KRB_INT32 +#define KRB_INT32 long +#endif +#ifndef KRB_UINT32 +#define KRB_UINT32 unsigned KRB_INT32 +#endif +#endif + + +#define RANDOM_KRB_INT32_1 ((KRB_INT32) time(NULL)) +#define RANDOM_KRB_INT32_2 ((KRB_INT32) getpid()) +#define TIME_GMT_UNIXSEC unix_time_gmt_unixsec((unsigned KRB_INT32 *)0); +#ifndef MAXPATHLEN +#define MAXPATHLEN _MAX_PATH +#endif diff --git a/src/windows/leashdll/include/krb4/conf.h b/src/windows/leashdll/include/krb4/conf.h new file mode 100644 index 0000000000..2e2a84cd6e --- /dev/null +++ b/src/windows/leashdll/include/krb4/conf.h @@ -0,0 +1,74 @@ +/* + * Copyright 1988 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * <mit-copyright.h>. + * + * Configuration info for operating system, hardware description, + * language implementation, C library, etc. + * + * This file should be included in (almost) every file in the Kerberos + * sources, and probably should *not* be needed outside of those + * sources. (How do we deal with /usr/include/des.h and + * /usr/include/krb.h?) + */ + +#ifndef _CONF_H_ +#define _CONF_H_ + +#include "osconf.h" + +#ifdef SHORTNAMES +#include "names.h" +#endif + +/* + * Language implementation-specific definitions + */ + +/* special cases */ +#ifdef __HIGHC__ +/* broken implementation of ANSI C */ +#undef __STDC__ +#endif + +#if !defined(__STDC__) && !defined(PC) +#define const +#define volatile +#define signed +typedef char *pointer; /* pointer to generic data */ +#ifndef PROTOTYPE +#define PROTOTYPE(p) () +#endif +#else +typedef void *pointer; +#ifndef PROTOTYPE +#define PROTOTYPE(p) p +#endif +#endif + +/* Does your compiler understand "void"? */ +#ifdef notdef +#define void int +#endif + +/* + * A few checks to see that necessary definitions are included. + */ + +#ifndef MSBFIRST +#ifndef LSBFIRST +#error byte order not defined +#endif +#endif + +/* machine size */ +#ifndef BITS16 +#ifndef BITS32 +#error number of bits? +#endif +#endif + +/* end of checks */ + +#endif /* _CONF_H_ */ diff --git a/src/windows/leashdll/include/krb4/osconf.h b/src/windows/leashdll/include/krb4/osconf.h new file mode 100644 index 0000000000..340421e868 --- /dev/null +++ b/src/windows/leashdll/include/krb4/osconf.h @@ -0,0 +1,59 @@ +/* + * Copyright 1988 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * <mit-copyright.h>. + * + * Athena configuration. + */ + +#ifndef _OSCONF_H_ +#define _OSCONF_H_ + +#ifndef PC +#if defined(IBMPC) || defined(__MSDOS__) || defined(OS2) || defined(_MSDOS) || defined(_WIN32) +#define PC +#endif +#endif + +#ifdef tahoe +#include "conf-bsdtahoe.h" +#else /* !tahoe */ +#ifdef vax +#include "conf-bsdvax.h" +#else /* !vax */ +#if defined(mips) && defined(ultrix) +#include "conf-ultmips2.h" +#else /* !Ultrix MIPS-2 */ +#ifdef ibm032 +#include "conf-bsdibm032.h" +#else /* !ibm032 */ +#ifdef apollo +#include "conf-bsdapollo.h" +#else /* !apollo */ +#ifdef sun +#ifdef sparc +#include "conf-bsdsparc.h" +#else /* sun but not sparc */ +#ifdef i386 +#include "conf-bsd386i.h" +#else /* sun but not (sparc or 386i) */ +#include "conf-bsdm68k.h" +#endif /* i386 */ +#endif /* sparc */ +#else /* !sun */ +#ifdef pyr +#include "conf-pyr.h" +#else +#if defined(PC) || defined(__MSDOS__) || defined(OS2) || defined(_MSDOS) || defined(_WIN32) +#include "conf-pc.h" +#endif /* PC */ +#endif /* pyr */ +#endif /* sun */ +#endif /* apollo */ +#endif /* ibm032 */ +#endif /* mips */ +#endif /* vax */ +#endif /* tahoe */ + +#endif /* _OSCONF_H_ */ diff --git a/src/windows/leashdll/include/leasherr.h b/src/windows/leashdll/include/leasherr.h new file mode 100644 index 0000000000..834765fbb8 --- /dev/null +++ b/src/windows/leashdll/include/leasherr.h @@ -0,0 +1,32 @@ +/* + * leasherr.h + * This file is the #include file for leasherr.et. + * Please do not edit it as it is automatically generated. + */ + +#define LSH_ONLYONEME (40591872L) +#define LSH_INVPRINCIPAL (40591873L) +#define LSH_FAILEDREALM (40591874L) +#define LSH_INVINSTANCE (40591875L) +#define LSH_INVREALM (40591876L) +#define LSH_EOF (40591877L) +#define LSH_EXPIRESOON (40591878L) +#define LSH_NOMATCH (40591879L) +#define LSH_BADCHARS (40591880L) +#define LSH_FATAL_ERROR (40591881L) +#define LSH_BADWINSOCK (40591882L) +#define LSH_BADTIMESERV (40591883L) +#define LSH_NOSOCKET (40591884L) +#define LSH_NOCONNECT (40591885L) +#define LSH_TIMEFAILED (40591886L) +#define LSH_GETTIMEOFDAY (40591887L) +#define LSH_SETTIMEOFDAY (40591888L) +#define LSH_RECVTIME (40591889L) +#define LSH_RECVBYTES (40591890L) +#define LSH_ALREADY_SETTIME (40591891L) +extern void initialize_lsh_error_table(struct et_list **); +#define ERROR_TABLE_BASE_lsh (40591872L) + +/* for compatibility with older versions... */ +#define init_lsh_err_tbl() initialize_lsh_error_table(&_et_list) +#define lsh_err_base ERROR_TABLE_BASE_lsh diff --git a/src/windows/leashdll/include/leashinfo.h b/src/windows/leashdll/include/leashinfo.h new file mode 100644 index 0000000000..7365aa1b54 --- /dev/null +++ b/src/windows/leashdll/include/leashinfo.h @@ -0,0 +1,2 @@ +#define LSH_TIME_HOST 1970 +#define LSH_DEFAULT_TICKET_LIFE 1971 diff --git a/src/windows/leashdll/include/leashwin.h b/src/windows/leashdll/include/leashwin.h new file mode 100644 index 0000000000..477c6c30cd --- /dev/null +++ b/src/windows/leashdll/include/leashwin.h @@ -0,0 +1,188 @@ +#ifndef __LEASHWIN__ +#define __LEASHWIN__ + +#include <krb.h> + +#define DLGTYPE_PASSWD 0 +#define DLGTYPE_CHPASSWD 1 +typedef struct { + int dlgtype; + // Tells whether dialog box is in change pwd more or init ticket mode??? + // (verify this): + int dlgstatemax; // What is this??? + // The title on the Dialog box - for Renewing or Initializing: + LPSTR title; + LPSTR principal; +} LSH_DLGINFO, FAR *LPLSH_DLGINFO; + +#define LEASH_USERNAME_SZ 64 +#define LEASH_REALM_SZ 192 +#define LEASH_TITLE_SZ 128 +#define LEASH_CCACHE_NAME_SZ 264 + +typedef struct { + DWORD size; + int dlgtype; + // Tells whether dialog box is in change pwd mode or init ticket mode + LPSTR title; // in v3, set to in.title + LPSTR username; // in v3, set to in.username + LPSTR realm; // in v3, set to in.realm + int use_defaults; + int forwardable; + int noaddresses; + int lifetime; + int renew_till; + int proxiable; + int publicip; + // Version 1 of this structure ends here + struct { + char username[LEASH_USERNAME_SZ]; + char realm[LEASH_REALM_SZ]; + // Version 2 of this structure ends here + char ccache[LEASH_CCACHE_NAME_SZ]; + } out; + struct { + char title[LEASH_TITLE_SZ]; + char username[LEASH_USERNAME_SZ]; + char realm[LEASH_REALM_SZ]; + char ccache[LEASH_CCACHE_NAME_SZ]; + } in; +} LSH_DLGINFO_EX, *LPLSH_DLGINFO_EX; + +#define LSH_DLGINFO_EX_V1_SZ (sizeof(DWORD) + 3 * sizeof(LPSTR) + 8 * sizeof(int)) +#define LSH_DLGINFO_EX_V2_SZ (LSH_DLGINFO_EX_V1_SZ + LEASH_USERNAME_SZ + LEASH_REALM_SZ) +#define LSH_DLGINFO_EX_V3_SZ (LSH_DLGINFO_EX_V2_SZ + LEASH_TITLE_SZ + LEASH_USERNAME_SZ + LEASH_REALM_SZ + 2 * LEASH_CCACHE_NAME_SZ) + +#ifndef NETIDMGR +#define NETID_USERNAME_SZ 128 +#define NETID_REALM_SZ 192 +#define NETID_TITLE_SZ 256 +#define NETID_CCACHE_NAME_SZ 264 + +#define NETID_DLGTYPE_TGT 0 +#define NETID_DLGTYPE_CHPASSWD 1 +typedef struct { + DWORD size; + DWORD dlgtype; + // Tells whether dialog box is in change pwd mode or init ticket mode + struct { + WCHAR title[NETID_TITLE_SZ]; + WCHAR username[NETID_USERNAME_SZ]; + WCHAR realm[NETID_REALM_SZ]; + WCHAR ccache[NETID_CCACHE_NAME_SZ]; + DWORD use_defaults; + DWORD forwardable; + DWORD noaddresses; + DWORD lifetime; + DWORD renew_till; + DWORD proxiable; + DWORD publicip; + DWORD must_use_specified_principal; + } in; + struct { + WCHAR username[NETID_USERNAME_SZ]; + WCHAR realm[NETID_REALM_SZ]; + WCHAR ccache[NETID_CCACHE_NAME_SZ]; + } out; + // Version 1 of this structure ends here +} NETID_DLGINFO, *LPNETID_DLGINFO; + +#define NETID_DLGINFO_V1_SZ (10 * sizeof(DWORD) \ + + sizeof(WCHAR) * (NETID_TITLE_SZ + \ + 2 * NETID_USERNAME_SZ + 2 * NETID_REALM_SZ + \ + 2 * NETID_CCACHE_NAME_SZ)) +#endif /* NETIDMGR */ + +typedef struct { + char principal[MAX_K_NAME_SZ]; /* Principal name/instance/realm */ + int btickets; /* Do we have tickets? */ + long lifetime; /* Lifetime -- needs to have + room for 255 5-minute + periods * 5 * 60 */ + long issue_date; /* The issue time */ + long renew_till; /* The Renew time (k5 only) */ +} TICKETINFO; + +int FAR Leash_kinit_dlg(HWND hParent, LPLSH_DLGINFO lpdlginfo); +int FAR Leash_kinit_dlg_ex(HWND hParent, LPLSH_DLGINFO_EX lpdlginfoex); +int FAR Leash_changepwd_dlg(HWND hParent, LPLSH_DLGINFO lpdlginfo); +int FAR Leash_changepwd_dlg_ex(HWND hParent, LPLSH_DLGINFO_EX lpdlginfo); + +long FAR Leash_checkpwd(char *principal, char *password); +long FAR Leash_changepwd(char *principal, char *password, char *newpassword, char** result_string); +long FAR Leash_kinit(char *principal, char *password, int lifetime); +long FAR Leash_kinit_ex(char * principal, char * password, int lifetime, + int forwardable, int proxiable, int renew_life, + int addressless, unsigned long publicIP); + +long FAR Leash_klist(HWND hlist, TICKETINFO FAR *ticketinfo); +long FAR Leash_kdestroy(void); +long FAR Leash_get_lsh_errno( LONG FAR *err_val); + +long FAR Leash_renew(void); +long FAR Leash_importable(void); +long FAR Leash_import(void); + +BOOL Leash_set_help_file( char FAR *szHelpFile ); +LPSTR Leash_get_help_file(void); + +void Leash_reset_defaults(void); + +#define NO_TICKETS 0 +#define EXPD_TICKETS 2 +#define GOOD_TICKETS 1 + +/* Leash Configuration functions - alters Current User Registry */ +DWORD Leash_get_default_lifetime(); +DWORD Leash_set_default_lifetime(DWORD minutes); +DWORD Leash_reset_default_lifetime(); +DWORD Leash_get_default_renew_till(); +DWORD Leash_set_default_renew_till(DWORD minutes); +DWORD Leash_reset_default_renew_till(); +DWORD Leash_get_default_renewable(); +DWORD Leash_set_default_renewable(DWORD onoff); +DWORD Leash_reset_default_renewable(); +DWORD Leash_get_default_forwardable(); +DWORD Leash_set_default_forwardable(DWORD onoff); +DWORD Leash_reset_default_forwardable(); +DWORD Leash_get_default_noaddresses(); +DWORD Leash_set_default_noaddresses(DWORD onoff); +DWORD Leash_reset_default_noaddresses(); +DWORD Leash_get_default_proxiable(); +DWORD Leash_set_default_proxiable(DWORD onoff); +DWORD Leash_reset_default_proxiable(); +DWORD Leash_get_default_publicip(); +DWORD Leash_set_default_publicip(DWORD ipv4addr); +DWORD Leash_reset_default_publicip(); +DWORD Leash_get_default_use_krb4(); +DWORD Leash_set_default_use_krb4(DWORD onoff); +DWORD Leash_reset_default_use_krb4(); +DWORD Leash_get_hide_kinit_options(); +DWORD Leash_set_hide_kinit_options(DWORD onoff); +DWORD Leash_reset_hide_kinit_options(); +DWORD Leash_get_default_life_min(); +DWORD Leash_set_default_life_min(DWORD minutes); +DWORD Leash_reset_default_life_min(); +DWORD Leash_get_default_life_max(); +DWORD Leash_set_default_life_max(DWORD minutes); +DWORD Leash_reset_default_life_max(); +DWORD Leash_get_default_renew_min(); +DWORD Leash_set_default_renew_min(DWORD minutes); +DWORD Leash_reset_default_renew_min(); +DWORD Leash_get_default_renew_max(); +DWORD Leash_set_default_renew_max(DWORD minutes); +DWORD Leash_reset_default_renew_max(); +DWORD Leash_get_lock_file_locations(); +DWORD Leash_set_lock_file_locations(DWORD onoff); +DWORD Leash_reset_lock_file_locations(); +DWORD Leash_get_default_uppercaserealm(); +DWORD Leash_set_default_uppercaserealm(DWORD onoff); +DWORD Leash_reset_default_uppercaserealm(); +DWORD Leash_get_default_mslsa_import(); +DWORD Leash_set_default_mslsa_import(DWORD onoffmatch); +DWORD Leash_reset_default_mslsa_import(); +DWORD Leash_get_default_preserve_kinit_settings(); +DWORD Leash_set_default_preserve_kinit_settings(DWORD onoff); +DWORD Leash_reset_default_preserve_kinit_settings(); + +#endif /* LEASHWIN */ diff --git a/src/windows/leashdll/include/loadfuncs-com_err.h b/src/windows/leashdll/include/loadfuncs-com_err.h new file mode 100644 index 0000000000..a579749c17 --- /dev/null +++ b/src/windows/leashdll/include/loadfuncs-com_err.h @@ -0,0 +1,44 @@ +#ifndef __LOADFUNCS_COM_ERR_H__ +#define __LOADFUNCS_COM_ERR_H__ + +#include "loadfuncs.h" +#include <com_err.h> + +#if defined(_WIN64) +#define COMERR_DLL "comerr64.dll" +#else +#define COMERR_DLL "comerr32.dll" +#endif + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV_C, + com_err, + (const char FAR *, errcode_t, const char FAR *, ...) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + com_err_va, + (const char FAR *whoami, errcode_t code, const char FAR *fmt, va_list ap) + ); +TYPEDEF_FUNC( + const char FAR *, + KRB5_CALLCONV, + error_message, + (errcode_t) + ); +TYPEDEF_FUNC( + errcode_t, + KRB5_CALLCONV, + add_error_table, + (const struct error_table FAR *) + ); +TYPEDEF_FUNC( + errcode_t, + KRB5_CALLCONV, + remove_error_table, + (const struct error_table FAR *) + ); + +#endif /* __LOADFUNCS_COM_ERR_H__ */ diff --git a/src/windows/leashdll/include/loadfuncs-krb5.h b/src/windows/leashdll/include/loadfuncs-krb5.h new file mode 100644 index 0000000000..1fab675391 --- /dev/null +++ b/src/windows/leashdll/include/loadfuncs-krb5.h @@ -0,0 +1,1757 @@ +#ifndef __LOADFUNCS_KRB5_H__ +#define __LOADFUNCS_KRB5_H__ + +#include "loadfuncs.h" +#include <krb5.h> + +#if defined(_WIN64) +#define KRB5_DLL "krb5_64.dll" +#else +#define KRB5_DLL "krb5_32.dll" +#endif + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_principal, + (krb5_context, krb5_principal) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_authenticator, + (krb5_context, krb5_authenticator * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_authenticator_contents, + (krb5_context, krb5_authenticator * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_addresses, + (krb5_context, krb5_address * * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_address, + (krb5_context, krb5_address * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_authdata, + (krb5_context, krb5_authdata * * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_enc_tkt_part, + (krb5_context, krb5_enc_tkt_part * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_ticket, + (krb5_context, krb5_ticket * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_tickets, + (krb5_context, krb5_ticket * * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_kdc_req, + (krb5_context, krb5_kdc_req * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_kdc_rep, + (krb5_context, krb5_kdc_rep * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_last_req, + (krb5_context, krb5_last_req_entry * * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_enc_kdc_rep_part, + (krb5_context, krb5_enc_kdc_rep_part * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_error, + (krb5_context, krb5_error * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_ap_req, + (krb5_context, krb5_ap_req * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_ap_rep, + (krb5_context, krb5_ap_rep * ) + ); + +/* Removed around the time of krb5_rc_* change... */ +#if 0 +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_safe, + (krb5_context, krb5_safe * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_priv, + (krb5_context, krb5_priv * ) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_priv_enc_part, + (krb5_context, krb5_priv_enc_part * ) + ); +#endif + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_cred, + (krb5_context, krb5_cred *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_creds, + (krb5_context, krb5_creds *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_cred_contents, + (krb5_context, krb5_creds *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_cred_enc_part, + (krb5_context, krb5_cred_enc_part *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_checksum, + (krb5_context, krb5_checksum *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_checksum_contents, + (krb5_context, krb5_checksum *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_keyblock, + (krb5_context, krb5_keyblock *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_keyblock_contents, + (krb5_context, krb5_keyblock *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_pa_data, + (krb5_context, krb5_pa_data * *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_ap_rep_enc_part, + (krb5_context, krb5_ap_rep_enc_part *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_tkt_authent, + (krb5_context, krb5_tkt_authent *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_pwd_data, + (krb5_context, krb5_pwd_data *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_pwd_sequences, + (krb5_context, passwd_phrase_element * *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_data, + (krb5_context, krb5_data *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_data_contents, + (krb5_context, krb5_data *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_unparsed_name, + (krb5_context, char *) + ); +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_cksumtypes, + (krb5_context, krb5_cksumtype *) + ); + +/* ------------------------------------------------------------------------- */ + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_encrypt, + (krb5_context context, const krb5_keyblock *key, + krb5_keyusage usage, const krb5_data *ivec, + const krb5_data *input, krb5_enc_data *output) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_decrypt, + (krb5_context context, const krb5_keyblock *key, + krb5_keyusage usage, const krb5_data *ivec, + const krb5_enc_data *input, krb5_data *output) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_encrypt_length, + (krb5_context context, krb5_enctype enctype, + size_t inputlen, size_t *length) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_block_size, + (krb5_context context, krb5_enctype enctype, + size_t *blocksize) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_make_random_key, + (krb5_context context, krb5_enctype enctype, + krb5_keyblock *random_key) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_random_make_octets, + (krb5_context context, krb5_data *data) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_random_seed, + (krb5_context context, krb5_data *data) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_string_to_key, + (krb5_context context, krb5_enctype enctype, + const krb5_data *string, const krb5_data *salt, + krb5_keyblock *key) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_enctype_compare, + (krb5_context context, krb5_enctype e1, krb5_enctype e2, + krb5_boolean *similar) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_make_checksum, + (krb5_context context, krb5_cksumtype cksumtype, + const krb5_keyblock *key, krb5_keyusage usage, + const krb5_data *input, krb5_checksum *cksum) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_verify_checksum, + (krb5_context context, + const krb5_keyblock *key, krb5_keyusage usage, + const krb5_data *data, + const krb5_checksum *cksum, + krb5_boolean *valid) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_checksum_length, + (krb5_context context, krb5_cksumtype cksumtype, + size_t *length) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_c_keyed_checksum_types, + (krb5_context context, krb5_enctype enctype, + unsigned int *count, krb5_cksumtype **cksumtypes) + ); + +/* ------------------------------------------------------------------------- */ + +TYPEDEF_FUNC( + krb5_boolean, + KRB5_CALLCONV, + valid_enctype, + (const krb5_enctype ktype) + ); + +TYPEDEF_FUNC( + krb5_boolean, + KRB5_CALLCONV, + valid_cksumtype, + (const krb5_cksumtype ctype) + ); + +TYPEDEF_FUNC( + krb5_boolean, + KRB5_CALLCONV, + is_coll_proof_cksum, + (const krb5_cksumtype ctype) + ); + +TYPEDEF_FUNC( + krb5_boolean, + KRB5_CALLCONV, + is_keyed_cksum, + (const krb5_cksumtype ctype) + ); + +/* ------------------------------------------------------------------------- */ + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_init_context, + (krb5_context *) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_context, + (krb5_context) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_decrypt_tkt_part, + (krb5_context, + const krb5_keyblock *, + krb5_ticket * ) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_tgt_creds, + (krb5_context, + krb5_creds ** ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_credentials, + (krb5_context, + const krb5_flags, + krb5_ccache, + krb5_creds *, + krb5_creds * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_credentials_validate, + (krb5_context, + const krb5_flags, + krb5_ccache, + krb5_creds *, + krb5_creds * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_credentials_renew, + (krb5_context, + const krb5_flags, + krb5_ccache, + krb5_creds *, + krb5_creds * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_req, + (krb5_context, + krb5_auth_context *, + const krb5_flags, + char *, + char *, + krb5_data *, + krb5_ccache, + krb5_data * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_req_extended, + (krb5_context, + krb5_auth_context *, + const krb5_flags, + krb5_data *, + krb5_creds *, + krb5_data * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_rep, + (krb5_context, + krb5_auth_context, + krb5_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_rd_rep, + (krb5_context, + krb5_auth_context, + const krb5_data *, + krb5_ap_rep_enc_part * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_error, + (krb5_context, + const krb5_error *, + krb5_data * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_rd_error, + (krb5_context, + const krb5_data *, + krb5_error * * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_rd_safe, + (krb5_context, + krb5_auth_context, + const krb5_data *, + krb5_data *, + krb5_replay_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_rd_priv, + (krb5_context, + krb5_auth_context, + const krb5_data *, + krb5_data *, + krb5_replay_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_parse_name, + (krb5_context, + const char *, + krb5_principal * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_unparse_name, + (krb5_context, + krb5_const_principal, + char * * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_unparse_name_ext, + (krb5_context, + krb5_const_principal, + char * *, + int *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_set_principal_realm, + (krb5_context, krb5_principal, const char *) + ); + +TYPEDEF_FUNC( + krb5_boolean, + KRB5_CALLCONV, + krb5_principal_compare, + (krb5_context, + krb5_const_principal, + krb5_const_principal) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_keyblock, + (krb5_context, + const krb5_keyblock *, + krb5_keyblock * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_keyblock_contents, + (krb5_context, + const krb5_keyblock *, + krb5_keyblock *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_creds, + (krb5_context, + const krb5_creds *, + krb5_creds * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_data, + (krb5_context, + const krb5_data *, + krb5_data * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_principal, + (krb5_context, + krb5_const_principal, + krb5_principal *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_addr, + (krb5_context, + const krb5_address *, + krb5_address * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_addresses, + (krb5_context, + krb5_address * const *, + krb5_address * * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_ticket, + (krb5_context, + const krb5_ticket *, + krb5_ticket * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_authdata, + (krb5_context, + krb5_authdata * const *, + krb5_authdata * * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_authenticator, + (krb5_context, + const krb5_authenticator *, + krb5_authenticator * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_copy_checksum, + (krb5_context, + const krb5_checksum *, + krb5_checksum * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_server_rcache, + (krb5_context, + const krb5_data *, krb5_rcache *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV_C, + krb5_build_principal_ext, + (krb5_context, krb5_principal *, int, const char *, ...) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV_C, + krb5_build_principal, + (krb5_context, krb5_principal *, int, const char *, ...) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_425_conv_principal, + (krb5_context, + const char *name, + const char *instance, const char *realm, + krb5_principal *princ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_524_conv_principal, + (krb5_context context, const krb5_principal princ, + char *name, char *inst, char *realm) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_chpw_req, + (krb5_context context, krb5_auth_context auth_context, + krb5_data *ap_req, char *passwd, krb5_data *packet) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_rd_chpw_rep, + (krb5_context context, krb5_auth_context auth_context, + krb5_data *packet, int *result_code, + krb5_data *result_data) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_chpw_result_code_string, + (krb5_context context, int result_code, + char **result_codestr) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_register, + (krb5_context, + struct _krb5_kt_ops * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_resolve, + (krb5_context, + const char *, + krb5_keytab * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_default_name, + (krb5_context, + char *, + int ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_default, + (krb5_context, + krb5_keytab * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_free_entry, + (krb5_context, + krb5_keytab_entry * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_remove_entry, + (krb5_context, + krb5_keytab, + krb5_keytab_entry * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_add_entry, + (krb5_context, + krb5_keytab, + krb5_keytab_entry * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_resolve, + (krb5_context, + const char *, + krb5_ccache * ) + ); + +TYPEDEF_FUNC( + const char*, + KRB5_CALLCONV, + krb5_cc_default_name, + (krb5_context) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_set_default_name, + (krb5_context, const char *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_default, + (krb5_context, + krb5_ccache *) + ); + +TYPEDEF_FUNC( + unsigned int, + KRB5_CALLCONV, + krb5_get_notification_message, + (void) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_copy_creds, + (krb5_context context, + krb5_ccache incc, + krb5_ccache outcc) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_us_timeofday, + (krb5_context, + krb5_int32 *, + krb5_int32 * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_timeofday, + (krb5_context, + krb5_int32 * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_os_localaddr, + (krb5_context, + krb5_address * * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_default_realm, + (krb5_context, + char * * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_set_default_realm, + (krb5_context, + const char * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_free_default_realm, + (krb5_context, + const char * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_sname_to_principal, + (krb5_context, + const char *, + const char *, + krb5_int32, + krb5_principal *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_change_password, + (krb5_context context, krb5_creds *creds, char *newpw, + int *result_code, krb5_data *result_code_string, + krb5_data *result_string) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_default_config_files, + (char ***filenames) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_config_files, + (char **filenames) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_in_tkt, + (krb5_context, + const krb5_flags, + krb5_address * const *, + krb5_enctype *, + krb5_preauthtype *, + krb5_error_code ( * )(krb5_context, + const krb5_enctype, + krb5_data *, + krb5_const_pointer, + krb5_keyblock * *), + krb5_const_pointer, + krb5_error_code ( * )(krb5_context, + const krb5_keyblock *, + krb5_const_pointer, + krb5_kdc_rep * ), + krb5_const_pointer, + krb5_creds *, + krb5_ccache, + krb5_kdc_rep * * ) + ); + + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_in_tkt_with_password, + (krb5_context, + const krb5_flags, + krb5_address * const *, + krb5_enctype *, + krb5_preauthtype *, + const char *, + krb5_ccache, + krb5_creds *, + krb5_kdc_rep * * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_in_tkt_with_skey, + (krb5_context, + const krb5_flags, + krb5_address * const *, + krb5_enctype *, + krb5_preauthtype *, + const krb5_keyblock *, + krb5_ccache, + krb5_creds *, + krb5_kdc_rep * * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_in_tkt_with_keytab, + (krb5_context, + const krb5_flags, + krb5_address * const *, + krb5_enctype *, + krb5_preauthtype *, + const krb5_keytab, + krb5_ccache, + krb5_creds *, + krb5_kdc_rep * * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_rd_req, + (krb5_context, + krb5_auth_context *, + const krb5_data *, + krb5_const_principal, + krb5_keytab, + krb5_flags *, + krb5_ticket * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_read_service_key, + (krb5_context, + krb5_pointer, + krb5_principal, + krb5_kvno, + krb5_enctype, + krb5_keyblock * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_safe, + (krb5_context, + krb5_auth_context, + const krb5_data *, + krb5_data *, + krb5_replay_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_priv, + (krb5_context, + krb5_auth_context, + const krb5_data *, + krb5_data *, + krb5_replay_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_register, + (krb5_context, + krb5_cc_ops *, + krb5_boolean ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_sendauth, + (krb5_context, + krb5_auth_context *, + krb5_pointer, + char *, + krb5_principal, + krb5_principal, + krb5_flags, + krb5_data *, + krb5_creds *, + krb5_ccache, + krb5_error * *, + krb5_ap_rep_enc_part * *, + krb5_creds * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_recvauth, + (krb5_context, + krb5_auth_context *, + krb5_pointer, + char *, + krb5_principal, + krb5_int32, + krb5_keytab, + krb5_ticket * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_ncred, + (krb5_context, + krb5_auth_context, + krb5_creds * *, + krb5_data * *, + krb5_replay_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_mk_1cred, + (krb5_context, + krb5_auth_context, + krb5_creds *, + krb5_data * *, + krb5_replay_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_rd_cred, + (krb5_context, + krb5_auth_context, + krb5_data *, + krb5_creds * * *, + krb5_replay_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_fwd_tgt_creds, + (krb5_context, + krb5_auth_context, + char *, + krb5_principal, + krb5_principal, + krb5_ccache, + int forwardable, + krb5_data *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_init, + (krb5_context, + krb5_auth_context *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_free, + (krb5_context, + krb5_auth_context) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_setflags, + (krb5_context, + krb5_auth_context, + krb5_int32) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_getflags, + (krb5_context, + krb5_auth_context, + krb5_int32 *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_setuseruserkey, + (krb5_context, + krb5_auth_context, + krb5_keyblock *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_getkey, + (krb5_context, + krb5_auth_context, + krb5_keyblock **) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_getlocalsubkey, + (krb5_context, + krb5_auth_context, + krb5_keyblock * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_set_req_cksumtype, + (krb5_context, + krb5_auth_context, + krb5_cksumtype) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_getlocalseqnumber, + (krb5_context, + krb5_auth_context, + krb5_int32 *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_getremoteseqnumber, + (krb5_context, + krb5_auth_context, + krb5_int32 *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_setrcache, + (krb5_context, + krb5_auth_context, + krb5_rcache) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_getauthenticator, + (krb5_context, + krb5_auth_context, + krb5_authenticator * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_getremotesubkey, + (krb5_context, + krb5_auth_context, + krb5_keyblock * *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_read_password, + (krb5_context, + const char *, + const char *, + char *, + int * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_host_realm, + (krb5_context, + const char *, + char * * * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_free_host_realm, + (krb5_context, + char * const * ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_realm_domain, + (krb5_context, + const char *, + char ** ) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_auth_con_genaddrs, + (krb5_context, + krb5_auth_context, + int, int) + ); + +/* ------------------------------------------------------------------------- */ + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_string_to_enctype, + (char *, krb5_enctype *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_string_to_salttype, + (char *, krb5_int32 *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_string_to_cksumtype, + (char *, krb5_cksumtype *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_string_to_timestamp, + (char *, krb5_timestamp *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_string_to_deltat, + (char *, krb5_deltat *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_enctype_to_string, + (krb5_enctype, char *, size_t) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_salttype_to_string, + (krb5_int32, char *, size_t) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cksumtype_to_string, + (krb5_cksumtype, char *, size_t) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_timestamp_to_string, + (krb5_timestamp, char *, size_t) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_timestamp_to_sfstring, + (krb5_timestamp, char *, size_t, char *) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_deltat_to_string, + (krb5_deltat, char *, size_t) + ); + +/* ------------------------------------------------------------------------- */ + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_prompter_posix, + (krb5_context context, + void *data, + const char *name, + const char *banner, + int num_prompts, + krb5_prompt prompts[]) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_init, + (krb5_get_init_creds_opt *opt) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_tkt_life, + (krb5_get_init_creds_opt *opt, + krb5_deltat tkt_life) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_renew_life, + (krb5_get_init_creds_opt *opt, + krb5_deltat renew_life) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_forwardable, + (krb5_get_init_creds_opt *opt, + int forwardable) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_proxiable, + (krb5_get_init_creds_opt *opt, + int proxiable) + ); + + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_etype_list, + (krb5_get_init_creds_opt *opt, + krb5_enctype *etype_list, + int etype_list_length) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_address_list, + (krb5_get_init_creds_opt *opt, + krb5_address **addresses) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_preauth_list, + (krb5_get_init_creds_opt *opt, + krb5_preauthtype *preauth_list, + int preauth_list_length) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_salt, + (krb5_get_init_creds_opt *opt, + krb5_data *salt) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_get_init_creds_opt_set_change_password_prompt, + (krb5_get_init_creds_opt *opt, + int prompt) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_init_creds_password, + (krb5_context context, + krb5_creds *creds, + krb5_principal client, + char *password, + krb5_prompter_fct prompter, + void *data, + krb5_deltat start_time, + char *in_tkt_service, + krb5_get_init_creds_opt *options) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_init_creds_keytab, + (krb5_context context, + krb5_creds *creds, + krb5_principal client, + krb5_keytab arg_keytab, + krb5_deltat start_time, + char *in_tkt_service, + krb5_get_init_creds_opt *options) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_verify_init_creds_opt_init, + (krb5_verify_init_creds_opt *options) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_verify_init_creds_opt_set_ap_req_nofail, + (krb5_verify_init_creds_opt *options, + int ap_req_nofail) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_verify_init_creds, + (krb5_context context, + krb5_creds *creds, + krb5_principal ap_req_server, + krb5_keytab ap_req_keytab, + krb5_ccache *ccache, + krb5_verify_init_creds_opt *options) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_validated_creds, + (krb5_context context, + krb5_creds *creds, + krb5_principal client, + krb5_ccache ccache, + char *in_tkt_service) + ); + + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_get_renewed_creds, + (krb5_context context, + krb5_creds *creds, + krb5_principal client, + krb5_ccache ccache, + char *in_tkt_service) + ); + +/* ------------------------------------------------------------------------- */ + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_realm_iterator_create, + (krb5_context context, void **iter_p) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_realm_iterator, + (krb5_context context, void **iter_p, char **ret_realm) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_realm_iterator_free, + (krb5_context context, void **iter_p) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + krb5_free_realm_string, + (krb5_context context, char *str) + ); + +TYPEDEF_FUNC( + krb5_prompt_type*, + KRB5_CALLCONV, + krb5_get_prompt_types, + (krb5_context context) + ); + +/* NOT IN krb5.h HEADER: */ + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_decode_ticket, + (const krb5_data *code, krb5_ticket **rep) + ); + +/* --- more --- */ + +TYPEDEF_FUNC( + char *, + KRB5_CALLCONV, + krb5_cc_get_name, + (krb5_context context, krb5_ccache cache) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_gen_new, + (krb5_context context, krb5_ccache *cache) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_initialize, + (krb5_context context, krb5_ccache cache, krb5_principal principal) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_destroy, + (krb5_context context, krb5_ccache cache) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_close, + (krb5_context context, krb5_ccache cache) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_store_cred, + (krb5_context context, krb5_ccache cache, krb5_creds *creds) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_retrieve_cred, + (krb5_context context, krb5_ccache cache, + krb5_flags flags, krb5_creds *mcreds, + krb5_creds *creds) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_get_principal, + (krb5_context context, krb5_ccache cache, krb5_principal *principal) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_start_seq_get, + (krb5_context context, krb5_ccache cache, krb5_cc_cursor *cursor) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_next_cred, + (krb5_context context, krb5_ccache cache, krb5_cc_cursor *cursor, + krb5_creds *creds) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_end_seq_get, + (krb5_context context, krb5_ccache cache, krb5_cc_cursor *cursor) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_remove_cred, + (krb5_context context, krb5_ccache cache, krb5_flags flags, + krb5_creds *creds) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_cc_set_flags, + (krb5_context context, krb5_ccache cache, krb5_flags flags) + ); + +TYPEDEF_FUNC( + const char *, + KRB5_CALLCONV, + krb5_cc_get_type, + (krb5_context context, krb5_ccache cache) + ); + +TYPEDEF_FUNC( + char *, + KRB5_CALLCONV, + krb5_kt_get_type, + (krb5_context, krb5_keytab keytab) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_get_name, + (krb5_context context, krb5_keytab keytab, char *name, + unsigned int namelen) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_close, + (krb5_context context, krb5_keytab keytab) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_get_entry, + (krb5_context context, krb5_keytab keytab, + krb5_const_principal principal, krb5_kvno vno, + krb5_enctype enctype, krb5_keytab_entry *entry) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_start_seq_get, + (krb5_context context, krb5_keytab keytab, krb5_kt_cursor *cursor) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_next_entry, + (krb5_context context, krb5_keytab keytab, + krb5_keytab_entry *entry, krb5_kt_cursor *cursor) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_kt_end_seq_get, + (krb5_context context, krb5_keytab keytab, krb5_kt_cursor *cursor) + ); + +TYPEDEF_FUNC( + krb5_error_code, + KRB5_CALLCONV, + krb5_locate_kdc, + (krb5_context context, const krb5_data *realm, + struct addrlist *addrlist, + int get_masters, int socktype, int family) + ); +#endif /* __LOADFUNCS_KRB5_H__ */ diff --git a/src/windows/leashdll/include/loadfuncs-lsa.h b/src/windows/leashdll/include/loadfuncs-lsa.h new file mode 100644 index 0000000000..40138f5de8 --- /dev/null +++ b/src/windows/leashdll/include/loadfuncs-lsa.h @@ -0,0 +1,45 @@ +#ifndef __LOADFUNCS_LSA_H__ +#define __LOADFUNCS_LSA_H__ + +#include "loadfuncs.h" + +#define SECUR32_DLL "secur32.dll" +#define ADVAPI32_DLL "advapi32.dll" + +TYPEDEF_FUNC( + NTSTATUS, + NTAPI, + LsaConnectUntrusted, + (PHANDLE) + ); +TYPEDEF_FUNC( + NTSTATUS, + NTAPI, + LsaLookupAuthenticationPackage, + (HANDLE, PLSA_STRING, PULONG) + ); +TYPEDEF_FUNC( + NTSTATUS, + NTAPI, + LsaCallAuthenticationPackage, + (HANDLE, ULONG, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS) + ); +TYPEDEF_FUNC( + NTSTATUS, + NTAPI, + LsaFreeReturnBuffer, + (PVOID) + ); +TYPEDEF_FUNC( + ULONG, + NTAPI, + LsaNtStatusToWinError, + (NTSTATUS) + ); +TYPEDEF_FUNC( + NTSTATUS, + NTAPI, + LsaGetLogonSessionData, + (PLUID, PSECURITY_LOGON_SESSION_DATA*) + ); +#endif /* __LOADFUNCS_LSA_H__ */ diff --git a/src/windows/leashdll/include/loadfuncs-profile.h b/src/windows/leashdll/include/loadfuncs-profile.h new file mode 100644 index 0000000000..ef7f6b7c85 --- /dev/null +++ b/src/windows/leashdll/include/loadfuncs-profile.h @@ -0,0 +1,151 @@ +#ifndef __LOADFUNCS_PROFILE_H__ +#define __LOADFUNCS_PROFILE_H__ + +#include "loadfuncs.h" +#include <profile.h> + +#if defined(_WIN64) +#define PROFILE_DLL "xpprof64.dll" +#else +#define PROFILE_DLL "xpprof32.dll" +#endif + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_init, + (const_profile_filespec_t *files, profile_t *ret_profile) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_init_path, + (const_profile_filespec_list_t filelist, profile_t *ret_profile) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_flush, + (profile_t profile) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + profile_abandon, + (profile_t profile) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + profile_release, + (profile_t profile) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_get_values, + (profile_t profile, const char **names, char ***ret_values) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + profile_free_list, + (char **list) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_get_string, + (profile_t profile, const char *name, const char *subname, + const char *subsubname, const char *def_val, + char **ret_string) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_get_integer, + (profile_t profile, const char *name, const char *subname, + const char *subsubname, int def_val, + int *ret_default) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_get_relation_names, + (profile_t profile, const char **names, char ***ret_names) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_get_subsection_names, + (profile_t profile, const char **names, char ***ret_names) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_iterator_create, + (profile_t profile, const char **names, int flags, void **ret_iter) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + profile_iterator_free, + (void **iter_p) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_iterator, + (void **iter_p, char **ret_name, char **ret_value) + ); + +TYPEDEF_FUNC( + void, + KRB5_CALLCONV, + profile_release_string, + (char *str) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_update_relation, + (profile_t profile, const char **names, const char *old_value, const char *new_value) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_clear_relation, + (profile_t profile, const char **names) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_rename_section, + (profile_t profile, const char **names, const char *new_name) + ); + +TYPEDEF_FUNC( + long, + KRB5_CALLCONV, + profile_add_relation, + (profile_t profile, const char **names, const char *new_value) + ); + + +#endif /* __LOADFUNCS_PROFILE_H__ */ diff --git a/src/windows/leashdll/include/loadfuncs.h b/src/windows/leashdll/include/loadfuncs.h new file mode 100644 index 0000000000..7aef62d21c --- /dev/null +++ b/src/windows/leashdll/include/loadfuncs.h @@ -0,0 +1,41 @@ +#ifndef __LOADFUNCS_H__ +#define __LOADFUNCS_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <windows.h> + +typedef struct _FUNC_INFO { + void** func_ptr_var; + char* func_name; +} FUNC_INFO; + +#define DECL_FUNC_PTR(x) FP_##x p##x +#define MAKE_FUNC_INFO(x) { (void**) &p##x, #x } +#define END_FUNC_INFO { 0, 0 } +#define TYPEDEF_FUNC(ret, call, name, args) typedef ret (call *FP_##name) args + +void +UnloadFuncs( + FUNC_INFO fi[], + HINSTANCE h + ); + +int +LoadFuncs( + const char* dll_name, + FUNC_INFO fi[], + HINSTANCE* ph, // [out, optional] - DLL handle + int* pindex, // [out, optional] - index of last func loaded (-1 if none) + int cleanup, // cleanup function pointers and unload on error + int go_on, // continue loading even if some functions cannot be loaded + int silent // do not pop-up a system dialog if DLL cannot be loaded + ); + +#ifdef __cplusplus +} +#endif + +#endif /* __LOADFUNCS_H__ */ |