+Tue Mar 7 14:54:02 1995 Keith Vetter (keithv@fusion.com)
+
+ * ccache.h: added windows INTERFACE keyword to all functions.
+ * encryption.h: more segment games for the PC--added NEAR to three
+ external data objects.
+ * wordsize.h: added constants VALID_INT_BTIS and VALID_UINT_BITS for
+ detecting overflow when casting a long to an int.
+ * k5-config.h: numerous PC changes such as adding NEED_LOWLEVEL_IO
+ which enables the read/write level of I/O.
+ * Makefile.in: osconf.h now pulled in from stock/osconf.win.
+
Thu Mar 2 23:21:46 1995 John Gilmore (gnu at toad.com)
Make include files start to work on the Macintosh.
all-unix:: $(BUILT_HEADERS)
all-windows:
- echo /* not used in windows */ > osconf.h
+ copy stock\osconf.win osconf.h
echo /* not used in windows */ > autoconf.h
includes:: autoconf.h
typedef struct _krb5_cc_ops {
krb5_magic magic;
char *prefix;
- char *(*get_name) NPROTOTYPE((krb5_context, krb5_ccache));
- krb5_error_code (*resolve) NPROTOTYPE((krb5_context, krb5_ccache *,
+ char *(INTERFACE *get_name) NPROTOTYPE((krb5_context, krb5_ccache));
+ krb5_error_code (INTERFACE *resolve) NPROTOTYPE((krb5_context, krb5_ccache *,
char *));
- krb5_error_code (*gen_new) NPROTOTYPE((krb5_context, krb5_ccache *));
- krb5_error_code (*init) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *gen_new) NPROTOTYPE((krb5_context, krb5_ccache *));
+ krb5_error_code (INTERFACE *init) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_principal));
- krb5_error_code (*destroy) NPROTOTYPE((krb5_context, krb5_ccache));
- krb5_error_code (*close) NPROTOTYPE((krb5_context, krb5_ccache));
- krb5_error_code (*store) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *destroy) NPROTOTYPE((krb5_context, krb5_ccache));
+ krb5_error_code (INTERFACE *close) NPROTOTYPE((krb5_context, krb5_ccache));
+ krb5_error_code (INTERFACE *store) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_creds *));
- krb5_error_code (*retrieve) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *retrieve) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_flags, krb5_creds *,
krb5_creds *));
- krb5_error_code (*get_princ) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *get_princ) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_principal *));
- krb5_error_code (*get_first) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *get_first) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_cc_cursor *));
- krb5_error_code (*get_next) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *get_next) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_cc_cursor *, krb5_creds *));
- krb5_error_code (*end_get) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *end_get) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_cc_cursor *));
- krb5_error_code (*remove_cred) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *remove_cred) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_flags, krb5_creds *));
- krb5_error_code (*set_flags) NPROTOTYPE((krb5_context, krb5_ccache,
+ krb5_error_code (INTERFACE *set_flags) NPROTOTYPE((krb5_context, krb5_ccache,
krb5_flags));
} krb5_cc_ops;
krb5_roundup((length)+(crypto)->pad_minimum, (crypto)->block_length)
/* This array is indexed by encryption type */
-extern krb5_cs_table_entry *krb5_csarray[];
+extern krb5_cs_table_entry * NEAR krb5_csarray[];
extern int krb5_max_cryptosystem; /* max entry in array */
/* This array is indexed by key type, and has (should have) pointers to
the same entries as krb5_csarray */
/* XXX what if a given keytype works for several etypes? */
-extern krb5_cs_table_entry *krb5_keytype_array[];
+extern krb5_cs_table_entry * NEAR krb5_keytype_array[];
extern int krb5_max_keytype; /* max entry in array */
/* This array is indexed by checksum type */
-extern krb5_checksum_entry *krb5_cksumarray[];
+extern krb5_checksum_entry * NEAR krb5_cksumarray[];
extern int krb5_max_cksum; /* max entry in array */
#define valid_etype(etype) ((((int) etype) <= krb5_max_cryptosystem) && (etype > 0) && krb5_csarray[etype])
#define SIZEOF_INT 2
#define SIZEOF_SHORT 2
#define SIZEOF_LONG 4
+#define MAXHOSTNAMELEN 512
#define KRB5_USE_INET
#define MSDOS_FILESYSTEM
#define USE_STRING_H
#define HAVE_SRAND
#define HAVE_ERRNO
+#define HAS_STRDUP
#define NO_USERID
+#define NOFCHMOD
+
+#define HAS_ANSI_CONST /* For compiling w/o -Za */
+#define HAS_ANSI_VOLATILE
+#define HAS_VOID_TYPE
+#define KRB5_PROVIDE_PROTOTYPES
+#define STDARG_PROTOTYPES
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define INTERFACE __far __export __pascal
#define INTERFACE_C __far __export __cdecl
#endif
-#define FAR _far
/*
* The following defines are needed to make <windows.h> work
* in stdc mode (/Za flag). Winsock.h needs <windows.h>.
*/
+#define FAR _far
+#define NEAR _near
#define _far __far
#define _near __near
#define _pascal __pascal
#include <winsock.h>
#endif
+#ifdef NEED_LOWLEVEL_IO
+/* 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 <fcntl.h>
+#include <io.h>
+#include <process.h>
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_RDWR _O_RDWR
+#define O_APPEND _O_APPEND
+#define O_CREAT _O_CREAT
+#define O_TRUNC _O_TRUNC
+#define O_EXCL _O_EXCL
+#define O_TEXT _O_TEXT
+#define O_BINARY _O_BINARY
+#define O_NOINHERIT _O_NOINHERIT
+#define S_IREAD _S_IREAD
+#define S_IWRITE _S_IWRITE
+#define S_IRUSR S_IREAD /* read permission, owner */
+#define S_IWUSR S_IWRITE /* write permission, owner */
+#define stat _stat
+#define unlink _unlink
+#define lseek _lseek
+#define write _write
+#define open _open
+#define close _close
+#define read _read
+#define fstat _fstat
+#define chmod _chmod
+#define mktemp _mktemp
+
+#define getpid _getpid
+
+#endif
+
/* XXX these should be parameterized soon... */
#define PROVIDE_DES_CBC_MD5
#define PROVIDE_DES_CBC_CRC
#define PROVIDE_DES_CBC_CKSUM
#define PROVIDE_RSA_MD4
#define PROVIDE_RSA_MD5
+#define DEFAULT_PWD_STRING1 "Enter password:"
+#define DEFAULT_PWD_STRING2 "Re-enter password for verification:"
+
+/* Functions with slightly different names on the PC
+*/
+#define strcasecmp _stricmp
+#define strdup _strdup
+#define off_t _off_t
#else /* Rest of include file is for non-Microloss-Windows */
#define INTERFACE
#define INTERFACE_C
#define FAR
+#define NEAR
#ifndef HAS_LABS
#define labs(x) abs(x)
#endif
-#endif /* __windows__ */
+#endif /* _MSDOS */
#endif /* KRB5_CONFIG__ */
+Tue Mar 7 15:09:44 1995 Keith Vetter (keithv@fusion.com)
+
+ * osconf.win: new file. Windows version of osconf with valid
+ path names.
+
Mon Feb 20 12:30:42 1995 John Gilmore (gnu at toad.com)
* config.h, config.win: Remove; merge them both into ../config.h.
--- /dev/null
+/*
+ * include/krb5/stock/osconf.h
+ *
+ * Copyright 1990,1991 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. M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ *
+ * Site- and OS- dependant configuration.
+ */
+
+#ifndef KRB5_OSCONF__
+#define KRB5_OSCONF__
+
+#ifndef KRB5_AUTOCONF__
+#define KRB5_AUTOCONF__
+#include "autoconf.h"
+#endif
+
+#define USE_DBM_LNAME /* Use a DBM database for the aname/lname
+ conversion */
+
+#ifdef KRB5_ATHENA_COMPAT
+#define DEFAULT_CONFIG_FILENAME "/etc/athena/krb.conf.v5"
+#define DEFAULT_TRANS_FILENAME "/etc/athena/krb.realms"
+#define DEFAULT_LNAME_FILENAME "/etc/athena/aname"
+#define DEFAULT_KEYTAB_NAME "FILE:/etc/athena/v5srvtab"
+#else
+#define DEFAULT_CONFIG_FILENAME "/krb.conf"
+#define DEFAULT_TRANS_FILENAME "/krb.realms"
+#define DEFAULT_LNAME_FILENAME "/aname"
+#define DEFAULT_KEYTAB_NAME "FILE:/v5srvtab"
+#endif
+
+#define DEFAULT_KDB_FILE "@KDB5DIR/principal"
+#define DEFAULT_ADMIN_ACL "@KDB5DIR/admin_acl_file"
+
+#define DEFAULT_KDC_ETYPE ETYPE_DES_CBC_CRC
+#define DEFAULT_KDC_KEYTYPE KEYTYPE_DES
+#define KDCRCACHE "dfl:krb5kdc_rcache"
+
+#define KDC_PORTNAME "kerberos" /* for /etc/services or equiv. */
+#define KDC_SECONDARY_PORTNAME "kerberos-sec" /* For backwards */
+ /* compatibility with */
+ /* port 750 clients */
+
+#define KRB5_DEFAULT_PORT 88
+#define KRB5_DEFAULT_SEC_PORT 750
+
+#define MAX_DGRAM_SIZE 4096
+#define MAX_SKDC_TIMEOUT 30
+#define SKDC_TIMEOUT_SHIFT 2 /* left shift of timeout for backoff */
+#define SKDC_TIMEOUT_1 1 /* seconds for first timeout */
+
+#define RCTMPDIR "/usr/tmp" /* directory to store replay caches */
+
+#define KRB5_PATH_TTY "/dev/tty"
+#define KRB5_PATH_LOGIN "@KRB5ROOT/sbin/login.krb5"
+#define KRB5_PATH_RLOGIN "@KRB5ROOT/bin/rlogin"
+
+#define KRB5_ENV_CCNAME "KRB5CCNAME"
+
+/*
+ * krb4 kadmin stuff follows
+ */
+
+/* the default syslog file */
+#define KADM_SYSLOG "@KDB5DIR/admin_server.syslog"
+
+/* where to find the bad password table */
+#define PW_CHECK_FILE "@KDB5DIR/bad_passwd"
+
+#define DEFAULT_ACL_DIR "@KDB5DIR"
+#endif /* KRB5_OSCONF__ */
#if (SIZEOF_INT == 2)
typedef int krb5_int16;
typedef unsigned int krb5_ui_2;
+#define VALID_INT_BITS 0x7fff
+#define VALID_UINT_BITS 0xffff
#elif (SIZEOF_SHORT == 2)
typedef short krb5_int16;
typedef unsigned short krb5_ui_2;
#if (SIZEOF_INT == 4)
typedef int krb5_int32;
typedef unsigned int krb5_ui_4;
+#define VALID_INT_BITS 0x7fffffff
+#define VALID_UINT_BITS 0xffffffff
#elif (SIZEOF_LONG == 4)
typedef long krb5_int32;
typedef unsigned long krb5_ui_4;