diff options
Diffstat (limited to 'src/include/k5-int.h')
-rw-r--r-- | src/include/k5-int.h | 101 |
1 files changed, 75 insertions, 26 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 1c48809..64c2667 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -92,14 +92,9 @@ * Machine-type definitions: PC Clone 386 running Microloss Windows */ -#if defined(_MSDOS) || defined(_WIN32) || defined(macintosh) +#if defined(_MSDOS) || defined(_WIN32) #include "win-mac.h" -#if defined(macintosh) && defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) -#pragma import on -#endif -#endif -#if defined(_MSDOS) || defined(_WIN32) /* Kerberos Windows initialization file */ #define KERBEROS_INI "kerberos.ini" #define INI_FILES "Files" @@ -109,10 +104,12 @@ #define ANSI_STDIO #endif - -#ifndef macintosh -#if defined(__MWERKS__) || defined(applec) || defined(THINK_C) +/* Note, this may shoot us in the foot if we switch to CW compilers for Mach-o builds */ +#if !defined(macintosh) && (defined(__MWERKS__) || defined(applec) || defined(THINK_C)) #define macintosh +#endif + +#ifdef macintosh #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 #define HAVE_SRAND @@ -120,15 +117,11 @@ #define HAVE_LABS /*#define ENOMEM -1*/ #define ANSI_STDIO -#ifndef _SIZET -typedef unsigned int size_t; -#define _SIZET -#endif +#include <size_t.h> #include <unix.h> #include <ctype.h> +#include <fcntl.h> #endif -#endif - #ifndef KRB5_AUTOCONF__ #define KRB5_AUTOCONF__ @@ -511,7 +504,7 @@ krb5_error_code krb5_sendto_kdc const krb5_data *, const krb5_data *, krb5_data *, - int *)); + int)); krb5_error_code krb5_get_krbhst KRB5_PROTOTYPE((krb5_context, const krb5_data *, @@ -555,9 +548,8 @@ krb5_error_code krb5_locate_srv_conf const krb5_data *, const char *, struct sockaddr **, - int *, - int *, - int *)); + int*, + int)); /* no context? */ krb5_error_code krb5_locate_srv_dns @@ -565,7 +557,7 @@ krb5_error_code krb5_locate_srv_dns const char *, const char *, struct sockaddr **, - int *)); + int*)); #endif /* KRB5_LIBOS_PROTO__ */ @@ -788,11 +780,12 @@ KRB5_PROTOTYPE((krb5_context context, krb5_const krb5_keyblock *key, #define KRB5_LIBOS__ typedef struct _krb5_os_context { - krb5_magic magic; - krb5_int32 time_offset; - krb5_int32 usec_offset; - krb5_int32 os_flags; - char * default_ccname; + krb5_magic magic; + krb5_int32 time_offset; + krb5_int32 usec_offset; + krb5_int32 os_flags; + char * default_ccname; + krb5_principal default_ccprincipal; } *krb5_os_context; /* @@ -965,7 +958,7 @@ KRB5_PROTOTYPE((krb5_context context, krb5_get_init_creds_opt *options, krb5_gic_get_as_key_fct gak, void *gak_data, - int *master, + int master, krb5_kdc_rep **as_reply)); @@ -998,7 +991,12 @@ KRB5_DLLIMP void KRB5_CALLCONV krb5_free_pa_enc_ts KRB5_PROTOTYPE((krb5_context, krb5_pa_enc_ts FAR *)); /* #include "krb5/wordsize.h" -- comes in through base-defs.h. */ +#if TARGET_OS_MAC +#include <Kerberos/profile.h> +#include <Kerberos/com_err.h> /* Not included by Kerberos/profile.h */ +#else #include "profile.h" +#endif struct _krb5_context { krb5_magic magic; @@ -1506,6 +1504,8 @@ KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_ser_unpack_bytes krb5_octet FAR * FAR *, size_t FAR *)); +KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5int_cc_default + KRB5_PROTOTYPE((krb5_context, krb5_ccache FAR *)); krb5_error_code KRB5_CALLCONV krb5_cc_retrieve_cred_default KRB5_PROTOTYPE((krb5_context, krb5_ccache, krb5_flags, @@ -1529,4 +1529,53 @@ int krb5_seteuid KRB5_PROTOTYPE((int)); /* to keep lint happy */ #define krb5_xfree(val) free((char FAR *)(val)) +#if KRB5_CCACHE_ACCESSOR_FUNCTIONS +/* temporary -- this should be under lib/krb5/ccache somewhere */ + +struct _krb5_ccache { + krb5_magic magic; + struct _krb5_cc_ops FAR *ops; + krb5_pointer data; +}; + +struct _krb5_cc_ops { + krb5_magic magic; + char FAR *prefix; + char FAR * (KRB5_CALLCONV *get_name) KRB5_NPROTOTYPE((krb5_context, krb5_ccache)); + krb5_error_code (KRB5_CALLCONV *resolve) KRB5_NPROTOTYPE((krb5_context, krb5_ccache FAR *, + const char FAR *)); + krb5_error_code (KRB5_CALLCONV *gen_new) KRB5_NPROTOTYPE((krb5_context, krb5_ccache FAR *)); + krb5_error_code (KRB5_CALLCONV *init) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_principal)); + krb5_error_code (KRB5_CALLCONV *destroy) KRB5_NPROTOTYPE((krb5_context, krb5_ccache)); + krb5_error_code (KRB5_CALLCONV *close) KRB5_NPROTOTYPE((krb5_context, krb5_ccache)); + krb5_error_code (KRB5_CALLCONV *store) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_creds FAR *)); + krb5_error_code (KRB5_CALLCONV *retrieve) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_flags, krb5_creds FAR *, + krb5_creds FAR *)); + krb5_error_code (KRB5_CALLCONV *get_princ) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_principal FAR *)); + krb5_error_code (KRB5_CALLCONV *get_first) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_cc_cursor FAR *)); + krb5_error_code (KRB5_CALLCONV *get_next) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_cc_cursor FAR *, krb5_creds FAR *)); + krb5_error_code (KRB5_CALLCONV *end_get) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_cc_cursor FAR *)); + krb5_error_code (KRB5_CALLCONV *remove_cred) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_flags, krb5_creds FAR *)); + krb5_error_code (KRB5_CALLCONV *set_flags) KRB5_NPROTOTYPE((krb5_context, krb5_ccache, + krb5_flags)); +}; + +extern krb5_cc_ops *krb5_cc_dfl_ops; +#endif /* KRB5_CCACHE_ACCESSOR_FUNCTIONS */ + +#if KRB5_KEYTAB_ACCESSOR_FUNCTIONS +/* temporary -- this should be under lib/krb5/keytab somewhere */ +/* structures defined in krb5.h when KRB5_PRIVATE is 1 */ +extern krb5_kt_ops krb5_kt_dfl_ops; +#endif /* KRB5_KEYTAB_ACCESSOR_FUNCTIONS */ + + #endif /* _KRB5_INT_H */ |