From: danw Date: Wed, 29 Jan 1997 23:21:11 +0000 (+0000) Subject: Remove files that shouldn't be in the moira tree: these should already X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/8f124d0466268bfeb307b2414f570b4486b725b8 Remove files that shouldn't be in the moira tree: these should already be installed, and we should use the installed versions. Update remaining include files for 64-bit OSes. --- diff --git a/include/Imakefile b/include/Imakefile index e1a23be7..7f24b6db 100644 --- a/include/Imakefile +++ b/include/Imakefile @@ -8,7 +8,7 @@ # Imakefile for include. # -CODE=Imakefile dcm.h gdb.h mit-copyright.h mit-sipb-copyright.h \ +CODE=Imakefile dcm.h gdb.h mit-copyright.h \ moira.h moira_site.h mr_proto.h update.h ureg_proto.h SRCDIR=$(SRCTOP)/include diff --git a/include/com_err.h b/include/com_err.h deleted file mode 100644 index 8bb79b96..00000000 --- a/include/com_err.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Header file for common error description library. - * - * Copyright 1988, Student Information Processing Board of the - * Massachusetts Institute of Technology. - * - * For copyright and distribution info, see the documentation supplied - * with this package. - */ - -#ifndef __COM_ERR_H - -#ifdef __STDC__ -#ifndef __HIGHC__ /* gives us STDC but not stdarg */ -#include -#else -#include -#endif -/* ANSI C -- use prototypes etc */ -void com_err (const char *, long, const char *, ...); -char const *error_message (long); -void (*com_err_hook) (const char *, long, const char *, va_list); -void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list))) - (const char *, long, const char *, va_list); -void (*reset_com_err_hook ()) (const char *, long, const char *, va_list); -#else -/* no prototypes */ -void com_err (); -char *error_message (); -void (*com_err_hook) (); -void (*set_com_err_hook ()) (); -void (*reset_com_err_hook ()) (); - -#define const -#endif - -#define __COM_ERR_H -#endif /* ! defined(__COM_ERR_H) */ diff --git a/include/dcm.h b/include/dcm.h index a97a2be4..6bce2a3d 100644 --- a/include/dcm.h +++ b/include/dcm.h @@ -16,8 +16,6 @@ #define UMASK 0007 -extern char *malloc(), *calloc(), *realloc(); -extern int errno; extern char *whoami; #define DBG_PLAIN 01 @@ -86,6 +84,7 @@ extern void scream(); extern char *strsave(); extern long file_last_mod_time(); extern long current_time(); +extern char *itoa(); #define file_exists(file) (access((file), F_OK) == 0) /*--> update.c <--*/ diff --git a/include/des.h b/include/des.h deleted file mode 100644 index 74bf2792..00000000 --- a/include/des.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Source$ - * $Author$ - * $Header$ - * - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Include file for the Data Encryption Standard library. - */ - -/* only do the whole thing once */ -#ifndef DES_DEFS -#define DES_DEFS - -#include - -typedef unsigned char des_cblock[8]; /* crypto-block size */ -/* Key schedule */ -typedef struct des_ks_struct { des_cblock _; } des_key_schedule[16]; - -#define DES_KEY_SZ (sizeof(des_cblock)) -#define DES_ENCRYPT 1 -#define DES_DECRYPT 0 - -#ifndef NCOMPAT -#define C_Block des_cblock -#define Key_schedule des_key_schedule -#define ENCRYPT DES_ENCRYPT -#define DECRYPT DES_DECRYPT -#define KEY_SZ DES_KEY_SZ -#define string_to_key des_string_to_key -#define read_pw_string des_read_pw_string -#define random_key des_random_key -#define pcbc_encrypt des_pcbc_encrypt -#define key_sched des_key_sched -#define cbc_encrypt des_cbc_encrypt -#define cbc_cksum des_cbc_cksum -#define C_Block_print des_cblock_print -#define quad_cksum des_quad_cksum -typedef struct des_ks_struct bit_64; -#endif - -#define des_cblock_print(x) des_cblock_print_file(x, stdout) - -#endif DES_DEFS diff --git a/include/gdb.h b/include/gdb.h index 72ce9428..9bd76aa2 100644 --- a/include/gdb.h +++ b/include/gdb.h @@ -54,7 +54,14 @@ typedef long fd_mask; typedef struct fd_set {fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];} fd_set; #endif - +/* 32-bit type for consistency in data sent across the network */ +#ifdef SIXTYFOUR +#define int32 int +#define uint32 u_int +#else +#define int32 long +#define uint32 u_long +#endif /*----------------------------------------------------------* * @@ -207,6 +214,7 @@ union gdb_prop_union { /* integer */ int (*f)(); /* as a function pointer */ char *cp; /* character pointer */ + char *(*cpf)(); /* string function pointer */ }; #define TYPE_PROPERTY_COUNT 8 /* number of properties */ @@ -226,8 +234,8 @@ union gdb_prop_union { #define ALIGNMENT_PROPERTY 1 /* integer */ #define NULL_PROPERTY 2 /* function */ #define CODED_LENGTH_PROPERTY 3 /* function */ -#define ENCODE_PROPERTY 4 /* function */ -#define DECODE_PROPERTY 5 /* function */ +#define ENCODE_PROPERTY 4 /* string function */ +#define DECODE_PROPERTY 5 /* string function */ #define FORMAT_PROPERTY 6 /* function */ #define NAME_PROPERTY 7 /* char pointer */ @@ -295,7 +303,7 @@ struct tupld_var { /* the variable length */ /* included in this length */ }; struct tupl_desc { - long id; /* this should say TPD\0 */ + int32 id; /* this should say TPD\0 */ int ref_count; /* when this goes to zero, */ /* the descriptor may really */ /* be reclaimed */ @@ -338,7 +346,7 @@ struct tuple_dat { /* tuples are linked, as in */ /* a relation. Convention is*/ /* double linked, circular.*/ - long id; /* should say TUP\0 */ + int32 id; /* should say TUP\0 */ TUPLE_DESCRIPTOR desc; /* pointer to the descriptor */ char data[1]; /* data goes here, word */ /* aligned. Should be [] */ @@ -369,7 +377,7 @@ struct rel_dat { /* as the first fields in */ /* both rel_dat and tuple_dat*/ /* a minor non-portability */ - long id; /* should contain REL\0 */ + int32 id; /* should contain REL\0 */ TUPLE_DESCRIPTOR desc; /* descriptor for the tuples */ /* in this relation. Should */ /* == that in each tuple */ @@ -447,7 +455,7 @@ struct half_con_data { /* OPSTATUS. tells whether */ /* transmit/receive is */ /* pending.*/ - long flags; /* bit flags */ + int32 flags; /* bit flags */ #define HCON_PROGRESS 0x00000001 /* used by selection */ /* routines to detect */ /* progress */ @@ -505,7 +513,7 @@ typedef struct half_con_data *HALF_CONNECTION; #define GDB_CON_ID 0x434f4e00 /*"CON"*/ struct con_data { - long id; /* should contain CON\0 */ + int32 id; /* should contain CON\0 */ int status; /* See definitions below. */ /* Do not confuse with */ /* the status sub-fields of */ @@ -605,7 +613,7 @@ extern fd_set last_crfds, last_cwfds, last_cefds;/* these file desc. bit */ struct oper_data { struct oper_data *next, *prev; /* forward and back chain */ - long id; /* should contain OPR\0 */ + int32 id; /* should contain OPR\0 */ int tag; /* unique identifier for */ /* this operation */ int status; /* current state of this */ @@ -927,7 +935,7 @@ extern int gdb_socklen; /* length of above */ #define GDB_DB_ID 0x44420000 /* eye catcher */ struct db_struct { - long id; /* eye catcher */ + int32 id; /* eye catcher */ CONNECTION connection; /* the GDB connection */ /* used to get at this */ /* database */ diff --git a/include/kadm.h b/include/kadm.h deleted file mode 100644 index f1393402..00000000 --- a/include/kadm.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * $Source$ - * $Author$ - * $Header$ - * - * Copyright 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Definitions for Kerberos administration server & client - */ - -#ifndef KADM_DEFS -#define KADM_DEFS - -#include -/* - * kadm.h - * Header file for the fourth attempt at an admin server - * Doug Church, December 28, 1989, MIT Project Athena - */ - -/* for those broken Unixes without this defined... should be in sys/param.h */ -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif - -#include -#include -#include -#include - -/* The global structures for the client and server */ -typedef struct { - struct sockaddr_in admin_addr; - struct sockaddr_in my_addr; - int my_addr_len; - int admin_fd; /* file descriptor for link to admin server */ - char sname[ANAME_SZ]; /* the service name */ - char sinst[INST_SZ]; /* the services instance */ - char krbrlm[REALM_SZ]; -} Kadm_Client; - -typedef struct { /* status of the server, i.e the parameters */ - int inter; /* Space for command line flags */ - char *sysfile; /* filename of server */ -} admin_params; /* Well... it's the admin's parameters */ - -/* Largest password length to be supported */ -#define MAX_KPW_LEN 128 - -/* Largest packet the admin server will ever allow itself to return */ -#define KADM_RET_MAX 2048 - -/* That's right, versions are 8 byte strings */ -#define KADM_VERSTR "KADM0.0A" -#define KADM_ULOSE "KYOULOSE" /* sent back when server can't - decrypt client's msg */ -#define KADM_VERSIZE strlen(KADM_VERSTR) - -/* the lookups for the server instances */ -#define PWSERV_NAME "changepw" -#define KADM_SNAME "kerberos_master" -#define KADM_SINST "kerberos" - -/* Attributes fields constants and macros */ -#define ALLOC 2 -#define RESERVED 3 -#define DEALLOC 4 -#define DEACTIVATED 5 -#define ACTIVE 6 - -/* Kadm_vals structure for passing db fields into the server routines */ -#define FLDSZ 4 - -typedef struct { - u_char fields[FLDSZ]; /* The active fields in this struct */ - char name[ANAME_SZ]; - char instance[INST_SZ]; - unsigned long key_low; - unsigned long key_high; - unsigned long exp_date; - unsigned short attributes; - unsigned char max_life; -} Kadm_vals; /* The basic values structure in Kadm */ - -/* Kadm_vals structure for passing db fields into the server routines */ -#define FLDSZ 4 - -/* Need to define fields types here */ -#define KADM_NAME 31 -#define KADM_INST 30 -#define KADM_EXPDATE 29 -#define KADM_ATTR 28 -#define KADM_MAXLIFE 27 -#define KADM_DESKEY 26 - -/* To set a field entry f in a fields structure d */ -#define SET_FIELD(f,d) (d[3-(f/8)]|=(1<<(f%8))) - -/* To set a field entry f in a fields structure d */ -#define CLEAR_FIELD(f,d) (d[3-(f/8)]&=(~(1<<(f%8)))) - -/* Is field f in fields structure d */ -#define IS_FIELD(f,d) (d[3-(f/8)]&(1<<(f%8))) - -/* Various return codes */ -#define KADM_SUCCESS 0 - -#define WILDCARD_STR "*" - -enum acl_types { -ADDACL, -GETACL, -MODACL -}; - -/* Various opcodes for the admin server's functions */ -#define CHANGE_PW 2 -#define ADD_ENT 3 -#define MOD_ENT 4 -#define GET_ENT 5 - -extern long kdb_get_master_key(); /* XXX should be in krb_db.h */ -extern long kdb_verify_master_key(); /* XXX ditto */ - -extern long krb_mk_priv(), krb_rd_priv(); /* XXX should be in krb.h */ -extern void krb_set_tkt_string(); /* XXX ditto */ - -extern unsigned long quad_cksum(); /* XXX should be in des.h */ - -/* XXX This doesn't belong here!!! */ -char *malloc(), *realloc(); -#ifdef POSIX -typedef void sigtype; -#else -typedef int sigtype; -#endif - -#endif KADM_DEFS diff --git a/include/krb.h b/include/krb.h deleted file mode 100644 index ac3338ec..00000000 --- a/include/krb.h +++ /dev/null @@ -1,383 +0,0 @@ -/* - * $Source$ - * $Author$ - * $Header$ - * - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. - * - * For copying and distribution information, please see the file - * . - * - * Include file for the Kerberos library. - */ - -/* Only one time, please */ -#ifndef KRB_DEFS -#define KRB_DEFS - -#include - -/* Need some defs from des.h */ -#include - -/* 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, Ultrix 2.2, and A/UX 2.0 - */ -#if defined(ULTRIX022) || (defined(SunOS) && SunOS < 40) || defined(_AUX_SOURCE) -#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 - -/* 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 "/kerberos/kerberos.log" -are these used anyplace '?'; -#define VX_KRB_HSTFILE "/etc/krbhst" -#define PC_KRB_HSTFILE "\\kerberos\\krbhst" -#endif - -#define KRB_CONF "/etc/athena/krb.conf" -#define KRB_RLM_TRANS "/etc/athena/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 120 /* default lifetime 10 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 */ -#ifndef CL_GTGT_INIT_FILE -#ifdef PC -#define CL_GTGT_INIT_FILE "\\kerberos\\k_in_tkts" -#else -#define CL_GTGT_INIT_FILE "/etc/athena/k_in_tkts" -#endif /* PC */ -#endif /* CL_GTGT_INIT_FILE */ - -/* Parameters for rd_ap_req */ -/* Maximum alloable clock skew in seconds */ -#define CLOCK_SKEW 5*60 -/* Filename for readservkey */ -#define KEYFILE "/etc/athena/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 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 */ - -#endif /* KRB_DEFS */ diff --git a/include/mit-sipb-copyright.h b/include/mit-sipb-copyright.h deleted file mode 100644 index ffcfc380..00000000 --- a/include/mit-sipb-copyright.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - -Copyright 1987 by the Student Information Processing Board - of the Massachusetts Institute of Technology - -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 names of M.I.T. and the M.I.T. S.I.P.B. not be -used in advertising or publicity pertaining to distribution -of the software without specific, written prior permission. -M.I.T. and the M.I.T. S.I.P.B. make no representations about -the suitability of this software for any purpose. It is -provided "as is" without express or implied warranty. - -*/ - diff --git a/include/mr_proto.h b/include/mr_proto.h index 43959b75..f4176bef 100644 --- a/include/mr_proto.h +++ b/include/mr_proto.h @@ -12,8 +12,8 @@ #include typedef struct mr_params { - u_long mr_size; - u_long mr_version_no; + uint32 mr_size; + uint32 mr_version_no; union { u_long procno; /* for call */ u_long status; /* for reply */ diff --git a/include/prot.h b/include/prot.h deleted file mode 100644 index 5f8fc282..00000000 --- a/include/prot.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * $Source$ - * $Author$ - * $Locker$ - * - * Copyright 1985,1986 by the Massachusetts Institute of Technology - * - */ - - -#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(pkt_a_name(packet))) -#define pkt_a_realm(packet) (pkt_a_inst(packet)+1+strlen(pkt_a_inst(packet))) - - -/* Macro to obtain realm from application request */ -#define apreq_realm(auth) (auth->dat + 3) - - -/* If there are long alignment problems, these */ -/* will have to be rewritten */ - -#define pkt_time_ws(packet) (unsigned long *) \ - (packet->dat+5+strlen(pkt_a_name(packet))+strlen(pkt_a_inst(packet)) \ - +strlen(pkt_a_realm(packet))) -#define pkt_no_req(packet) (unsigned short) \ - *(packet->dat+9+strlen(pkt_a_name(packet))+ \ - strlen(pkt_a_inst(packet))+strlen(pkt_a_realm(packet))) - -#define pkt_x_date(packet) (unsigned long *) \ - (packet->dat+10+strlen(pkt_a_name(packet))+strlen(pkt_a_inst(packet)) \ - +strlen(pkt_a_realm(packet))) - -#define pkt_err_code(packet) ( (unsigned long *) \ - (packet->dat+9+strlen(pkt_a_name(packet))+strlen(pkt_a_inst(packet)) \ - +strlen(pkt_a_realm(packet)))) -#define pkt_err_text(packet) \ - (packet->dat+13+strlen(pkt_a_name(packet))+ \ - strlen(pkt_a_inst(packet))+strlen(pkt_a_realm(packet))) - -/* Routines to create and read packets may be found in prot.c */ - -struct ktext *create_packet_to_kdc(); -struct ktext *create_auth_reply(); -struct ktext *create_death_packet(); -struct 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 - -/* Byte ordering */ -static int ONE = 1; -#define HOST_BYTE_ORDER (* (char *) &ONE) -#define MSB_FIRST 0 /* 68000 */ -#define LSB_FIRST 1 /* Vax, PC8086 */ diff --git a/include/update.h b/include/update.h index 78a2d201..f7bb7dfd 100644 --- a/include/update.h +++ b/include/update.h @@ -13,14 +13,12 @@ struct update_desc { char *instructions; /* script pathname */ }; -char *whoami; extern char sms_data_dir[]; #define log_DEBUG 0 #define log_INFO 1 #define log_WARNING 2 #define log_ERROR 3 -int log_priority; #define SERVICE_NAME "sms_update" #define UPDATE_BUFSIZ BUFSIZ