diff options
Diffstat (limited to 'eBones/include')
30 files changed, 0 insertions, 1608 deletions
diff --git a/eBones/include/ChangeLog b/eBones/include/ChangeLog deleted file mode 100644 index c925a5b..0000000 --- a/eBones/include/ChangeLog +++ /dev/null @@ -1,25 +0,0 @@ -# $Id$ - -Mon Mar 21 15:48:59 MET 1994 Piero Serini - * 1st port to FreeBSD - -Tue Nov 29 11:52:51 1988 John T Kohl (jtkohl at lycus) - - * osconf.h: add #ifdef's for SUN processors (bsd/m68k) - - * conf-bsdm68k.h: new file for BSD unix/M68000-based unix boxes - -Mon Sep 12 14:33:58 1988 Bill Sommerfeld (wesommer at ra) - - * des_conf.h: deleted file (superceded by conf.h) - - * des.h: remove #include of des_conf.h - - * des.h: remove internal details (sbox structure, bit_{32,64}) from -interface. - Rename data types. - Add #defines, turned off if NCOMPAT, for compatibility with old - versions. - - - diff --git a/eBones/include/Makefile b/eBones/include/Makefile deleted file mode 100644 index 4269b31..0000000 --- a/eBones/include/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# from: @(#)Makefile 5.1 (Berkeley) 6/25/90 -# $Id$ - -FILES= kparse.h krb.h krb_db.h - -NOOBJ= noobj -NOMAN= noman -CFLAGS+= KERBEROS - -all include clean cleandir depend lint tags: - -beforeinstall: -.for i in ${FILES} - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/$i \ - ${DESTDIR}/usr/include/kerberosIV/$i -.endfor - -.include <bsd.prog.mk> diff --git a/eBones/include/addr_comp.h b/eBones/include/addr_comp.h deleted file mode 100644 index 1ef2d75..0000000 --- a/eBones/include/addr_comp.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 1987, 1988, 1989 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Include file for address comparison macros. - * - * from: addr_comp.h,v 4.0 89/01/23 09:57:44 jtkohl Exp $ - * $Id$ - */ - -#ifndef ADDR_COMP_DEFS -#define ADDR_COMP_DEFS - -/* -** Look boys and girls, a big kludge -** We need to compare the two internet addresses in network byte order, not -** local byte order. This is a *really really slow way of doing that* -** But..... -** .....it works -** so we run with it -** -** long_less_than gets fed two (u_char *)'s.... -*/ - -#define u_char_comp(x,y) \ - (((x)>(y))?(1):(((x)==(y))?(0):(-1))) - -#define long_less_than(x,y) \ - (u_char_comp((x)[0],(y)[0])?u_char_comp((x)[0],(y)[0]): \ - (u_char_comp((x)[1],(y)[1])?u_char_comp((x)[1],(y)[1]): \ - (u_char_comp((x)[2],(y)[2])?u_char_comp((x)[2],(y)[2]): \ - (u_char_comp((x)[3],(y)[3]))))) - -#endif /* ADDR_COMP_DEFS */ diff --git a/eBones/include/admin_server.h b/eBones/include/admin_server.h deleted file mode 100644 index d7f76ba..0000000 --- a/eBones/include/admin_server.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Include file for the Kerberos administration server. - * - * from: admin_server.h,v 4.7 89/01/11 11:59:42 steiner Exp $ - * $Id$ - */ - -#ifndef ADMIN_SERVER_DEFS -#define ADMIN_SERVER_DEFS - -#define PW_SRV_VERSION 2 /* version number */ - -#define INSTALL_NEW_PW (1<<0) /* - * ver, cmd, name, password, - * old_pass, crypt_pass, uid - */ - -#define ADMIN_NEW_PW (2<<1) /* - * ver, cmd, name, passwd, - * old_pass - * (grot), crypt_pass (grot) - */ - -#define ADMIN_SET_KDC_PASSWORD (3<<1) /* ditto */ -#define ADMIN_ADD_NEW_KEY (4<<1) /* ditto */ -#define ADMIN_ADD_NEW_KEY_ATTR (5<<1) /* - * ver, cmd, name, passwd, - * inst, attr (grot) - */ -#define INSTALL_REPLY (1<<1) /* ver, cmd, name, password */ -#define RETRY_LIMIT 1 -#define TIME_OUT 30 -#define USER_TIMEOUT 90 -#define MAX_KPW_LEN 40 - -#define KADM "changepw" /* service name */ - -#endif /* ADMIN_SERVER_DEFS */ diff --git a/eBones/include/conf-bsd386i.h b/eBones/include/conf-bsd386i.h deleted file mode 100644 index 155a31b..0000000 --- a/eBones/include/conf-bsd386i.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 1989 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: Sun 386i using SunOS (~BSD) - * - * from: conf-bsd386i.h,v 4.0 89/12/19 13:26:55 jtkohl Exp $ - * $Id$ - */ - -#define BITS32 -#define BIG -#define LSBFIRST -#define BSDUNIX - diff --git a/eBones/include/conf-bsdapollo.h b/eBones/include/conf-bsdapollo.h deleted file mode 100644 index c427c0e..0000000 --- a/eBones/include/conf-bsdapollo.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * from: conf-bsdapollo.h,v 4.1 89/01/24 14:26:22 jtkohl Exp $ - * $Id$ - */ - -#define BSDUNIX -#define BITS32 -#define BIG -#define MSBFIRST -#define DES_SHIFT_SHIFT -/* - * As of SR10, the C compiler claims to be __STDC__, but doesn't support - * const. Sigh. - */ -#define const - - diff --git a/eBones/include/conf-bsdibm032.h b/eBones/include/conf-bsdibm032.h deleted file mode 100644 index 5c84f07..0000000 --- a/eBones/include/conf-bsdibm032.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: IBM 032 (RT/PC) - * - * from: conf-bsdibm032.h,v 4.0 89/01/23 09:58:01 jtkohl Exp $ - * $Id$ - */ - -#define BSDUNIX -#define IBMWS -#define IBMWSASM -#define BITS32 -#define BIG -#define MSBFIRST -#define MUSTALIGN diff --git a/eBones/include/conf-bsdm68k.h b/eBones/include/conf-bsdm68k.h deleted file mode 100644 index 36a9fe8..0000000 --- a/eBones/include/conf-bsdm68k.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: 68000 with BSD Unix, e.g. SUN - * - * from: conf-bsdm68k.h,v 4.0 88/11/29 11:46:58 jtkohl Exp $ - * $Id$ - */ - -#define BITS32 -#define BIG -#define MSBFIRST -#define BSDUNIX - diff --git a/eBones/include/conf-bsdsparc.h b/eBones/include/conf-bsdsparc.h deleted file mode 100644 index 1c846ff..0000000 --- a/eBones/include/conf-bsdsparc.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: SPARC with BSD Unix, e.g. SUN-4 - * - * from: conf-bsdsparc.h,v 4.0 89/06/02 13:04:06 jtkohl Exp $ - * $Id$ - */ - -#define BITS32 -#define BIG -#define MSBFIRST -#define BSDUNIX -#define MUSTALIGN - diff --git a/eBones/include/conf-bsdtahoe.h b/eBones/include/conf-bsdtahoe.h deleted file mode 100644 index c91b3d0..0000000 --- a/eBones/include/conf-bsdtahoe.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 1989 by the Regents of the University of California - * - * Machine Description : TAHOE. - * - * from: conf-bsdtahoe.h,v 4.0 89/08/30 11:06:53 jtkohl Exp $ - * $Id$ - */ - -#define TAHOE -#define BSDUNIX -#define BITS32 -#define BIG -#define MSBFIRST -#define MUSTALIGN -#define NOASM diff --git a/eBones/include/conf-bsdvax.h b/eBones/include/conf-bsdvax.h deleted file mode 100644 index 09433ce..0000000 --- a/eBones/include/conf-bsdvax.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: VAX - * - * from: conf-bsdvax.h,v 4.0 89/01/23 09:58:12 jtkohl Exp $ - * $Id$ - */ - -#define VAX -#define BITS32 -#define BIG -#define LSBFIRST -#define BSDUNIX - -#ifndef __STDC__ -#ifndef NOASM -#define VAXASM -#endif /* no assembly */ -#endif /* standard C */ diff --git a/eBones/include/conf-ibm370.h b/eBones/include/conf-ibm370.h deleted file mode 100644 index 80d87a1..0000000 --- a/eBones/include/conf-ibm370.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: IBM 370 - * - * from: conf-ibm370.h,v 4.0 89/01/23 09:58:19 jtkohl Exp $ - * $Id$ - */ - -/* What else? */ -#define BIG -#define NONASCII -#define SHORTNAMES diff --git a/eBones/include/conf-pc.h b/eBones/include/conf-pc.h deleted file mode 100644 index d56e5a9..0000000 --- a/eBones/include/conf-pc.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: IBM PC 8086 - * - * from: conf-pc.h,v 4.0 89/01/23 09:58:26 jtkohl Exp $ - * $Id$ - * - */ - -#define IBMPC -#define BITS16 -#define CROSSMSDOS -#define LSBFIRST diff --git a/eBones/include/conf-pyr.h b/eBones/include/conf-pyr.h deleted file mode 100644 index b1d3add..0000000 --- a/eBones/include/conf-pyr.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 1989 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: Pyramid - * - * from: conf-pyr.h,v 4.0 89/12/19 13:27:16 jtkohl Exp $ - * $Id$ - */ - -#define BITS32 -#define BIG -#define MSBFIRST -#define BSDUNIX diff --git a/eBones/include/conf-ultmips2.h b/eBones/include/conf-ultmips2.h deleted file mode 100644 index ee50d90..0000000 --- a/eBones/include/conf-ultmips2.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Machine-type definitions: DECstation 3100 (MIPS R2000) - * - * from: conf-ultmips2.h,v 4.0 89/01/23 09:58:32 jtkohl Exp $ - * $Id$ - */ - -#define MIPS2 -#define BITS32 -#define BIG -#define LSBFIRST -#define BSDUNIX -#define MUSTALIGN diff --git a/eBones/include/conf.h b/eBones/include/conf.h deleted file mode 100644 index 3427e5c..0000000 --- a/eBones/include/conf.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * 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?) - * - * from: conf.h,v 4.0 89/01/23 09:58:40 jtkohl Exp $ - * $Id$ - */ - -#ifndef _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 - -#ifndef __STDC__ -#define const -#define volatile -#define signed -typedef char *pointer; /* pointer to generic data */ -#define PROTOTYPE(p) () -#else -typedef void *pointer; -#define PROTOTYPE(p) p -#endif - -/* Does your compiler understand "void"? */ -#ifdef notdef -#define void int -#endif - -/* - * A few checks to see that necessary definitions are included. - */ - -/* byte order */ - -#ifndef MSBFIRST -#ifndef LSBFIRST -Error: byte order not defined. -#endif -#endif - -/* machine size */ -#ifndef BITS16 -#ifndef BITS32 -Error: how big is this machine anyways? -#endif -#endif - -/* end of checks */ - -#endif /* _CONF_H_ */ diff --git a/eBones/include/highc.h b/eBones/include/highc.h deleted file mode 100644 index e480d1c..0000000 --- a/eBones/include/highc.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Known breakage in the version of Metaware's High C compiler that - * we've got available.... - * - * from: highc.h,v 4.0 89/01/23 09:59:15 jtkohl Exp $ - * $Id$ - */ - -#define const -/*#define volatile*/ - -/* - * Some builtin functions we can take advantage of for inlining.... - */ - -#define abs _abs -/* the _max and _min builtins accept any number of arguments */ -#undef MAX -#define MAX(x,y) _max(x,y) -#undef MIN -#define MIN(x,y) _min(x,y) -/* - * I'm not sure if 65535 is a limit for this builtin, but it's - * reasonable for a string length. Or is it? - */ -/*#define strlen(s) _find_char(s,65535,0)*/ -#define bzero(ptr,len) _fill_char(ptr,len,'\0') -#define bcmp(b1,b2,len) _compare(b1,b2,len) diff --git a/eBones/include/kdc.h b/eBones/include/kdc.h deleted file mode 100644 index 7950fff..0000000 --- a/eBones/include/kdc.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Include file for the Kerberos Key Distribution Center. - * - * from: kdc.h,v 4.1 89/01/24 17:54:04 jon Exp $ - * $Id$ - */ - -#ifndef KDC_DEFS -#define KDC_DEFS - -#define S_AD_SZ sizeof(struct sockaddr_in) - -#define max(a,b) (a>b ? a : b) -#define min(a,b) (a<b ? a : b) - -#define TRUE 1 -#define FALSE 0 - -#define MKEYFILE "/etc/kerberosIV/master_key" -#define K_LOGFIL "/var/log/kpropd.log" -#define KS_LOGFIL "/var/log/kerberos_slave.log" -#define KRB_ACL "/etc/kerberosIV/kerberos.acl" -#define KRB_PROG "./kerberos" - -#define ONE_MINUTE 60 -#define FIVE_MINUTES (5 * ONE_MINUTE) -#define ONE_HOUR (60 * ONE_MINUTE) -#define ONE_DAY (24 * ONE_HOUR) -#define THREE_DAYS (3 * ONE_DAY) - -#endif /* KDC_DEFS */ - diff --git a/eBones/include/klog.h b/eBones/include/klog.h deleted file mode 100644 index dd1fe65..0000000 --- a/eBones/include/klog.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * This file defines the types of log messages logged by klog. Each - * type of message may be selectively turned on or off. - * - * from: klog.h,v 4.7 89/01/24 17:55:07 jon Exp $ - * $Id$ - */ - -#ifndef KLOG_DEFS -#define KLOG_DEFS - -#define KRBLOG "/var/log/kerberos.log" /* master server */ -#define KRBSLAVELOG "/var/log/kerberos_slave.log" /* master server */ -#define NLOGTYPE 100 /* Maximum number of log msg types */ - -#define L_NET_ERR 1 /* Error in network code */ -#define L_NET_INFO 2 /* Info on network activity */ -#define L_KRB_PERR 3 /* Kerberos protocol errors */ -#define L_KRB_PINFO 4 /* Kerberos protocol info */ -#define L_INI_REQ 5 /* Request for initial ticket */ -#define L_NTGT_INTK 6 /* Initial request not for TGT */ -#define L_DEATH_REQ 7 /* Request for server death */ -#define L_TKT_REQ 8 /* All ticket requests using a tgt */ -#define L_ERR_SEXP 9 /* Service expired */ -#define L_ERR_MKV 10 /* Master key version incorrect */ -#define L_ERR_NKY 11 /* User's key is null */ -#define L_ERR_NUN 12 /* Principal not unique */ -#define L_ERR_UNK 13 /* Principal Unknown */ -#define L_ALL_REQ 14 /* All requests */ -#define L_APPL_REQ 15 /* Application requests (using tgt) */ -#define L_KRB_PWARN 16 /* Protocol warning messages */ - -char *klog(); - -#endif /* KLOG_DEFS */ diff --git a/eBones/include/kparse.h b/eBones/include/kparse.h deleted file mode 100644 index 077aa59..0000000 --- a/eBones/include/kparse.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Include file for kparse routines. - * - * from: kparse.h,v 4.5 89/01/11 12:05:53 steiner Exp $ - * $Id$ - */ - -#ifndef KPARSE_DEFS -#define KPARSE_DEFS - -/* - * values returned by fGetParameterSet() - */ - -#define PS_BAD_KEYWORD -2 /* unknown or duplicate keyword */ -#define PS_SYNTAX -1 /* syntax error */ -#define PS_OKAY 0 /* got a complete parameter set */ -#define PS_EOF 1 /* nothing more in the file */ - -/* - * values returned by fGetKeywordValue() - */ - -#define KV_SYNTAX -2 /* syntax error */ -#define KV_EOF -1 /* nothing more in the file */ -#define KV_OKAY 0 /* got a keyword/value pair */ -#define KV_EOL 1 /* nothing more on this line */ - -/* - * values returned by fGetToken() - */ - -#define GTOK_BAD_QSTRING -1 /* newline found in quoted string */ -#define GTOK_EOF 0 /* end of file encountered */ -#define GTOK_QSTRING 1 /* quoted string */ -#define GTOK_STRING 2 /* unquoted string */ -#define GTOK_NUMBER 3 /* one or more digits */ -#define GTOK_PUNK 4 /* punks are punctuation, newline, - * etc. */ -#define GTOK_WHITE 5 /* one or more whitespace chars */ - -/* - * extended character classification macros - */ - -#define ISOCTAL(CH) ( (CH>='0') && (CH<='7') ) -#define ISQUOTE(CH) ( (CH=='\"') || (CH=='\'') || (CH=='`') ) -#define ISWHITESPACE(C) ( (C==' ') || (C=='\t') ) -#define ISLINEFEED(C) ( (C=='\n') || (C=='\r') || (C=='\f') ) - -/* - * tokens consist of any printable charcacter except comma, equal, or - * whitespace - */ - -#define ISTOKENCHAR(C) ((C>040) && (C<0177) && (C != ',') && (C != '=')) - -/* - * the parameter table defines the keywords that will be recognized by - * fGetParameterSet, and their default values if not specified. - */ - -typedef struct { - char *keyword; - char *defvalue; - char *value; -} parmtable; - -#define PARMCOUNT(P) (sizeof(P)/sizeof(P[0])) - -extern int LineNbr; /* current line # in parameter file */ - -extern char ErrorMsg[]; /* - * meaningful only when KV_SYNTAX, - * PS_SYNTAX, or PS_BAD_KEYWORD is - * returned by fGetKeywordValue or - * fGetParameterSet - */ - -extern char *strsave(char *p); /* defined in this module */ -extern char *strutol(char *p); /* defined in this module */ - -int fGetParameterSet(FILE *fp, parmtable parm[], int parmcount); -int fGetKeywordValue(FILE *fp, char *keyword, int klen, char *value, int vlen); -int fGetToken(FILE *fp, char *dest, int maxlen); - -#endif /* KPARSE_DEFS */ diff --git a/eBones/include/krb.h b/eBones/include/krb.h deleted file mode 100644 index c356f92..0000000 --- a/eBones/include/krb.h +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Include file for the Kerberos library. - * - * from: krb.h,v 4.26 89/08/08 17:55:25 jtkohl Exp $ - * $Id: krb.h,v 1.11 1997/02/22 14:36:42 peter Exp $ - */ - -/* Only one time, please */ -#ifndef KRB_DEFS -#define KRB_DEFS - -/* Need some defs from des.h */ -#include <stdio.h> -#include <sys/types.h> -#include <des.h> -#include <netinet/in.h> - -/* Text describing error codes */ -#define MAX_KRB_ERRORS 256 -extern char *krb_err_txt[MAX_KRB_ERRORS]; - -/* These are not defined for at least SunOS 3.3 and Ultrix 2.2 */ -#if defined(ULTRIX022) || (defined(SunOS) && SunOS < 40) -#define FD_ZERO(p) ((p)->fds_bits[0] = 0) -#define FD_SET(n, p) ((p)->fds_bits[0] |= (1 << (n))) -#define FD_ISSET(n, p) ((p)->fds_bits[0] & (1 << (n))) -#endif /* ULTRIX022 || SunOS */ - -/* General definitions */ -#define KSUCCESS 0 -#define KFAILURE 255 - -#ifdef NO_UIDGID_T -typedef unsigned short uid_t; -typedef unsigned short gid_t; -#endif /* NO_UIDGID_T */ - -/* - * Kerberos specific definitions - * - * KRBLOG is the log file for the kerberos master server. KRB_CONF is - * the configuration file where different host machines running master - * and slave servers can be found. KRB_MASTER is the name of the - * machine with the master database. The admin_server runs on this - * machine, and all changes to the db (as opposed to read-only - * requests, which can go to slaves) must go to it. KRB_HOST is the - * default machine * when looking for a kerberos slave server. Other - * possibilities are * in the KRB_CONF file. KRB_REALM is the name of - * the realm. - */ - -#ifdef notdef -this is server - only, does not belong here; -#define KRBLOG "/etc/kerberosIV/kerberos.log" -are these used anyplace '?'; -#define VX_KRB_HSTFILE "/etc/krbhst" -#define PC_KRB_HSTFILE "\\kerberos\\krbhst" -#endif - -#define KRB_CONF "/etc/kerberosIV/krb.conf" -#define KRB_RLM_TRANS "/etc/kerberosIV/krb.realms" -#define KRB_MASTER "kerberos" -#define KRB_HOST KRB_MASTER -#define KRB_REALM "ATHENA.MIT.EDU" - -/* The maximum sizes for aname, realm, sname, and instance +1 */ -#define ANAME_SZ 40 -#define REALM_SZ 40 -#define SNAME_SZ 40 -#define INST_SZ 40 -/* include space for '.' and '@' */ -#define MAX_K_NAME_SZ (ANAME_SZ + INST_SZ + REALM_SZ + 2) -#define KKEY_SZ 100 -#define VERSION_SZ 1 -#define MSG_TYPE_SZ 1 -#define DATE_SZ 26 /* RTI date output */ - -#define MAX_HSTNM 100 - -#ifndef DEFAULT_TKT_LIFE /* allow compile-time override */ -#define DEFAULT_TKT_LIFE 96 /* default lifetime for krb_mk_req - & co., 8 hrs */ -#endif - -/* Definition of text structure used to pass text around */ -#define MAX_KTXT_LEN 1250 - -struct ktext { - int length; /* Length of the text */ - unsigned char dat[MAX_KTXT_LEN]; /* The data itself */ - unsigned long mbz; /* zero to catch runaway strings */ -}; - -typedef struct ktext *KTEXT; -typedef struct ktext KTEXT_ST; - - -/* Definitions for send_to_kdc */ -#define CLIENT_KRB_TIMEOUT 4 /* time between retries */ -#define CLIENT_KRB_RETRY 5 /* retry this many times */ -#define CLIENT_KRB_BUFLEN 512 /* max unfragmented packet */ - -/* Definitions for ticket file utilities */ -#define R_TKT_FIL 0 -#define W_TKT_FIL 1 - -/* Definitions for cl_get_tgt */ -#ifdef PC -#define CL_GTGT_INIT_FILE "\\kerberos\\k_in_tkts" -#else -#define CL_GTGT_INIT_FILE "/etc/k_in_tkts" -#endif PC - -/* Parameters for rd_ap_req */ -/* Maximum alloable clock skew in seconds */ -#define CLOCK_SKEW 5*60 -/* Filename for readservkey */ -#define KEYFILE "/etc/kerberosIV/srvtab" - -/* Structure definition for rd_ap_req */ - -struct auth_dat { - unsigned char k_flags; /* Flags from ticket */ - char pname[ANAME_SZ]; /* Principal's name */ - char pinst[INST_SZ]; /* His Instance */ - char prealm[REALM_SZ]; /* His Realm */ - unsigned long checksum; /* Data checksum (opt) */ - C_Block session; /* Session Key */ - int life; /* Life of ticket */ - unsigned long time_sec; /* Time ticket issued */ - unsigned long address; /* Address in ticket */ - KTEXT_ST reply; /* Auth reply (opt) */ -}; - -typedef struct auth_dat AUTH_DAT; - -/* Structure definition for credentials returned by get_cred */ - -struct credentials { - char service[ANAME_SZ]; /* Service name */ - char instance[INST_SZ]; /* Instance */ - char realm[REALM_SZ]; /* Auth domain */ - C_Block session; /* Session key */ - int lifetime; /* Lifetime */ - int kvno; /* Key version number */ - KTEXT_ST ticket_st; /* The ticket itself */ - long issue_date; /* The issue time */ - char pname[ANAME_SZ]; /* Principal's name */ - char pinst[INST_SZ]; /* Principal's instance */ -}; - -typedef struct credentials CREDENTIALS; - -/* Structure definition for rd_private_msg and rd_safe_msg */ - -struct msg_dat { - unsigned char *app_data; /* pointer to appl data */ - unsigned long app_length; /* length of appl data */ - unsigned long hash; /* hash to lookup replay */ - int swap; /* swap bytes? */ - long time_sec; /* msg timestamp seconds */ - unsigned char time_5ms; /* msg timestamp 5ms units */ -}; - -typedef struct msg_dat MSG_DAT; - - -/* Location of ticket file for save_cred and get_cred */ -#ifdef PC -#define TKT_FILE "\\kerberos\\ticket.ses" -#else -#define TKT_FILE tkt_string() -#define TKT_ROOT "/tmp/tkt" -#endif PC - -/* Error codes returned from the KDC */ -#define KDC_OK 0 /* Request OK */ -#define KDC_NAME_EXP 1 /* Principal expired */ -#define KDC_SERVICE_EXP 2 /* Service expired */ -#define KDC_AUTH_EXP 3 /* Auth expired */ -#define KDC_PKT_VER 4 /* Protocol version unknown */ -#define KDC_P_MKEY_VER 5 /* Wrong master key version */ -#define KDC_S_MKEY_VER 6 /* Wrong master key version */ -#define KDC_BYTE_ORDER 7 /* Byte order unknown */ -#define KDC_PR_UNKNOWN 8 /* Principal unknown */ -#define KDC_PR_N_UNIQUE 9 /* Principal not unique */ -#define KDC_NULL_KEY 10 /* Principal has null key */ -#define KDC_GEN_ERR 20 /* Generic error from KDC */ - - -/* Values returned by get_credentials */ -#define GC_OK 0 /* Retrieve OK */ -#define RET_OK 0 /* Retrieve OK */ -#define GC_TKFIL 21 /* Can't read ticket file */ -#define RET_TKFIL 21 /* Can't read ticket file */ -#define GC_NOTKT 22 /* Can't find ticket or TGT */ -#define RET_NOTKT 22 /* Can't find ticket or TGT */ - - -/* Values returned by mk_ap_req */ -#define MK_AP_OK 0 /* Success */ -#define MK_AP_TGTEXP 26 /* TGT Expired */ - -/* Values returned by rd_ap_req */ -#define RD_AP_OK 0 /* Request authentic */ -#define RD_AP_UNDEC 31 /* Can't decode authenticator */ -#define RD_AP_EXP 32 /* Ticket expired */ -#define RD_AP_NYV 33 /* Ticket not yet valid */ -#define RD_AP_REPEAT 34 /* Repeated request */ -#define RD_AP_NOT_US 35 /* The ticket isn't for us */ -#define RD_AP_INCON 36 /* Request is inconsistent */ -#define RD_AP_TIME 37 /* delta_t too big */ -#define RD_AP_BADD 38 /* Incorrect net address */ -#define RD_AP_VERSION 39 /* protocol version mismatch */ -#define RD_AP_MSG_TYPE 40 /* invalid msg type */ -#define RD_AP_MODIFIED 41 /* message stream modified */ -#define RD_AP_ORDER 42 /* message out of order */ -#define RD_AP_UNAUTHOR 43 /* unauthorized request */ - -/* Values returned by get_pw_tkt */ -#define GT_PW_OK 0 /* Got password changing tkt */ -#define GT_PW_NULL 51 /* Current PW is null */ -#define GT_PW_BADPW 52 /* Incorrect current password */ -#define GT_PW_PROT 53 /* Protocol Error */ -#define GT_PW_KDCERR 54 /* Error returned by KDC */ -#define GT_PW_NULLTKT 55 /* Null tkt returned by KDC */ - - -/* Values returned by send_to_kdc */ -#define SKDC_OK 0 /* Response received */ -#define SKDC_RETRY 56 /* Retry count exceeded */ -#define SKDC_CANT 57 /* Can't send request */ - -/* - * Values returned by get_intkt - * (can also return SKDC_* and KDC errors) - */ - -#define INTK_OK 0 /* Ticket obtained */ -#define INTK_W_NOTALL 61 /* Not ALL tickets returned */ -#define INTK_BADPW 62 /* Incorrect password */ -#define INTK_PROT 63 /* Protocol Error */ -#define INTK_ERR 70 /* Other error */ - -/* Values returned by get_adtkt */ -#define AD_OK 0 /* Ticket Obtained */ -#define AD_NOTGT 71 /* Don't have tgt */ - -/* Error codes returned by ticket file utilities */ -#define NO_TKT_FIL 76 /* No ticket file found */ -#define TKT_FIL_ACC 77 /* Couldn't access tkt file */ -#define TKT_FIL_LCK 78 /* Couldn't lock ticket file */ -#define TKT_FIL_FMT 79 /* Bad ticket file format */ -#define TKT_FIL_INI 80 /* tf_init not called first */ - -/* Error code returned by kparse_name */ -#define KNAME_FMT 81 /* Bad Kerberos name format */ - -/* Error codes returned by get_local_addr and bind_local_addr */ -#define GT_LADDR_NOSOCK 82 /* Can't open socket */ -#define GT_LADDR_IFLIST 83 /* - * Can't retrieve local interface - * configuration list - */ -#define GT_LADDR_NVI 84 /* No valid local interface found */ -#define BND_LADDR_BIND 85 /* Can't bind local address */ - -/* Error code returned by krb_mk_safe */ -#define SAFE_PRIV_ERROR -1 /* syscall error */ - -/* - * macros for byte swapping; also scratch space - * u_quad 0-->7, 1-->6, 2-->5, 3-->4, 4-->3, 5-->2, 6-->1, 7-->0 - * u_long 0-->3, 1-->2, 2-->1, 3-->0 - * u_short 0-->1, 1-->0 - */ - -#define swap_u_16(x) {\ - unsigned long _krb_swap_tmp[4];\ - swab(((char *) x) +0, ((char *) _krb_swap_tmp) +14 ,2); \ - swab(((char *) x) +2, ((char *) _krb_swap_tmp) +12 ,2); \ - swab(((char *) x) +4, ((char *) _krb_swap_tmp) +10 ,2); \ - swab(((char *) x) +6, ((char *) _krb_swap_tmp) +8 ,2); \ - swab(((char *) x) +8, ((char *) _krb_swap_tmp) +6 ,2); \ - swab(((char *) x) +10,((char *) _krb_swap_tmp) +4 ,2); \ - swab(((char *) x) +12,((char *) _krb_swap_tmp) +2 ,2); \ - swab(((char *) x) +14,((char *) _krb_swap_tmp) +0 ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,16);\ - } - -#define swap_u_12(x) {\ - unsigned long _krb_swap_tmp[4];\ - swab(( char *) x, ((char *) _krb_swap_tmp) +10 ,2); \ - swab(((char *) x) +2, ((char *) _krb_swap_tmp) +8 ,2); \ - swab(((char *) x) +4, ((char *) _krb_swap_tmp) +6 ,2); \ - swab(((char *) x) +6, ((char *) _krb_swap_tmp) +4 ,2); \ - swab(((char *) x) +8, ((char *) _krb_swap_tmp) +2 ,2); \ - swab(((char *) x) +10,((char *) _krb_swap_tmp) +0 ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,12);\ - } - -#define swap_C_Block(x) {\ - unsigned long _krb_swap_tmp[4];\ - swab(( char *) x, ((char *) _krb_swap_tmp) +6 ,2); \ - swab(((char *) x) +2,((char *) _krb_swap_tmp) +4 ,2); \ - swab(((char *) x) +4,((char *) _krb_swap_tmp) +2 ,2); \ - swab(((char *) x) +6,((char *) _krb_swap_tmp) ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)x,8);\ - } -#define swap_u_quad(x) {\ - unsigned long _krb_swap_tmp[4];\ - swab(( char *) &x, ((char *) _krb_swap_tmp) +6 ,2); \ - swab(((char *) &x) +2,((char *) _krb_swap_tmp) +4 ,2); \ - swab(((char *) &x) +4,((char *) _krb_swap_tmp) +2 ,2); \ - swab(((char *) &x) +6,((char *) _krb_swap_tmp) ,2); \ - bcopy((char *)_krb_swap_tmp,(char *)&x,8);\ - } - -#define swap_u_long(x) {\ - unsigned long _krb_swap_tmp[4];\ - swab((char *) &x, ((char *) _krb_swap_tmp) +2 ,2); \ - swab(((char *) &x) +2,((char *) _krb_swap_tmp),2); \ - x = _krb_swap_tmp[0]; \ - } - -#define swap_u_short(x) {\ - unsigned short _krb_swap_sh_tmp; \ - swab((char *) &x, ( &_krb_swap_sh_tmp) ,2); \ - x = (unsigned short) _krb_swap_sh_tmp; \ - } - -/* Kerberos ticket flag field bit definitions */ -#define K_FLAG_ORDER 0 /* bit 0 --> lsb */ -#define K_FLAG_1 /* reserved */ -#define K_FLAG_2 /* reserved */ -#define K_FLAG_3 /* reserved */ -#define K_FLAG_4 /* reserved */ -#define K_FLAG_5 /* reserved */ -#define K_FLAG_6 /* reserved */ -#define K_FLAG_7 /* reserved, bit 7 --> msb */ - -#ifndef PC -char *tkt_string(); -#endif PC - -#ifdef OLDNAMES -#define krb_mk_req mk_ap_req -#define krb_rd_req rd_ap_req -#define krb_kntoln an_to_ln -#define krb_set_key set_serv_key -#define krb_get_cred get_credentials -#define krb_mk_priv mk_private_msg -#define krb_rd_priv rd_private_msg -#define krb_mk_safe mk_safe_msg -#define krb_rd_safe rd_safe_msg -#define krb_mk_err mk_appl_err_msg -#define krb_rd_err rd_appl_err_msg -#define krb_ck_repl check_replay -#define krb_get_pw_in_tkt get_in_tkt -#define krb_get_svc_in_tkt get_svc_in_tkt -#define krb_get_pw_tkt get_pw_tkt -#define krb_realmofhost krb_getrealm -#define krb_get_phost get_phost -#define krb_get_krbhst get_krbhst -#define krb_get_lrealm get_krbrlm -#endif OLDNAMES - -/* Defines for krb_sendauth and krb_recvauth */ - -#define KOPT_DONT_MK_REQ 0x00000001 /* don't call krb_mk_req */ -#define KOPT_DO_MUTUAL 0x00000002 /* do mutual auth */ - -#define KOPT_DONT_CANON 0x00000004 /* - * don't canonicalize inst as - * a hostname - */ - -#define KRB_SENDAUTH_VLEN 8 /* length for version strings */ - -#ifdef ATHENA_COMPAT -#define KOPT_DO_OLDSTYLE 0x00000008 /* use the old-style protocol */ -#endif ATHENA_COMPAT - -/* libacl */ -void acl_canonicalize_principal __P((char *principal, char *buf)); -int acl_check __P((char *acl, char *principal)); -int acl_exact_match __P((char *acl, char *principal)); -int acl_add __P((char *acl, char *principal)); -int acl_delete __P((char *acl, char *principal)); -int acl_initialize __P((char *acl_file, int mode)); - -/* libkrb - krb.3 */ -int krb_mk_req __P((KTEXT authent, char *service, char *instance, char *realm, - long checksum); -int krb_rd_req __P((KTEXT authent, char *service, char *instance, - long from_addr, AUTH_DAT *ad, char *fn)); -int krb_kntoln __P((AUTH_DAT *ad, char *lname)); -int krb_set_key __P((char *key, int cvt)); -int krb_get_cred __P((char *service, char *instance, char *realm, - CREDENTIALS *c)); -long krb_mk_priv __P((u_char *in, u_char *out, u_long in_length, - des_key_schedule schedule, des_cblock key, struct sockaddr_in *sender, - struct sockaddr_in *receiver)); -long krb_rd_priv __P((u_char *in, u_long in_length, Key_schedule schedule, - des_cblock key, struct sockaddr_in *sender, struct sockaddr_in *receiver, - MSG_DAT *msg_data)); -long krb_mk_safe __P((u_char *in, u_char *out, u_long in_length, - des_cblock *key, struct sockaddr_in *sender, struct sockaddr_in *receiver)); -long krb_rd_safe __P((u_char *in, u_long length, des_cblock *key, - struct sockaddr_in *sender, struct sockaddr_in *receiver, - MSG_DAT *msg_data)); -long krb_mk_err __P((u_char *out, long code, char *string)); -int krb_rd_err __P((u_char *in, u_long in_length, long *code, MSG_DAT *m_data)); - -/* libkrb - krb_sendauth.3 */ -int krb_sendauth __P((long options, int fd, KTEXT ticket, char *service, - char *inst, char *realm, u_long checksum, MSG_DAT *msg_data, - CREDENTIALS *cred, Key_schedule schedule, struct sockaddr_in *laddr, - struct sockaddr_in *faddr, char *version)); -int krb_recvauth __P((long options, int fd, KTEXT ticket, char *service, - char *instance, struct sockaddr_in *faddr, struct sockaddr_in *laddr, - AUTH_DAT *kdata, char *filename, Key_schedule schedule, char *version)); -int krb_net_write __P((int fd, char *buf, int len)); -int krb_net_read __P((int fd, char *buf, int len)); - -/* libkrb - krb_realmofhost.3 */ -char *krb_realmofhost __P((char *host)); -char *krb_get_phost __P((char *alias)); -int krb_get_krbhst __P((char *h, char *r, int n)); -int krb_get_admhst __P((char *h, char *r, int n)); -int krb_get_lrealm __P((char *r, int n)); - -/* libkrb - krb_set_tkt_string.3 */ -void krb_set_tkt_string(char *val); - -/* libkrb - kuserok.3 */ -int kuserok __P((AUTH_DAT *authdata, char *localuser)); - -/* libkrb - tf_util.3 */ -int tf_init __P((char *tf_name, int rw)); -int tf_get_pname __P((char *p)); -int tf_get_pinst __P((char *inst)); -int tf_get_cred __P((CREDENTIALS *c)); -void tf_close __P((void)); - -/* Internal routines */ -int des_set_key_krb __P((des_cblock *inkey, des_key_schedule insched)); -void des_clear_key_krb __P((void)); -int des_read __P((int fd, char *buf, int len)); -int des_write __P((int fd, char *buf, int len)); -int krb_get_tf_realm __P((char *ticket_file, char *realm)); -int krb_get_in_tkt __P((char *user, char *instance, char *realm, char *service, - char *sinstance, int life, int (*key_proc)(), int (*decrypt_proc)(), - char *arg)); -int krb_get_pw_in_tkt __P((char *user, char *instance, char *realm, - char *service, char *sinstance, int life, char *password)); -int krb_get_svc_in_tkt __P((char *user, char *instance, char *realm, - char *service, char *sinstance, int life, char *srvtab)); -int krb_get_tf_fullname __P((char *ticket_file, char *name, char *instance, - char *realm)); -int save_credentials __P((char *service, char *instance, char *realm, - des_cblock session, int lifetime, int kvno, KTEXT ticket, long issue_date)); -int read_service_key __P((char *service, char *instance, char *realm, int kvno, - char *file, char *key)); -int get_ad_tkt __P((char *service, char *sinstance, char *realm, int lifetime)); -int send_to_kdc __P((KTEXT pkt, KTEXT rpkt, char *realm)); -int krb_bind_local_addr __P((int s)); -int krb_get_local_addr __P((struct sockaddr_in *returned_addr)); -int krb_create_ticket __P((KTEXT tkt, unsigned char flags, char *pname, - char *pinstance, char *prealm, long paddress, char *session, short life, - long time_sec, char *sname, char *sinstance, C_Block key)); -int decomp_ticket __P((KTEXT tkt, unsigned char *flags, char *pname, - char *pinstance, char *prealm, unsigned long *paddress, des_cblock session, - int *life, unsigned long *time_sec, char *sname, char *sinstance, - des_cblock key, des_key_schedule key_s)); -int create_ciph __P((KTEXT c, C_Block session, char *service, char *instance, - char *realm, unsigned long life, int kvno, KTEXT tkt, - unsigned long kdc_time, C_Block key)); -int kname_parse __P((char *np, char *ip, char *rp, char *fullname)); -int tf_save_cred __P((char *service, char *instance, char *realm, - des_cblock session, int lifetime, int kvno, KTEXT ticket, long issue_date)); -int getst(int fd, char *s, int n)); -int pkt_clen __P((KTEXT pkt)); -int in_tkt __P((char *pname, char *pinst)); -int dest_tkt __P((void)); -char *month_sname __P((int n)); -void log __P(()); /* Actually VARARGS - markm */ -void kset_logfile __P((char *filename)); -void set_logfile __P((char *filename)); -int k_isinst __P((char *s)); -int k_isrealm __P((char *s)); -int k_isname __P((char *s)); -int k_gethostname __P((char *name, int namelen)); -int kerb_init __P((void)); -void kerb_fini __P((void)); -int kerb_db_set_name __P((char *name)); -int kerb_db_set_lockmode __P((int mode)); -int kerb_db_create __P((char *db_name)); -int kerb_db_iterate __P((int (*func)(), char *arg)); -int kerb_db_rename __P((char *from, char *to)); -long kerb_get_db_age __P((void)); -char * stime __P((long *t)); - -long kdb_get_master_key __P((int prompt, C_Block master_key, - Key_schedule master_key_sched)); -long kdb_verify_master_key __P((C_Block master_key, - Key_schedule master_key_sched, FILE *out)); -void kdb_encrypt_key __P((C_Block in, C_Block out, C_Block master_key, - Key_schedule master_key_sched, int e_d_flag)); - -extern int krb_ap_req_debug; -extern int krb_debug; - -#endif KRB_DEFS diff --git a/eBones/include/krb_conf.h b/eBones/include/krb_conf.h deleted file mode 100644 index 0ae23e1..0000000 --- a/eBones/include/krb_conf.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * This file contains configuration information for the Kerberos library - * which is machine specific; currently, this file contains - * configuration information for the vax, the "ibm032" (RT), and the - * "PC8086" (IBM PC). - * - * Note: cross-compiled targets must appear BEFORE their corresponding - * cross-compiler host. Otherwise, both will be defined when running - * the native compiler on the programs that construct cross-compiled - * sources. - * - * from: krb_conf.h,v 4.0 89/01/23 09:59:27 jtkohl Exp $ - * $Id$ - */ - -#ifndef KRB_CONF_DEFS -#define KRB_CONF_DEFS - -/* Byte ordering */ -extern int krbONE; -#define HOST_BYTE_ORDER (* (char *) &krbONE) -#define MSB_FIRST 0 /* 68000, IBM RT/PC */ -#define LSB_FIRST 1 /* Vax, PC8086 */ - -#endif KRB_CONF_DEFS diff --git a/eBones/include/krb_db.h b/eBones/include/krb_db.h deleted file mode 100644 index 84da43d..0000000 --- a/eBones/include/krb_db.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * spm Project Athena 8/85 - * - * This file defines data structures for the kerberos - * authentication/authorization database. - * - * They MUST correspond to those defined in *.rel - * - * from: krb_db.h,v 4.9 89/01/24 17:55:39 jon Exp $ - * $Id$ - */ - -#ifndef KRB_DB_DEFS -#define KRB_DB_DEFS - -#define KERB_M_NAME "K" /* Kerberos */ -#define KERB_M_INST "M" /* Master */ -#define KERB_DEFAULT_NAME "default" -#define KERB_DEFAULT_INST "" -#define DBM_FILE "/etc/kerberosIV/principal" - -/* this also defines the number of queue headers */ -#define KERB_DB_HASH_MODULO 64 - - -/* Arguments to kerb_dbl_lock() */ - -#define KERB_DBL_EXCLUSIVE 1 -#define KERB_DBL_SHARED 0 - -/* arguments to kerb_db_set_lockmode() */ - -#define KERB_DBL_BLOCKING 0 -#define KERB_DBL_NONBLOCKING 1 - -/* Principal defines the structure of a principal's name */ - -typedef struct { - char name[ANAME_SZ]; - char instance[INST_SZ]; - - unsigned long key_low; - unsigned long key_high; - unsigned long exp_date; - char exp_date_txt[DATE_SZ]; - unsigned long mod_date; - char mod_date_txt[DATE_SZ]; - unsigned short attributes; - unsigned char max_life; - unsigned char kdc_key_ver; - unsigned char key_version; - - char mod_name[ANAME_SZ]; - char mod_instance[INST_SZ]; - char *old; /* cast to (Principal *); not in db, - * ptr to old vals */ -} - Principal; - -typedef struct { - long cpu; - long elapsed; - long dio; - long pfault; - long t_stamp; - long n_retrieve; - long n_replace; - long n_append; - long n_get_stat; - long n_put_stat; -} - DB_stat; - -/* Dba defines the structure of a database administrator */ - -typedef struct { - char name[ANAME_SZ]; - char instance[INST_SZ]; - unsigned short attributes; - unsigned long exp_date; - char exp_date_txt[DATE_SZ]; - char *old; /* - * cast to (Dba *); not in db, ptr to - * old vals - */ -} - Dba; - -extern int kerb_get_principal(char *name, char *inst, Principal *principal, - unsigned int max, int *more); -extern int kerb_put_principal(Principal *principal, unsigned int n); -extern void kerb_db_get_stat(DB_stat *s); -extern void kerb_db_put_stat(DB_stat *s); -extern int kerb_get_dba(char *name, char *inst, Dba *dba, unsigned int max, - int *more); -extern int kerb_db_get_dba(char *dba_name, char *dba_inst, Dba *dba, - unsigned int max, int *more); - -extern void krb_print_principal(Principal *p); -extern int kerb_db_get_principal(char *name, char *inst, Principal *principal, - unsigned int max, int *more); -extern int kerb_db_put_principal(Principal *principal, unsigned int max); -extern int kerb_db_init(void); -extern void kerb_db_fini(void); - -#endif /* KRB_DB_DEFS */ diff --git a/eBones/include/lsb_addr_comp.h b/eBones/include/lsb_addr_comp.h deleted file mode 100644 index 63e0923..0000000 --- a/eBones/include/lsb_addr_comp.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Comparison macros to emulate LSBFIRST comparison results of network - * byte-order quantities - * - * from: lsb_addr_comp.h,v 4.0 89/01/23 15:44:46 jtkohl Exp $ - * $Id$ - */ - -#ifndef LSB_ADDR_COMP_DEFS -#define LSB_ADDR_COMP_DEFS - -#include "osconf.h" - -#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 */ diff --git a/eBones/include/osconf.h b/eBones/include/osconf.h deleted file mode 100644 index 23bc76d..0000000 --- a/eBones/include/osconf.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Athena configuration. - * - * from: osconf.h,v 4.4 89/12/19 13:26:27 jtkohl Exp $ - * $Id$ - */ - -#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" -#endif /* pyr */ -#endif /* sun */ -#endif /* apollo */ -#endif /* ibm032 */ -#endif /* mips */ -#endif /* vax */ -#endif /* tahoe */ - -#if defined(__FreeBSD__) && defined(i386) -#include "conf-bsd386i.h" -#endif - diff --git a/eBones/include/passwd_server.h b/eBones/include/passwd_server.h deleted file mode 100644 index 155a172..0000000 --- a/eBones/include/passwd_server.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Include file for password server - * - * from: passwd_server.h,v 4.6 89/01/11 15:12:22 steiner Exp $ - * $Id$ - */ - -#ifndef PASSWD_SERVER_DEFS -#define PASSWD_SERVER_DEFS - -#define PW_SRV_VERSION 2 /* version number */ -#define RETRY_LIMIT 1 -#define TIME_OUT 30 -#define USER_TIMEOUT 90 -#define MAX_KPW_LEN 40 /* hey, seems like a good number */ - -#define INSTALL_NEW_PW (1<<0) /* - * ver, cmd, name, password, old_pass, - * crypt_pass, uid - */ - -#define INSTALL_REPLY (1<<1) /* ver, cmd, name, password */ - -#endif /* PASSWD_SERVER_DEFS */ diff --git a/eBones/include/principal.h b/eBones/include/principal.h deleted file mode 100644 index 7cac525..0000000 --- a/eBones/include/principal.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 1988 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Definitions for principal names. - * - * from: principal.h,v 4.5 89/01/11 15:15:01 steiner Exp $ - * $Id$ - */ - -#ifndef PRINCIPAL_DEFS -#define PRINCIPAL_DEFS - -#define NAME_LEN 39 -#define INSTANCE_LEN 39 - -#endif /* PRINCIPAL_DEFS */ diff --git a/eBones/include/prot.h b/eBones/include/prot.h deleted file mode 100644 index e9c41cf..0000000 --- a/eBones/include/prot.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute - * of Technology. - * For copying and distribution information, please see the file - * <Copyright.MIT>. - * - * Include file with authentication protocol information. - * - * from: prot.h,v 4.13 89/01/24 14:27:22 jtkohl Exp $ - * $Id$ - */ - -#include <krb_conf.h> - -#ifndef PROT_DEFS -#define PROT_DEFS - -#define KRB_PORT 750 /* PC's don't have - * /etc/services */ -#define KRB_PROT_VERSION 4 -#define MAX_PKT_LEN 1000 -#define MAX_TXT_LEN 1000 -#define TICKET_GRANTING_TICKET "krbtgt" - -/* Macro's to obtain various fields from a packet */ - -#define pkt_version(packet) (unsigned int) *(packet->dat) -#define pkt_msg_type(packet) (unsigned int) *(packet->dat+1) -#define pkt_a_name(packet) (packet->dat+2) -#define pkt_a_inst(packet) \ - (packet->dat+3+strlen((char *)pkt_a_name(packet))) -#define pkt_a_realm(packet) \ - (pkt_a_inst(packet)+1+strlen((char *)pkt_a_inst(packet))) - -/* Macro to obtain realm from application request */ -#define apreq_realm(auth) (auth->dat + 3) - -#define pkt_time_ws(packet) (char *) \ - (packet->dat+5+strlen((char *)pkt_a_name(packet)) + \ - strlen((char *)pkt_a_inst(packet)) + \ - strlen((char *)pkt_a_realm(packet))) - -#define pkt_no_req(packet) (unsigned short) \ - *(packet->dat+9+strlen((char *)pkt_a_name(packet)) + \ - strlen((char *)pkt_a_inst(packet)) + \ - strlen((char *)pkt_a_realm(packet))) -#define pkt_x_date(packet) (char *) \ - (packet->dat+10+strlen((char *)pkt_a_name(packet)) + \ - strlen((char *)pkt_a_inst(packet)) + \ - strlen((char *)pkt_a_realm(packet))) -#define pkt_err_code(packet) ( (char *) \ - (packet->dat+9+strlen((char *)pkt_a_name(packet)) + \ - strlen((char *)pkt_a_inst(packet)) + \ - strlen((char *)pkt_a_realm(packet)))) -#define pkt_err_text(packet) \ - (packet->dat+13+strlen((char *)pkt_a_name(packet)) + \ - strlen((char *)pkt_a_inst(packet)) + \ - strlen((char *)pkt_a_realm(packet))) - -/* Routines to create and read packets may be found in prot.c */ - -KTEXT create_auth_reply(); -KTEXT create_death_packet(); -KTEXT pkt_cipher(); - -/* Message types , always leave lsb for byte order */ - -#define AUTH_MSG_KDC_REQUEST 1<<1 -#define AUTH_MSG_KDC_REPLY 2<<1 -#define AUTH_MSG_APPL_REQUEST 3<<1 -#define AUTH_MSG_APPL_REQUEST_MUTUAL 4<<1 -#define AUTH_MSG_ERR_REPLY 5<<1 -#define AUTH_MSG_PRIVATE 6<<1 -#define AUTH_MSG_SAFE 7<<1 -#define AUTH_MSG_APPL_ERR 8<<1 -#define AUTH_MSG_DIE 63<<1 - -/* values for kerb error codes */ - -#define KERB_ERR_OK 0 -#define KERB_ERR_NAME_EXP 1 -#define KERB_ERR_SERVICE_EXP 2 -#define KERB_ERR_AUTH_EXP 3 -#define KERB_ERR_PKT_VER 4 -#define KERB_ERR_NAME_MAST_KEY_VER 5 -#define KERB_ERR_SERV_MAST_KEY_VER 6 -#define KERB_ERR_BYTE_ORDER 7 -#define KERB_ERR_PRINCIPAL_UNKNOWN 8 -#define KERB_ERR_PRINCIPAL_NOT_UNIQUE 9 -#define KERB_ERR_NULL_KEY 10 - -#endif /* PROT_DEFS */ diff --git a/eBones/include/rkinit.h b/eBones/include/rkinit.h deleted file mode 100644 index faf1435..0000000 --- a/eBones/include/rkinit.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id$ - * $Source: /home/ncvs/src/eBones/include/rkinit.h,v $ - * $Author: jkh $ - * - * Main header file for rkinit library users - */ - -#ifndef __RKINIT_H__ -#define __RKINIT_H__ - -#if !defined(lint) && !defined(SABER) && !defined(LOCORE) && defined(RCS_HDRS) -static char *rcsid_rkinit_h = "$Id$"; -#endif /* lint || SABER || LOCORE || RCS_HDRS */ - -#include <krb.h> -#include <sys/param.h> - -#ifdef __STDC__ -#define RK_PROTO(x) x -#else -#define RK_PROTO(x) () -#endif /* __STDC__ */ - -typedef struct { - char aname[ANAME_SZ + 1]; - char inst[INST_SZ + 1]; - char realm[REALM_SZ + 1]; - char sname[ANAME_SZ + 1]; - char sinst[INST_SZ + 1]; - char username[9]; /* max local name length + 1 */ - char tktfilename[MAXPATHLEN + 1]; - u_int lifetime; -} rkinit_info; - -#define RKINIT_SUCCESS 0 - -/* Function declarations */ -extern int rkinit RK_PROTO((char *, char *, rkinit_info *, int)); -extern char *rkinit_errmsg RK_PROTO((char *)); - -#endif /* __RKINIT_H__ */ diff --git a/eBones/include/rkinit_private.h b/eBones/include/rkinit_private.h deleted file mode 100644 index ec02509..0000000 --- a/eBones/include/rkinit_private.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * $Id$ - * - * Header file for rkinit library and server internal use - */ - -#ifndef __RKINIT_PRIVATE_H__ -#define __RKINIT_PRIVATE_H__ - -#include <sys/types.h> -#include <netinet/in.h> - -#ifdef __STDC__ -#define RK_PROTO(x) x -#else -#define RK_PROTO(x) () -#define const -#endif /* __STDC__ */ - -/* Lowest and highest versions supported */ -#define RKINIT_LVERSION 3 -#define RKINIT_HVERSION 3 - -/* Service to be used; port number to fall back on if service isn't found */ -#define SERVENT "rkinit" -#define PORT 2108 - -/* Key for kerberos authentication */ -#define KEY "rcmd" - -/* Packet format information */ -#define PKT_TYPE 0 -#define PKT_LEN 1 -#define PKT_DATA (PKT_LEN + sizeof(u_int32_t)) - -/* Number of retries during message reads */ -#define RETRIES 15 - -/* - * Message types for packets. Make sure that rki_mt_to_string is right in - * rk_util.c - */ -#define MT_STATUS 0 -#define MT_CVERSION 1 -#define MT_SVERSION 2 -#define MT_RKINIT_INFO 3 -#define MT_SKDC 4 -#define MT_CKDC 5 -#define MT_AUTH 6 -#define MT_DROP 7 - -/* Miscellaneous protocol constants */ -#define VERSION_INFO_SIZE 2 - -/* Useful definitions */ -#define BCLEAR(a) bzero((char *)(a), sizeof(a)) -#define SBCLEAR(a) bzero((char *)&(a), sizeof(a)) -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#define max(a,b) (((a) > (b)) ? (a) : (b)) - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifdef _JBLEN -#define SETJMP_TYPEDEFED -#endif - -/* Function declarations */ -int rki_key_proc RK_PROTO((char *, char *, char *, char *, des_cblock *)); -int rki_get_tickets RK_PROTO((int, char *, char *, rkinit_info *)); -int rki_send_packet RK_PROTO((int, char, u_int32_t, const char *)); -int rki_get_packet RK_PROTO((int, u_char, u_int32_t *, char *)); -int rki_setup_rpc RK_PROTO((char *)); -int rki_rpc_exchange_version_info RK_PROTO((int, int, int *, int *)); -int rki_rpc_send_rkinit_info RK_PROTO((rkinit_info *)); -int rki_rpc_get_status RK_PROTO((void)); -int rki_rpc_get_ktext RK_PROTO((int, KTEXT, u_char)); -int rki_rpc_sendauth RK_PROTO((KTEXT)); -int rki_rpc_get_skdc RK_PROTO((KTEXT)); -int rki_rpc_send_ckdc RK_PROTO((MSG_DAT *)); -int rki_get_csaddr RK_PROTO((struct sockaddr_in *, struct sockaddr_in *)); -void rki_drop_server RK_PROTO((void)); -void rki_cleanup_rpc RK_PROTO((void)); -void rki_dmsg RK_PROTO((char *)); -const char *rki_mt_to_string RK_PROTO((int)); -int rki_choose_version RK_PROTO((int *)); -int rki_send_rkinit_info RK_PROTO((int, rkinit_info *)); -#ifdef SETJMP_TYPEDEFED -void (*rki_setup_timer RK_PROTO((jmp_buf env))) RK_PROTO((int)); -#endif -void rki_restore_timer RK_PROTO((void (*old_alrm)(int))); -void rki_cleanup_rpc RK_PROTO((void)); - - -#endif /* __RKINIT_PRIVATE_H__ */ |