diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ZCkAuth.c | 8 | ||||
-rw-r--r-- | lib/ZMkAuth.c | 11 |
2 files changed, 11 insertions, 8 deletions
diff --git a/lib/ZCkAuth.c b/lib/ZCkAuth.c index 94de793..6646db4 100644 --- a/lib/ZCkAuth.c +++ b/lib/ZCkAuth.c @@ -52,10 +52,12 @@ ZCheckAuthentication(ZNotice_t *notice, session = (C_Block *)cred.session; - our_checksum = des_quad_cksum(notice->z_packet, NULL, + our_checksum = des_quad_cksum((unsigned char *)notice->z_packet, + NULL, notice->z_default_format+ - strlen(notice->z_default_format)+1- - notice->z_packet, 0, session); + strlen(notice->z_default_format) + 1 + - notice->z_packet, + 0, session); /* if mismatched checksum, then the packet was corrupted */ return ((our_checksum == notice->z_checksum) ? ZAUTH_YES : ZAUTH_FAILED); diff --git a/lib/ZMkAuth.c b/lib/ZMkAuth.c index 121f813..ee9e7e2 100644 --- a/lib/ZMkAuth.c +++ b/lib/ZMkAuth.c @@ -41,7 +41,6 @@ ZMakeAuthentication(register ZNotice_t *notice, #else #ifdef HAVE_KRB4 int result; - time_t now; KTEXT_ST authent; char *cstart, *cend; ZChecksum_t checksum; @@ -80,10 +79,10 @@ ZMakeAuthentication(register ZNotice_t *notice, return(result); /* Compute a checksum over the header and message. */ - checksum = des_quad_cksum(buffer, NULL, cstart - buffer, 0, session); - checksum ^= des_quad_cksum(cend, NULL, buffer + *len - cend, 0, + checksum = des_quad_cksum((unsigned char *)buffer, NULL, cstart - buffer, 0, session); + checksum ^= des_quad_cksum((unsigned char *)cend, NULL, buffer + *len - cend, 0, session); - checksum ^= des_quad_cksum(notice->z_message, NULL, notice->z_message_len, + checksum ^= des_quad_cksum((unsigned char *)notice->z_message, NULL, notice->z_message_len, 0, session); notice->z_checksum = checksum; ZMakeAscii32(cstart, buffer + buffer_len - cstart, checksum); @@ -193,7 +192,9 @@ ZMakeZcodeRealmAuthentication(register ZNotice_t *notice, *phdr_len += phdr_adj; return (result); -#endif /* HAVE_KRB5 */ +#else /* HAVE_KRB5 */ + return ZERR_INTERNAL; +#endif } #ifdef HAVE_KRB5 |