summaryrefslogtreecommitdiffstats
path: root/eBones/lib/libkrb/rd_safe.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-09-07 21:39:00 +0000
committermarkm <markm@FreeBSD.org>1995-09-07 21:39:00 +0000
commit2539acf77b018acd7416a9857a14c466e55cd7e8 (patch)
tree96ff3578d62372822240f11a1567e45b880f3910 /eBones/lib/libkrb/rd_safe.c
parenteed9438eb23b62f78af7685dc226228e2bf5c524 (diff)
downloadFreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.zip
FreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.tar.gz
Major cleanup of eBones code:
- Get all functions prototyped or at least defined before use. - Make code compile (Mostly) clean with -Wall set - Start to reduce the degree to which DES aka libdes is built in. - get all functions to the same uniform standard of definition: int foo(a, b) int a; int *b; { : } - fix numerous bugs exposed by above processes. Note - this replaces the previous work which used an unpopular function definition style.
Diffstat (limited to 'eBones/lib/libkrb/rd_safe.c')
-rw-r--r--eBones/lib/libkrb/rd_safe.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/eBones/lib/libkrb/rd_safe.c b/eBones/lib/libkrb/rd_safe.c
index 48d43c5..4d3e8d6 100644
--- a/eBones/lib/libkrb/rd_safe.c
+++ b/eBones/lib/libkrb/rd_safe.c
@@ -37,6 +37,10 @@ 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];
@@ -62,9 +66,13 @@ static u_long delta_t;
* information, MSG_DAT, is defined in "krb.h".
*/
-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)
+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 */
{
register u_char *p,*q;
static u_long src_addr; /* Can't send structs since no
@@ -162,7 +170,7 @@ krb_rd_safe protocol err sizeof(u_long) != sizeof(struct in_addr)");
#ifdef NOENCRYPTION
bzero(calc_cksum, sizeof(calc_cksum));
#else
- quad_cksum((des_cblock *)q,calc_cksum,p-q,2,(des_cblock *)key);
+ quad_cksum((C_Block *)q,calc_cksum,p-q,2,key);
#endif
if (krb_debug)
OpenPOWER on IntegriCloud