Drag in the unix time conversion functions for unix only.
Locally define PROTOTYPE().
Drag in unix versions of SOCKET macros.
Recognize DEFINE_SOCKADDR and NEED_TIME_H the way cc-unix.h does.
Declare krb_ignore_ip_address.
Define DEB() to support non-printf debugging.
Declare errno.
Define key_proc_type and decrypt_tkt_type.
* prot.h: add KERB_ERR_PREAUTH_SHORT and _MISMATCH from Cygnus
extensions.
* krbports.h: new file, has default ports for V4 services for
hard-coded fallback.
* lsb_addr_cmp.h: from V4, handles the mutant comparison
functions needed for the V4 "direction" comparison. (Rename
of lsb_addr_comp.h due to filename length.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5540
dc483132-0cff-0310-8789-
dd5450dbe970
kparse.h
krb.h
krb4-proto.h
+krbports.h
krb_conf.h
krb_db.h
krb_err.h
+lsb_addr_cmp.h
lsb_addr_comp.h
mit-copyright.h
osconf.h
+Thu Apr 27 10:55:00 1995 Mark Eichin <eichin@cygnus.com>
+
+ * krb.h: make INTERFACE, FAR go away for now.
+ Drag in the unix time conversion functions for unix only.
+ Locally define PROTOTYPE().
+ Drag in unix versions of SOCKET macros.
+ Recognize DEFINE_SOCKADDR and NEED_TIME_H the way cc-unix.h does.
+ Declare krb_ignore_ip_address.
+ Define DEB() to support non-printf debugging.
+ Declare errno.
+ Define key_proc_type and decrypt_tkt_type.
+ * prot.h: add KERB_ERR_PREAUTH_SHORT and _MISMATCH from Cygnus
+ extensions.
+ * krbports.h: new file, has default ports for V4 services for
+ hard-coded fallback.
+ * lsb_addr_cmp.h: from V4, handles the mutant comparison
+ functions needed for the V4 "direction" comparison. (Rename
+ of lsb_addr_comp.h due to filename length.)
+
Tue Mar 14 16:53:37 1995 <tytso@rsx-11.mit.edu>
* Makefile.in: Delete definitions defined in pre/config.in.
#define KOPT_DO_OLDSTYLE 0x00000008 /* use the old-style protocol */
#endif /* ATHENA_COMPAT */
+/* until we do V4 compat under DOS, just turn this off */
+#define INTERFACE
+#define FAR
+/* and likewise, just drag in the unix time interface */
+#define TIME_GMT_UNIXSEC unix_time_gmt_unixsec((unsigned KRB4_32 *)0)
+#define TIME_GMT_UNIXSEC_US(us) unix_time_gmt_unixsec((us))
+#define CONVERT_TIME_EPOCH ((long)0) /* Unix epoch is Krb epoch */
+
+#if defined(__STDC__) || defined(KRB5_PROVIDE_PROTOTYPES) || defined(_WINDOWS)
+#define PROTOTYPE(x) x
+#else
+#define PROTOTYPE(x) ()
+#endif /* STDC or PROTOTYPES */
+
+/* Define u_char, u_short, u_int, and u_long. */
+#include <sys/types.h>
+
+/* If this source file requires it, define struct sockaddr_in
+ (and possibly other things related to network I/O). FIXME. */
+#ifdef DEFINE_SOCKADDR
+#include <netinet/in.h> /* For struct sockaddr_in and in_addr */
+#include <arpa/inet.h> /* For inet_ntoa */
+#include <netdb.h> /* For struct hostent, gethostbyname, etc */
+#include <sys/param.h> /* For MAXHOSTNAMELEN */
+#include <sys/socket.h> /* For SOCK_*, AF_*, etc */
+#include <sys/time.h> /* For struct timeval */
+#ifdef NEED_TIME_H
+#include <time.h> /* For localtime, etc */
+#endif
+#endif
+/*
+ * Compatability with WinSock calls on MS-Windows...
+ */
+#define SOCKET unsigned int
+#define INVALID_SOCKET ((SOCKET)~0)
+#define closesocket close
+#define ioctlsocket ioctl
+#define SOCKET_ERROR (-1)
+
+/* Some of our own infrastructure where the WinSock stuff was too hairy
+ to dump into a clean Unix program... */
+
+#define SOCKET_INITIALIZE() (0) /* No error (or anything else) */
+#define SOCKET_CLEANUP() /* nothing */
+#define SOCKET_ERRNO errno
+#define SOCKET_SET_ERRNO(x) (errno = (x))
+#define SOCKET_NFDS(f) ((f)+1) /* select() arg for a single fd */
+#define SOCKET_READ read
+#define SOCKET_WRITE write
+#define SOCKET_EINTR EINTR
+
+/* ask to disable IP address checking in the library */
+extern int krb_ignore_ip_address;
+
+/* Debugging printfs shouldn't even be compiled on many systems that don't
+ support printf! Use it like DEB (("Oops - %s\n", string)); */
+
+#ifdef DEBUG
+#define DEB(x) if (krb_debug) printf x
+extern int krb_debug;
+#else
+#define DEB(x) /* nothing */
+#endif
+
+
+/*
+ * Some Unixes don't declare errno in <errno.h>...
+ * Move this out to individual c-*.h files if it becomes troublesome.
+ */
+#ifndef errno
+extern int errno;
+#endif
+
+/* Define a couple of function types including parameters. These
+ are needed on MS-Windows to convert arguments of the function pointers
+ to the proper types during calls. */
+typedef int (*key_proc_type) PROTOTYPE ((char *, char *, char *,
+ char *, C_Block));
+typedef int (*decrypt_tkt_type) PROTOTYPE ((char *, char *, char *, char *,
+ key_proc_type, KTEXT *));
+
#endif /* KRB_DEFS */
--- /dev/null
+/* krbports.h -- fallback port numbers in case /etc/services isn't changed */
+/* used by: appl/bsd/rcp.c, rlogin.c, rsh.c, knetd.c
+ kadmin/kadm_ser_wrap.c, lib/kadm/kadm_cli_wrap.c
+ lib/krb/send_to_kdc.c
+ movemail/movemail.c, pfrom/popmail.c
+ server/kerberos.c, slave/kprop.c, kpropd.c
+*/
+
+#define KRB_SHELL_PORT 544
+#define UCB_SHELL_PORT 514
+
+#define KLOGIN_PORT 543
+#define EKLOGIN_PORT 2105
+#define UCB_LOGIN_PORT 513
+
+#define KADM_PORT 751
+#define KERBEROS_PORT 750
+#define KERBEROS_SEC_PORT 88
+#define KRB_PROP_PORT 754
+
+#define KPOP_PORT 1109
+#define POP3_PORT 110
+
+#define KNETD_PORT 2053
+
+/* already in rkinit_private.h */
+#define RKINIT_PORT 2108
--- /dev/null
+/*
+ * include/kerberosIV/lsb_addr_cmp.h
+ *
+ * Copyright 1988, 1995 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ *
+ * Comparison macros to emulate LSBFIRST comparison results of network
+ * byte-order quantities
+ */
+
+#include "mit-copyright.h"
+#ifndef LSB_ADDR_COMP_DEFS
+#define LSB_ADDR_COMP_DEFS
+
+#include "osconf.h"
+
+/* note that if we don't explicitly know if we're LSBFIRST, the
+ alternate code is byte order independent and will give the
+ right answer. */
+#ifdef LSBFIRST
+#define lsb_net_ulong_less(x,y) ((x < y) ? -1 : ((x > y) ? 1 : 0))
+#define lsb_net_ushort_less(x,y) ((x < y) ? -1 : ((x > y) ? 1 : 0))
+#else
+/* MSBFIRST */
+#define u_char_comp(x,y) \
+ (((x)>(y))?(1):(((x)==(y))?(0):(-1)))
+/* This is gross, but... */
+#define lsb_net_ulong_less(x, y) long_less_than((u_char *)&x, (u_char *)&y)
+#define lsb_net_ushort_less(x, y) short_less_than((u_char *)&x, (u_char *)&y)
+
+#define long_less_than(x,y) \
+ (u_char_comp((x)[3],(y)[3])?u_char_comp((x)[3],(y)[3]): \
+ (u_char_comp((x)[2],(y)[2])?u_char_comp((x)[2],(y)[2]): \
+ (u_char_comp((x)[1],(y)[1])?u_char_comp((x)[1],(y)[1]): \
+ (u_char_comp((x)[0],(y)[0])))))
+#define short_less_than(x,y) \
+ (u_char_comp((x)[1],(y)[1])?u_char_comp((x)[1],(y)[1]): \
+ (u_char_comp((x)[0],(y)[0])))
+
+#endif /* LSBFIRST */
+
+#endif /* LSB_ADDR_COMP_DEFS */
#define KERB_ERR_PRINCIPAL_UNKNOWN 8
#define KERB_ERR_PRINCIPAL_NOT_UNIQUE 9
#define KERB_ERR_NULL_KEY 10
+/* Cygnus extensions for Preauthentication */
+#define KERB_ERR_PREAUTH_SHORT 11
+#define KERB_ERR_PREAUTH_MISMATCH 12
#endif /* PROT_DEFS */