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/lib/libkrb/rd_safe.c | |
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/lib/libkrb/rd_safe.c')
-rw-r--r-- | eBones/lib/libkrb/rd_safe.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/eBones/lib/libkrb/rd_safe.c b/eBones/lib/libkrb/rd_safe.c index 3bfc490..48d43c5 100644 --- a/eBones/lib/libkrb/rd_safe.c +++ b/eBones/lib/libkrb/rd_safe.c @@ -13,16 +13,19 @@ * Steve Miller Project Athena MIT/DEC * * from: rd_safe.c,v 4.12 89/01/23 15:16:16 steiner Exp $ - * $Id: rd_safe.c,v 1.1.1.1 1994/09/30 14:50:03 csgr Exp $ + * $Id: rd_safe.c,v 1.3 1995/07/18 16:39:34 mark Exp $ */ +#if 0 #ifndef lint static char rcsid[] = -"$Id: rd_safe.c,v 1.1.1.1 1994/09/30 14:50:03 csgr Exp $"; +"$Id: rd_safe.c,v 1.3 1995/07/18 16:39:34 mark Exp $"; #endif /* lint */ +#endif /* system include files */ #include <stdio.h> +#include <string.h> #include <errno.h> #include <sys/types.h> #include <netinet/in.h> @@ -34,10 +37,6 @@ static char rcsid[] = #include <prot.h> #include "lsb_addr_comp.h" -extern char *errmsg(); -extern int errno; -extern int krb_debug; - /* static storage */ static C_Block calc_cksum[2]; @@ -63,13 +62,9 @@ static u_long delta_t; * information, MSG_DAT, is defined in "krb.h". */ -long krb_rd_safe(in,in_length,key,sender,receiver,m_data) - u_char *in; /* pointer to the msg received */ - u_long in_length; /* length of "in" msg */ - C_Block *key; /* encryption key for seed and ivec */ - struct sockaddr_in *sender; /* sender's address */ - struct sockaddr_in *receiver; /* receiver's address -- me */ - MSG_DAT *m_data; /* where to put message information */ +long krb_rd_safe(u_char *in, u_long in_length, des_cblock key, + struct sockaddr_in *sender, struct sockaddr_in *receiver, + MSG_DAT *m_data) { register u_char *p,*q; static u_long src_addr; /* Can't send structs since no @@ -167,11 +162,11 @@ krb_rd_safe protocol err sizeof(u_long) != sizeof(struct in_addr)"); #ifdef NOENCRYPTION bzero(calc_cksum, sizeof(calc_cksum)); #else - quad_cksum(q,calc_cksum,p-q,2,key); + quad_cksum((des_cblock *)q,calc_cksum,p-q,2,(des_cblock *)key); #endif if (krb_debug) - printf("\ncalc_cksum = %u, received cksum = %u", + printf("\ncalc_cksum = %lu, received cksum = %lu", (long) calc_cksum[0], (long) big_cksum[0]); if (bcmp((char *)big_cksum,(char *)calc_cksum,sizeof(big_cksum))) return(RD_AP_MODIFIED); |