diff options
author | markm <markm@FreeBSD.org> | 1995-08-25 22:52:32 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 1995-08-25 22:52:32 +0000 |
commit | a83b802bada404e3b2eccf92c3499966deaad171 (patch) | |
tree | 45f2ba147600b7d47d9e9695cf572877c7fa4773 /eBones/include | |
parent | 2d8492d7c86b21502ee9277e20ef1e6e931b7c44 (diff) | |
download | FreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.zip FreeBSD-src-a83b802bada404e3b2eccf92c3499966deaad171.tar.gz |
Start the eBones cleanup ball rolling.
These are the start of a lot of work to clean up the FreeBSD eBones code.
these changes include, but are not limited to:
- Create prototypes for all the library routines
- Make all the libraries compile clean with -Wall set
- Fix numerous small bugs shown up in the above process
- Prepare the code for libdes's removal to secure/
- add register, registerd and make_keypair to the make
Lots more will follow in days to come.
OK'ed by: rgrimes
Diffstat (limited to 'eBones/include')
29 files changed, 118 insertions, 37 deletions
diff --git a/eBones/include/ChangeLog b/eBones/include/ChangeLog index 254b8dd..77bc755 100644 --- a/eBones/include/ChangeLog +++ b/eBones/include/ChangeLog @@ -1,4 +1,4 @@ -# $Id: ChangeLog,v 1.2 1994/07/19 19:22:41 g89r4222 Exp $ +# $Id: ChangeLog,v 1.3 1995/07/18 16:35:58 mark Exp $ Mon Mar 21 15:48:59 MET 1994 Piero Serini * 1st port to FreeBSD diff --git a/eBones/include/Makefile b/eBones/include/Makefile index ff43b54..7e29c67 100644 --- a/eBones/include/Makefile +++ b/eBones/include/Makefile @@ -1,7 +1,7 @@ # from: @(#)Makefile 5.1 (Berkeley) 6/25/90 -# $Id: Makefile,v 1.1.1.1 1994/09/30 14:49:53 csgr Exp $ +# $Id: Makefile,v 1.4 1995/07/18 16:36:00 mark Exp $ -FILES= des.h kparse.h krb.h krb_db.h +FILES= kparse.h krb.h krb_db.h # mit-copyright.h kadm_err.h krb_err.h diff --git a/eBones/include/addr_comp.h b/eBones/include/addr_comp.h index 290d09a..2421bc6 100644 --- a/eBones/include/addr_comp.h +++ b/eBones/include/addr_comp.h @@ -6,7 +6,7 @@ * Include file for address comparison macros. * * from: addr_comp.h,v 4.0 89/01/23 09:57:44 jtkohl Exp $ - * $Id: addr_comp.h,v 1.1.1.1 1994/09/30 14:49:53 csgr Exp $ + * $Id: addr_comp.h,v 1.3 1995/07/18 16:36:01 mark Exp $ */ #ifndef ADDR_COMP_DEFS diff --git a/eBones/include/admin_server.h b/eBones/include/admin_server.h index 5209641..ca0977d 100644 --- a/eBones/include/admin_server.h +++ b/eBones/include/admin_server.h @@ -6,7 +6,7 @@ * Include file for the Kerberos administration server. * * from: admin_server.h,v 4.7 89/01/11 11:59:42 steiner Exp $ - * $Id: admin_server.h,v 1.1.1.1 1994/09/30 14:49:53 csgr Exp $ + * $Id: admin_server.h,v 1.3 1995/07/18 16:36:03 mark Exp $ */ #ifndef ADMIN_SERVER_DEFS diff --git a/eBones/include/conf-bsd386i.h b/eBones/include/conf-bsd386i.h index 0f63212..a009450 100644 --- a/eBones/include/conf-bsd386i.h +++ b/eBones/include/conf-bsd386i.h @@ -6,7 +6,7 @@ * Machine-type definitions: Sun 386i using SunOS (~BSD) * * from: conf-bsd386i.h,v 4.0 89/12/19 13:26:55 jtkohl Exp $ - * $Id: conf-bsd386i.h,v 1.2 1994/07/19 19:22:48 g89r4222 Exp $ + * $Id: conf-bsd386i.h,v 1.3 1995/07/18 16:36:05 mark Exp $ */ #define BITS32 diff --git a/eBones/include/conf-bsdapollo.h b/eBones/include/conf-bsdapollo.h index 119a96d..12dc580 100644 --- a/eBones/include/conf-bsdapollo.h +++ b/eBones/include/conf-bsdapollo.h @@ -4,7 +4,7 @@ * <Copyright.MIT>. * * from: conf-bsdapollo.h,v 4.1 89/01/24 14:26:22 jtkohl Exp $ - * $Id: conf-bsdapollo.h,v 1.1.1.1 1994/09/30 14:49:53 csgr Exp $ + * $Id: conf-bsdapollo.h,v 1.3 1995/07/18 16:36:06 mark Exp $ */ #define BSDUNIX diff --git a/eBones/include/conf-bsdibm032.h b/eBones/include/conf-bsdibm032.h index 285fbf6..8331498 100644 --- a/eBones/include/conf-bsdibm032.h +++ b/eBones/include/conf-bsdibm032.h @@ -6,7 +6,7 @@ * Machine-type definitions: IBM 032 (RT/PC) * * from: conf-bsdibm032.h,v 4.0 89/01/23 09:58:01 jtkohl Exp $ - * $Id: conf-bsdibm032.h,v 1.2 1994/07/19 19:22:51 g89r4222 Exp $ + * $Id: conf-bsdibm032.h,v 1.3 1995/07/18 16:36:08 mark Exp $ */ #define BSDUNIX diff --git a/eBones/include/conf-bsdm68k.h b/eBones/include/conf-bsdm68k.h index fcc2c57..9e60e06 100644 --- a/eBones/include/conf-bsdm68k.h +++ b/eBones/include/conf-bsdm68k.h @@ -6,7 +6,7 @@ * 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: conf-bsdm68k.h,v 1.2 1994/07/19 19:22:53 g89r4222 Exp $ + * $Id: conf-bsdm68k.h,v 1.3 1995/07/18 16:36:10 mark Exp $ */ #define BITS32 diff --git a/eBones/include/conf-bsdsparc.h b/eBones/include/conf-bsdsparc.h index abfa2ae..7359aec 100644 --- a/eBones/include/conf-bsdsparc.h +++ b/eBones/include/conf-bsdsparc.h @@ -6,7 +6,7 @@ * 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: conf-bsdsparc.h,v 1.2 1994/07/19 19:22:54 g89r4222 Exp $ + * $Id: conf-bsdsparc.h,v 1.3 1995/07/18 16:36:12 mark Exp $ */ #define BITS32 diff --git a/eBones/include/conf-bsdtahoe.h b/eBones/include/conf-bsdtahoe.h index 8095dc5..fa8c462 100644 --- a/eBones/include/conf-bsdtahoe.h +++ b/eBones/include/conf-bsdtahoe.h @@ -4,7 +4,7 @@ * Machine Description : TAHOE. * * from: conf-bsdtahoe.h,v 4.0 89/08/30 11:06:53 jtkohl Exp $ - * $Id: conf-bsdtahoe.h,v 1.2 1994/07/19 19:22:56 g89r4222 Exp $ + * $Id: conf-bsdtahoe.h,v 1.3 1995/07/18 16:36:14 mark Exp $ */ #define TAHOE diff --git a/eBones/include/conf-bsdvax.h b/eBones/include/conf-bsdvax.h index 6b82102..ef0c052 100644 --- a/eBones/include/conf-bsdvax.h +++ b/eBones/include/conf-bsdvax.h @@ -6,7 +6,7 @@ * Machine-type definitions: VAX * * from: conf-bsdvax.h,v 4.0 89/01/23 09:58:12 jtkohl Exp $ - * $Id: conf-bsdvax.h,v 1.2 1994/07/19 19:22:57 g89r4222 Exp $ + * $Id: conf-bsdvax.h,v 1.3 1995/07/18 16:36:15 mark Exp $ */ #define VAX diff --git a/eBones/include/conf-ibm370.h b/eBones/include/conf-ibm370.h index e4bccfc..7b8b504 100644 --- a/eBones/include/conf-ibm370.h +++ b/eBones/include/conf-ibm370.h @@ -6,7 +6,7 @@ * Machine-type definitions: IBM 370 * * from: conf-ibm370.h,v 4.0 89/01/23 09:58:19 jtkohl Exp $ - * $Id: conf-ibm370.h,v 1.2 1994/07/19 19:22:59 g89r4222 Exp $ + * $Id: conf-ibm370.h,v 1.3 1995/07/18 16:36:17 mark Exp $ */ /* What else? */ diff --git a/eBones/include/conf-pc.h b/eBones/include/conf-pc.h index 25218e3..4b633ff 100644 --- a/eBones/include/conf-pc.h +++ b/eBones/include/conf-pc.h @@ -6,7 +6,7 @@ * Machine-type definitions: IBM PC 8086 * * from: conf-pc.h,v 4.0 89/01/23 09:58:26 jtkohl Exp $ - * $Id: conf-pc.h,v 1.2 1994/07/19 19:23:00 g89r4222 Exp $ + * $Id: conf-pc.h,v 1.3 1995/07/18 16:36:19 mark Exp $ * */ diff --git a/eBones/include/conf-pyr.h b/eBones/include/conf-pyr.h index e88e528..f47c2155 100644 --- a/eBones/include/conf-pyr.h +++ b/eBones/include/conf-pyr.h @@ -6,7 +6,7 @@ * Machine-type definitions: Pyramid * * from: conf-pyr.h,v 4.0 89/12/19 13:27:16 jtkohl Exp $ - * $Id: conf-pyr.h,v 1.2 1994/07/19 19:23:02 g89r4222 Exp $ + * $Id: conf-pyr.h,v 1.3 1995/07/18 16:36:20 mark Exp $ */ #define BITS32 diff --git a/eBones/include/conf-ultmips2.h b/eBones/include/conf-ultmips2.h index 9e04aad..9733090 100644 --- a/eBones/include/conf-ultmips2.h +++ b/eBones/include/conf-ultmips2.h @@ -6,7 +6,7 @@ * Machine-type definitions: DECstation 3100 (MIPS R2000) * * from: conf-ultmips2.h,v 4.0 89/01/23 09:58:32 jtkohl Exp $ - * $Id: conf-ultmips2.h,v 1.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: conf-ultmips2.h,v 1.3 1995/07/18 16:36:22 mark Exp $ */ #define MIPS2 diff --git a/eBones/include/conf.h b/eBones/include/conf.h index 30186c5..64797e6 100644 --- a/eBones/include/conf.h +++ b/eBones/include/conf.h @@ -12,7 +12,7 @@ * /usr/include/krb.h?) * * from: conf.h,v 4.0 89/01/23 09:58:40 jtkohl Exp $ - * $Id: conf.h,v 1.2 1994/07/19 19:23:05 g89r4222 Exp $ + * $Id: conf.h,v 1.3 1995/07/18 16:36:24 mark Exp $ */ #ifndef _CONF_H_ diff --git a/eBones/include/des.h b/eBones/include/des.h index 4288c2f..af20141 100644 --- a/eBones/include/des.h +++ b/eBones/include/des.h @@ -6,7 +6,7 @@ * Include file for the Data Encryption Standard library. * * from: des.h,v 4.11 89/01/17 16:24:57 rfrench Exp $ - * $Id: des.h,v 1.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: des.h,v 1.3 1995/07/18 16:36:25 mark Exp $ */ /* only do the whole thing once */ diff --git a/eBones/include/highc.h b/eBones/include/highc.h index be50e3f..7ff2f7c 100644 --- a/eBones/include/highc.h +++ b/eBones/include/highc.h @@ -7,7 +7,7 @@ * we've got available.... * * from: highc.h,v 4.0 89/01/23 09:59:15 jtkohl Exp $ - * $Id: highc.h,v 1.2 1994/07/19 19:23:08 g89r4222 Exp $ + * $Id: highc.h,v 1.3 1995/07/18 16:36:27 mark Exp $ */ #define const diff --git a/eBones/include/kdc.h b/eBones/include/kdc.h index 2323eea..70756a4 100644 --- a/eBones/include/kdc.h +++ b/eBones/include/kdc.h @@ -6,7 +6,7 @@ * Include file for the Kerberos Key Distribution Center. * * from: kdc.h,v 4.1 89/01/24 17:54:04 jon Exp $ - * $Id: kdc.h,v 1.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: kdc.h,v 1.3 1995/07/18 16:36:29 mark Exp $ */ #ifndef KDC_DEFS diff --git a/eBones/include/klog.h b/eBones/include/klog.h index c2bd27f..c8ca557 100644 --- a/eBones/include/klog.h +++ b/eBones/include/klog.h @@ -7,7 +7,7 @@ * 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: klog.h,v 1.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: klog.h,v 1.3 1995/07/18 16:36:30 mark Exp $ */ #ifndef KLOG_DEFS diff --git a/eBones/include/kparse.h b/eBones/include/kparse.h index cf4741c..26bc523 100644 --- a/eBones/include/kparse.h +++ b/eBones/include/kparse.h @@ -6,7 +6,7 @@ * Include file for kparse routines. * * from: kparse.h,v 4.5 89/01/11 12:05:53 steiner Exp $ - * $Id: kparse.h,v 1.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: kparse.h,v 1.3 1995/07/18 16:36:32 mark Exp $ */ #ifndef KPARSE_DEFS diff --git a/eBones/include/krb.h b/eBones/include/krb.h index f0531d4..afc8505 100644 --- a/eBones/include/krb.h +++ b/eBones/include/krb.h @@ -6,7 +6,7 @@ * 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.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: krb.h,v 1.5 1995/07/18 16:36:34 mark Exp $ */ /* Only one time, please */ @@ -14,7 +14,9 @@ #define KRB_DEFS /* Need some defs from des.h */ -#include <kerberosIV/des.h> +#include <stdio.h> +#include <des.h> +#include <netinet/in.h> /* Text describing error codes */ #define MAX_KRB_ERRORS 256 @@ -373,4 +375,73 @@ char *tkt_string(); #define KOPT_DO_OLDSTYLE 0x00000008 /* use the old-style protocol */ #endif ATHENA_COMPAT +void acl_canonicalize_principal(char *principal, char *buf); +int acl_check(char *acl, char *principal); +int acl_exact_match(char *acl, char *principal); +int acl_add(char *acl, char *principal); +int acl_delete(char *acl, char *principal); +int acl_initialize(char *acl_file, int mode); + +int krb_mk_req(KTEXT authent, char *service, char *instance, char *realm, + long checksum); +int krb_rd_req (KTEXT authent, char *service, char *instance, long from_addr, + AUTH_DAT *ad, char *fn); +int krb_kntoln(AUTH_DAT *ad, char *lname); +int krb_set_key(char *key, int cvt); +int krb_get_cred(char *service, char *instance, char *realm, CREDENTIALS *c); +long krb_mk_priv(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(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(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(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(u_char *out, long code, char *string); +int krb_rd_err(u_char *in, u_long in_length, long *code, MSG_DAT *m_data); + +int krb_get_lrealm(char *r, int n); +char *krb_get_phost(char *alias); +int krb_get_krbhst(char *h, char *r, int n); +int krb_get_admhst(char *h, char *r, int n); +int krb_net_write(int fd, char *buf, int len); +int krb_net_read(int fd, char *buf, int len); +int krb_get_tf_realm(char *ticket_file, char *realm); +int krb_get_in_tkt(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(char *user, char *instance, char *realm, char *service, + char *sinstance, int life, char *password); +int krb_get_tf_fullname(char *ticket_file, char *name, char *instance, + char *realm); +int save_credentials(char *service, char *instance, char *realm, + des_cblock session, int lifetime, int kvno, KTEXT ticket, long issue_date); +int read_service_key(char *service, char *instance, char *realm, int kvno, + char *file, char *key); +int get_ad_tkt(char *service, char *sinstance, char *realm, int lifetime); +int send_to_kdc(KTEXT pkt, KTEXT rpkt, char *realm); +int decomp_ticket(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 kname_parse(char *np, char *ip, char *rp, char *fullname); +int tf_init(char *tf_name, int rw); +int tf_save_cred(char *service, char *instance, char *realm, + des_cblock session, int lifetime, int kvno, KTEXT ticket, long issue_date); +int tf_get_pname(char *p); +int tf_get_pinst(char *inst); +int tf_get_cred(CREDENTIALS *c); +void tf_close(void); +int getst(int fd, char *s, int n); +int pkt_clen(KTEXT pkt); +int in_tkt(char *pname, char *pinst); +char *month_sname(int n); +void log(); /* Actually VARARGS - markm */ + +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 index 5cd0ab9..ac7c2a8 100644 --- a/eBones/include/krb_conf.h +++ b/eBones/include/krb_conf.h @@ -14,7 +14,7 @@ * sources. * * from: krb_conf.h,v 4.0 89/01/23 09:59:27 jtkohl Exp $ - * $Id: krb_conf.h,v 1.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: krb_conf.h,v 1.3 1995/07/18 16:36:36 mark Exp $ */ #ifndef KRB_CONF_DEFS diff --git a/eBones/include/krb_db.h b/eBones/include/krb_db.h index e514339e..f7e6d57 100644 --- a/eBones/include/krb_db.h +++ b/eBones/include/krb_db.h @@ -11,7 +11,7 @@ * They MUST correspond to those defined in *.rel * * from: krb_db.h,v 4.9 89/01/24 17:55:39 jon Exp $ - * $Id: krb_db.h,v 1.1.1.1 1994/09/30 14:49:54 csgr Exp $ + * $Id: krb_db.h,v 1.3 1995/07/18 16:36:38 mark Exp $ */ #ifndef KRB_DB_DEFS @@ -90,11 +90,21 @@ typedef struct { } Dba; -extern int kerb_get_principal(); -extern int kerb_put_principal(); -extern int kerb_db_get_stat(); -extern int kerb_db_put_stat(); -extern int kerb_get_dba(); -extern int kerb_db_get_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 index fe7dc94..2686ade 100644 --- a/eBones/include/lsb_addr_comp.h +++ b/eBones/include/lsb_addr_comp.h @@ -7,7 +7,7 @@ * byte-order quantities * * from: lsb_addr_comp.h,v 4.0 89/01/23 15:44:46 jtkohl Exp $ - * $Id: lsb_addr_comp.h,v 1.2 1994/07/19 19:23:21 g89r4222 Exp $ + * $Id: lsb_addr_comp.h,v 1.3 1995/07/18 16:36:39 mark Exp $ */ #ifndef LSB_ADDR_COMP_DEFS diff --git a/eBones/include/osconf.h b/eBones/include/osconf.h index d3d4861..e0af41a 100644 --- a/eBones/include/osconf.h +++ b/eBones/include/osconf.h @@ -6,7 +6,7 @@ * Athena configuration. * * from: osconf.h,v 4.4 89/12/19 13:26:27 jtkohl Exp $ - * $Id: osconf.h,v 1.2 1994/07/19 19:23:22 g89r4222 Exp $ + * $Id: osconf.h,v 1.3 1995/07/18 16:36:41 mark Exp $ */ #ifdef tahoe diff --git a/eBones/include/passwd_server.h b/eBones/include/passwd_server.h index a8d9e18..662e654 100644 --- a/eBones/include/passwd_server.h +++ b/eBones/include/passwd_server.h @@ -6,7 +6,7 @@ * Include file for password server * * from: passwd_server.h,v 4.6 89/01/11 15:12:22 steiner Exp $ - * $Id: passwd_server.h,v 1.1.1.1 1994/09/30 14:49:55 csgr Exp $ + * $Id: passwd_server.h,v 1.3 1995/07/18 16:36:43 mark Exp $ */ #ifndef PASSWD_SERVER_DEFS diff --git a/eBones/include/principal.h b/eBones/include/principal.h index 4590116..7fa67bc 100644 --- a/eBones/include/principal.h +++ b/eBones/include/principal.h @@ -6,7 +6,7 @@ * Definitions for principal names. * * from: principal.h,v 4.5 89/01/11 15:15:01 steiner Exp $ - * $Id: principal.h,v 1.2 1994/07/19 19:23:25 g89r4222 Exp $ + * $Id: principal.h,v 1.3 1995/07/18 16:36:45 mark Exp $ */ #ifndef PRINCIPAL_DEFS diff --git a/eBones/include/prot.h b/eBones/include/prot.h index 7865607..ec0ee07 100644 --- a/eBones/include/prot.h +++ b/eBones/include/prot.h @@ -7,7 +7,7 @@ * Include file with authentication protocol information. * * from: prot.h,v 4.13 89/01/24 14:27:22 jtkohl Exp $ - * $Id: prot.h,v 1.2 1994/07/19 19:23:27 g89r4222 Exp $ + * $Id: prot.h,v 1.3 1995/07/18 16:36:46 mark Exp $ */ #include <krb_conf.h> |