From: Tom Yu Date: Tue, 24 Oct 2000 00:14:18 +0000 (+0000) Subject: * mk_auth.c (krb_check_auth): Modify call to rd_priv() by kludging X-Git-Tag: krb5-1.3-alpha1~1799 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=97afcf69e1c90195a2a3b8f38a8e18808a3b985a;p=krb5.git * mk_auth.c (krb_check_auth): Modify call to rd_priv() by kludging a cast of session key to C_Block *, since CNS is inconsistent in this area as well. * mk_priv.c (krb_mk_priv): Align with CNS by taking C_Block *. * mk_safe.c (krb_mk_safe): Align with CNS by taking C_Block *. * rd_priv.c (krb_rd_priv): Align with CNS by taking C_Block *. * rd_safe.c (krb_rd_safe): Align with CNS by taking C_Block *. * recvauth.c (krb_recvauth): Update call to mk_priv() to have the correct type. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12805 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index ce5439cee..778ba1da5 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,20 @@ +2000-10-23 Tom Yu + + * mk_auth.c (krb_check_auth): Modify call to rd_priv() by kludging + a cast of session key to C_Block *, since CNS is inconsistent in + this area as well. + + * mk_priv.c (krb_mk_priv): Align with CNS by taking C_Block *. + + * mk_safe.c (krb_mk_safe): Align with CNS by taking C_Block *. + + * rd_priv.c (krb_rd_priv): Align with CNS by taking C_Block *. + + * rd_safe.c (krb_rd_safe): Align with CNS by taking C_Block *. + + * recvauth.c (krb_recvauth): Update call to mk_priv() to have the + correct type. + Tue Oct 10 05:03:50 2000 Ezra Peisach * kparse.c: Provide prototype for static struol(). Do not define diff --git a/src/lib/krb4/mk_auth.c b/src/lib/krb4/mk_auth.c index a94a25d85..45952c0f2 100644 --- a/src/lib/krb4/mk_auth.c +++ b/src/lib/krb4/mk_auth.c @@ -205,7 +205,7 @@ krb_check_auth (buf, checksum, msg_data, session, schedule, laddr, faddr) key_sched(session, schedule); #endif /* !NOENCRYPTION */ if (cc = krb_rd_priv(buf->dat, buf->length, schedule, - session, faddr, laddr, msg_data)) + (C_Block *)session, faddr, laddr, msg_data)) return(cc); /* fetch the (incremented) checksum that we supplied in the request */ diff --git a/src/lib/krb4/mk_priv.c b/src/lib/krb4/mk_priv.c index 47c96f59b..e8ce33358 100644 --- a/src/lib/krb4/mk_priv.c +++ b/src/lib/krb4/mk_priv.c @@ -87,7 +87,7 @@ krb_mk_priv(in,out,length,schedule,key,sender,receiver) * (header stuff) overlap */ unsigned KRB4_32 length; /* of in data */ Key_schedule schedule; /* precomputed key schedule */ - C_Block key; /* encryption key for seed and ivec */ + C_Block FAR *key; /* encryption key for seed and ivec */ struct sockaddr_in FAR *sender; /* sender address */ struct sockaddr_in FAR *receiver; /* receiver address */ { @@ -198,7 +198,7 @@ krb_mk_priv(in,out,length,schedule,key,sender,receiver) #ifndef NOENCRYPTION /* pcbc encrypt, pad as needed, use key as ivec */ pcbc_encrypt((C_Block *) q,(C_Block *) q, (long) (p-q), schedule, - (C_Block *)key, ENCRYPT); + key, ENCRYPT); #endif /* NOENCRYPTION */ return (q - out + c_length); /* resulting size */ diff --git a/src/lib/krb4/mk_safe.c b/src/lib/krb4/mk_safe.c index b0dbd17e4..5d810ea50 100644 --- a/src/lib/krb4/mk_safe.c +++ b/src/lib/krb4/mk_safe.c @@ -69,7 +69,7 @@ krb_mk_safe(in,out,length,key,sender,receiver) * overlap */ unsigned KRB4_32 length; /* of in data */ - C_Block key; /* encryption key for seed and ivec */ + C_Block FAR *key; /* encryption key for seed and ivec */ struct sockaddr_in *sender; /* sender address */ struct sockaddr_in *receiver; /* receiver address */ { @@ -143,7 +143,7 @@ krb_mk_safe(in,out,length,key,sender,receiver) #else /* Do encryption */ /* calculate the checksum of length, timestamps, and input data */ cksum = quad_cksum(q, (unsigned KRB4_32 *)big_cksum, - p-q, 2, (C_Block *)key); + p-q, 2, key); #endif /* NOENCRYPTION */ DEB (("\ncksum = %u",cksum)); diff --git a/src/lib/krb4/rd_priv.c b/src/lib/krb4/rd_priv.c index 44add9a76..9a2bb26d5 100644 --- a/src/lib/krb4/rd_priv.c +++ b/src/lib/krb4/rd_priv.c @@ -70,7 +70,7 @@ krb_rd_priv(in,in_length,schedule,key,sender,receiver,m_data) u_char *in; /* pointer to the msg received */ unsigned KRB4_32 in_length; /* length of "in" msg */ Key_schedule schedule; /* precomputed key schedule */ - C_Block key; /* encryption key for seed and ivec */ + C_Block FAR *key; /* encryption key for seed and ivec */ struct sockaddr_in *sender; struct sockaddr_in *receiver; MSG_DAT *m_data; /*various input/output data from msg */ @@ -114,7 +114,7 @@ krb_rd_priv(in,in_length,schedule,key,sender,receiver,m_data) #ifndef NOENCRYPTION /* pcbc decrypt, use key as ivec */ pcbc_encrypt((C_Block *)q, (C_Block *)q, (long)c_length, - schedule, (C_Block *)key, DECRYPT); + schedule, key, DECRYPT); #endif /* safely get application data length */ diff --git a/src/lib/krb4/rd_safe.c b/src/lib/krb4/rd_safe.c index f60e05922..cade67b62 100644 --- a/src/lib/krb4/rd_safe.c +++ b/src/lib/krb4/rd_safe.c @@ -52,7 +52,7 @@ KRB5_DLLIMP long KRB5_CALLCONV krb_rd_safe(in,in_length,key,sender,receiver,m_data) u_char FAR *in; /* pointer to the msg received */ unsigned KRB4_32 in_length; /* length of "in" msg */ - C_Block FAR key; /* encryption key for seed and ivec */ + C_Block FAR *key; /* encryption key for seed and ivec */ struct sockaddr_in FAR *sender; /* sender's address */ struct sockaddr_in FAR *receiver; /* receiver's address -- me */ MSG_DAT FAR *m_data; /* where to put message information */ @@ -180,7 +180,7 @@ krb_rd_safe protocol err sizeof(u_long) != sizeof(struct in_addr)"); #else /* Do encryption */ /* calculate the checksum of the length, timestamps, and * input data, on the sending byte order !! */ - quad_cksum(q,calc_cksum,p-q,2,(C_Block *)key); + quad_cksum(q,calc_cksum,p-q,2,key); #endif /* NOENCRYPTION */ DEB (("\n0: calc %l big %lx\n1: calc %lx big %lx\n2: calc %lx big %lx\n3: calc %lx big %lx\n", diff --git a/src/lib/krb4/recvauth.c b/src/lib/krb4/recvauth.c index 2a6665648..9230b32c0 100644 --- a/src/lib/krb4/recvauth.c +++ b/src/lib/krb4/recvauth.c @@ -257,7 +257,7 @@ krb_recvauth(options, fd, ticket, service, instance, faddr, laddr, kdata, tmp_buf, (unsigned KRB4_32) sizeof(cksum), schedule, - kdata->session, + &kdata->session, laddr, faddr); if (priv_len < 0) {