summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2009-03-02 03:14:23 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2009-03-02 03:14:23 +0000
commit2e7ac9926a7acb502c3887a4a01f9b17ff1f857d (patch)
tree2bf4fa7a1e8e1be8945a317620257a0b292404b3 /lib
parent5a4eb277e3f77610b67c13ee05ab4715f018b93b (diff)
build everything successfully with -Wall -Werror
Diffstat (limited to 'lib')
-rw-r--r--lib/ZCkAuth.c8
-rw-r--r--lib/ZMkAuth.c11
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