From: Ken Raeburn Date: Wed, 15 Jan 2003 23:52:04 +0000 (+0000) Subject: * sendauth.c (krb_net_rd_sendauth): Arg raw_len now points to KRB4_32; don't X-Git-Tag: krb5-1.3-alpha1~153 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5cc39e35ba360e767fbbe433c5d7119619675e9c;p=krb5.git * sendauth.c (krb_net_rd_sendauth): Arg raw_len now points to KRB4_32; don't cast it to pointer to unsigned long. Change ld.so warning message check to be byte-order independent. * krb4int.h (krb_net_rd_sendauth): Decl updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15124 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 735b4204d..e43bd5901 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,10 @@ +2003-01-15 Ken Raeburn + + * sendauth.c (krb_net_rd_sendauth): Arg raw_len now points to + KRB4_32; don't cast it to pointer to unsigned long. Change ld.so + warning message check to be byte-order independent. + * krb4int.h (krb_net_rd_sendauth): Decl updated. + 2003-01-15 Tom Yu * CCache-glue.c: New file from KfM. diff --git a/src/lib/krb4/krb4int.h b/src/lib/krb4/krb4int.h index 82a66f649..1c7ab9f79 100644 --- a/src/lib/krb4/krb4int.h +++ b/src/lib/krb4/krb4int.h @@ -73,7 +73,7 @@ int krb_rd_preauth(KTEXT, char *, int, Principal *, des_cblock); #endif /* sendauth.c */ -int krb_net_rd_sendauth(int, KTEXT, char *); +int krb_net_rd_sendauth(int, KTEXT, KRB4_32 *); /* stime.c */ char *krb_stime(long *); diff --git a/src/lib/krb4/sendauth.c b/src/lib/krb4/sendauth.c index e4c8da7e6..d4ae44ef3 100644 --- a/src/lib/krb4/sendauth.c +++ b/src/lib/krb4/sendauth.c @@ -125,7 +125,7 @@ int krb_net_rd_sendauth (fd, reply, raw_len) int fd; /* file descriptor to write onto */ KTEXT reply; /* Where we put the reply message */ - char *raw_len; /* Where to read the length field info */ + KRB4_32 *raw_len; /* Where to read the length field info */ { KRB4_32 tkt_len; int got; @@ -145,8 +145,7 @@ krb_net_rd_sendauth (fd, reply, raw_len) when it starts up. We just ignore any such message and keep going. This doesn't affect security: we just require the ticket to follow the warning message. */ - if ((*(unsigned long *)raw_len - == (('l' << 24) | ('d' << 16) | ('.' << 8) | 's'))) { + if (!memcmp("ld.s", raw_len, 4)) { char c; while (krb_net_read(fd, &c, 1) == 1 && c != '\n') @@ -154,7 +153,7 @@ krb_net_rd_sendauth (fd, reply, raw_len) goto reread; } - tkt_len = ntohl(*(unsigned long *)raw_len); + tkt_len = ntohl(*raw_len); /* if the length is negative, the server failed to recognize us. */ if ((tkt_len < 0) || (tkt_len > sizeof(reply->dat)))