|
From: <co...@us...> - 2008-05-16 00:27:11
|
Update of /cvsroot/aolserver/knspnego/wininclude/krb5 In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv7639/wininclude/krb5 Added Files: com_err.h krb5.h profile.h win-mac.h Log Message: First version of port of Apache's "mod_spnego" to AOLServer. Works, but is difficult to configure (relies on environment variables the way Apache does, instead of ns_section/ns_param) and needs some work for integration into the AOLServer "configure" environment. --- NEW FILE: com_err.h --- /* * Header file for common error description library. * * Copyright 1988, Student Information Processing Board of the * Massachusetts Institute of Technology. * * Copyright 1995 by Cygnus Support. * * For copyright and distribution info, see the documentation supplied * with this package. */ #ifndef __COM_ERR_H #if defined(_WIN32) #include <win-mac.h> #endif #ifndef KRB5_CALLCONV #define KRB5_CALLCONV #define KRB5_CALLCONV_C #endif #include <stdarg.h> typedef long errcode_t; typedef void (*et_old_error_hook_func) (const char *, errcode_t, const char *, va_list ap); struct error_table { /*@shared@*/ char const * const * msgs; long base; unsigned int n_msgs; }; #ifdef __cplusplus extern "C" { #endif /* Public interfaces */ extern void KRB5_CALLCONV_C com_err (const char *, errcode_t, const char *, ...); extern void KRB5_CALLCONV com_err_va (const char *whoami, errcode_t code, const char *fmt, va_list ap); extern /*@observer@*//*@dependent@*/ const char * KRB5_CALLCONV error_message (errcode_t) /*@modifies internalState@*/; extern errcode_t KRB5_CALLCONV add_error_table (/*@dependent@*/ const struct error_table *) /*@modifies internalState@*/; extern errcode_t KRB5_CALLCONV remove_error_table (const struct error_table *) /*@modifies internalState@*/; #if !defined(_WIN32) /* * The display routine should be application specific. A global hook, * may cause inappropriate display procedures to be called between * applications under non-Unix environments. */ extern et_old_error_hook_func set_com_err_hook (et_old_error_hook_func); extern et_old_error_hook_func reset_com_err_hook (void); #endif #ifdef __cplusplus } #endif #define __COM_ERR_H #endif /* ! defined(__COM_ERR_H) */ --- NEW FILE: krb5.h --- /* * include/krb5.h * * Copyright 1989,1990,1995,2001, 2003 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label [...3024 lines suppressed...] #define ASN1_BAD_FORMAT (1859794440L) #define ASN1_PARSE_ERROR (1859794441L) #define ASN1_BAD_GMTIME (1859794442L) #define ASN1_MISMATCH_INDEF (1859794443L) #define ASN1_MISSING_EOC (1859794444L) #define ERROR_TABLE_BASE_asn1 (1859794432L) extern const struct error_table et_asn1_error_table; #if !defined(_WIN32) /* for compatibility with older versions... */ extern void initialize_asn1_error_table () /*@modifies internalState@*/; #else #define initialize_asn1_error_table() #endif #if !defined(_WIN32) #define init_asn1_err_tbl initialize_asn1_error_table #define asn1_err_base ERROR_TABLE_BASE_asn1 #endif --- NEW FILE: profile.h --- /* * profile.h */ #ifndef _KRB5_PROFILE_H #define _KRB5_PROFILE_H #if defined(_WIN32) #include <win-mac.h> #endif #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) # include <TargetConditionals.h> # if TARGET_RT_MAC_CFM # error "Use KfM 4.0 SDK headers for CFM compilation." # endif #endif #ifndef KRB5_CALLCONV #define KRB5_CALLCONV #define KRB5_CALLCONV_C #endif typedef struct _profile_t *profile_t; /* * Used by the profile iterator in prof_get.c */ #define PROFILE_ITER_LIST_SECTION 0x0001 #define PROFILE_ITER_SECTIONS_ONLY 0x0002 #define PROFILE_ITER_RELATIONS_ONLY 0x0004 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #if TARGET_OS_MAC # if defined(__MWERKS__) # pragma import on # endif #endif typedef char* profile_filespec_t; /* path as C string */ typedef char* profile_filespec_list_t; /* list of : separated paths, C string */ typedef const char * const_profile_filespec_t; /* path as C string */ typedef const char * const_profile_filespec_list_t; /* list of : separated paths, C string */ long KRB5_CALLCONV profile_init (const_profile_filespec_t *files, profile_t *ret_profile); long KRB5_CALLCONV profile_init_path (const_profile_filespec_list_t filelist, profile_t *ret_profile); long KRB5_CALLCONV profile_flush (profile_t profile); void KRB5_CALLCONV profile_abandon (profile_t profile); void KRB5_CALLCONV profile_release (profile_t profile); long KRB5_CALLCONV profile_get_values (profile_t profile, const char *const *names, char ***ret_values); void KRB5_CALLCONV profile_free_list (char **list); 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); long KRB5_CALLCONV profile_get_integer (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default); long KRB5_CALLCONV profile_get_boolean (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default); long KRB5_CALLCONV profile_get_relation_names (profile_t profile, const char **names, char ***ret_names); long KRB5_CALLCONV profile_get_subsection_names (profile_t profile, const char **names, char ***ret_names); long KRB5_CALLCONV profile_iterator_create (profile_t profile, const char **names, int flags, void **ret_iter); void KRB5_CALLCONV profile_iterator_free (void **iter_p); long KRB5_CALLCONV profile_iterator (void **iter_p, char **ret_name, char **ret_value); void KRB5_CALLCONV profile_release_string (char *str); long KRB5_CALLCONV profile_update_relation (profile_t profile, const char **names, const char *old_value, const char *new_value); long KRB5_CALLCONV profile_clear_relation (profile_t profile, const char **names); long KRB5_CALLCONV profile_rename_section (profile_t profile, const char **names, const char *new_name); long KRB5_CALLCONV profile_add_relation (profile_t profile, const char **names, const char *new_value); #if TARGET_OS_MAC # if defined(__MWERKS__) # pragma import reset # endif #endif #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _KRB5_PROFILE_H */ /* * util/profile/prof_err.h: * This file is automatically generated; please do not edit it. */ #include <com_err.h> #define PROF_VERSION (-1429577728L) #define PROF_MAGIC_NODE (-1429577727L) #define PROF_NO_SECTION (-1429577726L) #define PROF_NO_RELATION (-1429577725L) #define PROF_ADD_NOT_SECTION (-1429577724L) #define PROF_SECTION_WITH_VALUE (-1429577723L) #define PROF_BAD_LINK_LIST (-1429577722L) #define PROF_BAD_GROUP_LVL (-1429577721L) #define PROF_BAD_PARENT_PTR (-1429577720L) #define PROF_MAGIC_ITERATOR (-1429577719L) #define PROF_SET_SECTION_VALUE (-1429577718L) #define PROF_EINVAL (-1429577717L) #define PROF_READ_ONLY (-1429577716L) #define PROF_SECTION_NOTOP (-1429577715L) #define PROF_SECTION_SYNTAX (-1429577714L) #define PROF_RELATION_SYNTAX (-1429577713L) #define PROF_EXTRA_CBRACE (-1429577712L) #define PROF_MISSING_OBRACE (-1429577711L) #define PROF_MAGIC_PROFILE (-1429577710L) #define PROF_MAGIC_SECTION (-1429577709L) #define PROF_TOPSECTION_ITER_NOSUPP (-1429577708L) #define PROF_INVALID_SECTION (-1429577707L) #define PROF_END_OF_SECTIONS (-1429577706L) #define PROF_BAD_NAMESET (-1429577705L) #define PROF_NO_PROFILE (-1429577704L) #define PROF_MAGIC_FILE (-1429577703L) #define PROF_FAIL_OPEN (-1429577702L) #define PROF_EXISTS (-1429577701L) #define PROF_BAD_BOOLEAN (-1429577700L) #define PROF_BAD_INTEGER (-1429577699L) #define PROF_MAGIC_FILE_DATA (-1429577698L) #define ERROR_TABLE_BASE_prof (-1429577728L) extern const struct error_table et_prof_error_table; #if !defined(_WIN32) /* for compatibility with older versions... */ extern void initialize_prof_error_table () /*@modifies internalState@*/; #else #define initialize_prof_error_table() #endif #if !defined(_WIN32) #define init_prof_err_tbl initialize_prof_error_table #define prof_err_base ERROR_TABLE_BASE_prof #endif --- NEW FILE: win-mac.h --- /* * This file is now only used on Windows */ /* * type functions split out of here to make things look nicer in the * various include files which need these definitions, as well as in * the util/ directories. */ #ifndef _KRB5_WIN_MAC_H #define _KRB5_WIN_MAC_H #ifdef _WIN32 #define ID_READ_PWD_DIALOG 10000 #define ID_READ_PWD_PROMPT 10001 #define ID_READ_PWD_PROMPT2 10002 #define ID_READ_PWD_PWD 10003 #ifdef RES_ONLY #define APSTUDIO_HIDDEN_SYMBOLS #include <windows.h> #else /* ! RES_ONLY */ #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 #define SIZEOF_LONG 4 #include <windows.h> #include <limits.h> #define HAVE_LABS #ifndef SIZE_MAX /* in case Microsoft defines max size of size_t */ #define SIZE_MAX UINT_MAX #endif #ifndef KRB5_CALLCONV # define KRB5_CALLCONV __stdcall # define KRB5_CALLCONV_C __cdecl /* * Use this to mark an incorrect calling convention that has been * "immortalized" because it was incorrectly exported in a previous * release. */ # define KRB5_CALLCONV_WRONG KRB5_CALLCONV_C #endif /* !KRB5_CALLCONV */ #ifndef KRB5_SYSTYPES__ #define KRB5_SYSTYPES__ #include <sys/types.h> typedef unsigned long u_long; /* Not part of sys/types.h on the pc */ typedef unsigned int u_int; typedef unsigned short u_short; typedef unsigned char u_char; #endif /* KRB5_SYSTYPES__ */ #define MAXHOSTNAMELEN 512 #ifndef MAXPATHLEN #define MAXPATHLEN 256 /* Also for Windows temp files */ #endif #define HAVE_NETINET_IN_H #define MSDOS_FILESYSTEM #define HAVE_STRING_H #define HAVE_SRAND #define HAVE_ERRNO #define HAVE_STRDUP #define NO_USERID #define NO_PASSWORD #define WM_KERBEROS5_CHANGED "Kerberos5 Changed" #ifdef KRB4 #define WM_KERBEROS_CHANGED "Kerberos Changed" #endif /* Kerberos Windows initialization file */ #define KERBEROS_INI "kerberos.ini" #ifdef CYGNUS #define KERBEROS_HLP "kerbnet.hlp" #else #define KERBEROS_HLP "krb5clnt.hlp" #endif #define INI_DEFAULTS "Defaults" #define INI_USER "User" /* Default user */ #define INI_INSTANCE "Instance" /* Default instance */ #define INI_REALM "Realm" /* Default realm */ #define INI_POSITION "Position" #define INI_OPTIONS "Options" #define INI_DURATION "Duration" /* Ticket duration in minutes */ #define INI_EXPIRATION "Expiration" /* Action on expiration (alert or beep) */ #define INI_ALERT "Alert" #define INI_BEEP "Beep" #define INI_FILES "Files" #ifdef KRB4 #define INI_KRB_CONF "krb.conf" /* Location of krb.conf file */ #define DEF_KRB_CONF "krb.conf" /* Default name for krb.conf file */ #else #define INI_KRB5_CONF "krb5.ini" /* From k5-config.h */ #define INI_KRB_CONF INI_KRB5_CONF /* Location of krb.conf file */ #define DEF_KRB_CONF INI_KRB5_CONF /* Default name for krb.conf file */ #define INI_TICKETOPTS "TicketOptions" /* Ticket options */ #define INI_FORWARDABLE "Forwardable" /* get forwardable tickets */ #define INI_KRB_CCACHE "krb5cc" /* From k5-config.h */ #endif #define INI_KRB_REALMS "krb.realms" /* Location of krb.realms file */ #define DEF_KRB_REALMS "krb.realms" /* Default name for krb.realms file */ #define INI_RECENT_LOGINS "Recent Logins" #define INI_LOGIN "Login" #define HAS_VOID_TYPE #define HAVE_STDARG_H #define HAVE_SYS_TYPES_H #define HAVE_STDLIB_H /* This controls which encryption routines libcrypto will provide */ #define PROVIDE_DES_CBC_MD5 #define PROVIDE_DES_CBC_CRC #define PROVIDE_DES_CBC_RAW #define PROVIDE_DES_CBC_CKSUM #define PROVIDE_CRC32 #define PROVIDE_RSA_MD4 #define PROVIDE_RSA_MD5 /* #define PROVIDE_DES3_CBC_SHA */ /* #define PROVIDE_DES3_CBC_RAW */ /* #define PROVIDE_NIST_SHA */ /* Ugly. Microsoft, in stdc mode, doesn't support the low-level i/o * routines directly. Rather, they only export the _<function> version. * The following defines works around this problem. */ #include <sys\types.h> #include <sys\stat.h> #include <fcntl.h> #include <io.h> #include <process.h> #ifdef NEED_SYSERROR /* Only needed by util/et/error_message.c but let's keep the source clean */ #define sys_nerr _sys_nerr #define sys_errlist _sys_errlist #endif /* * Functions with slightly different names on the PC */ #ifndef strcasecmp #define strcasecmp stricmp #endif #ifndef strncasecmp #define strncasecmp strnicmp #endif HINSTANCE get_lib_instance(void); #endif /* !RES_ONLY */ #endif /* _WIN32 */ #define THREEPARAMOPEN(x,y,z) open(x,y,z) #ifndef KRB5_CALLCONV #define KRB5_CALLCONV #endif #ifndef KRB5_CALLCONV_C #define KRB5_CALLCONV_C #endif #endif /* _KRB5_WIN_MAC_H */ |