debian-release, This unfreeze request is purely an upstream bug fix for 64-bit architectures. Without it radiusclient-ng will not operate on 64-bit architectures. Mark radiusclient-ng (0.5.5-1) unstable; urgency=medium * New upstream release [ Mark Purcell ] * Urgency medium as this release fixes 64-bit architectures -- Jan Janak <jan@iptel.org> Mon, 5 Feb 2007 13:17:10 +0100 Ignoring Makefile changes the debdiff is: diff -Nru /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/CHANGES /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/CHANGES --- /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/CHANGES 2005-03-01 14:58:44.000000000 +0000 +++ /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/CHANGES 2007-02-05 12:54:01.000000000 +0000 @@ -1,8 +1,11 @@ -$Id: CHANGES,v 1.2 2005/03/01 14:58:44 janakj Exp $ +$Id: CHANGES,v 1.4 2007/02/05 12:54:01 janakj Exp $ This file only documents fixed bugs and new features.. well, if I am not too lazy... +05-02-2006 * 64-bit fixes ported from freeradius-client (jan@iptel.org) + * removed debian/Makefile from configure.in (jan@iptel.org) + 01-03-2005 Renamed to radiusclient-ng because the API is different and this change will make it possible to have the original libraries installed as well (jan@iptel.org). diff -Nru /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/include/radiusclient-ng.h /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/include/radiusclient-ng.h --- /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/include/radiusclient-ng.h 2005-07-21 09:01:07.000000000 +0100 +++ /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/include/radiusclient-ng.h 2006-05-17 19:14:35.000000000 +0100 @@ -1,5 +1,5 @@ /* - * $Id: radiusclient-ng.h,v 1.3 2005/07/21 08:01:07 sobomax Exp $ + * $Id: radiusclient-ng.h,v 1.5 2006/05/17 18:14:35 sobomax Exp $ * * Copyright (C) 1995,1996,1997,1998 Lars Fenneberg * @@ -18,6 +18,7 @@ #define RADIUSCLIENT_NG_H #include <sys/types.h> +#include <stdint.h> #include <stdio.h> #include <time.h> @@ -31,8 +32,8 @@ # define __END_DECLS /* empty */ #endif -typedef unsigned long UINT4; -typedef long INT4; +typedef uint32_t UINT4; +typedef int32_t INT4; #define AUTH_VECTOR_LEN 16 #define AUTH_PASS_LEN (3 * 16) /* multiple of 16 */ diff -Nru /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/lib/avpair.c /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/lib/avpair.c --- /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/lib/avpair.c 2005-04-01 02:33:10.000000000 +0100 +++ /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/lib/avpair.c 2006-05-30 20:18:03.000000000 +0100 @@ -1,5 +1,5 @@ /* - * $Id: avpair.c,v 1.15 2005/04/01 01:33:10 sobomax Exp $ + * $Id: avpair.c,v 1.17 2006/05/30 19:18:03 sobomax Exp $ * * Copyright (C) 1995 Lars Fenneberg * @@ -130,10 +130,13 @@ case PW_DIGEST_NONCE_COUNT: case PW_DIGEST_USER_NAME: /* overlapping! */ + if (vp->lvalue > AUTH_STRING_LEN - 2) + vp->lvalue = AUTH_STRING_LEN - 2; memmove(&vp->strvalue[2], &vp->strvalue[0], vp->lvalue); vp->strvalue[0] = vp->attribute - PW_DIGEST_REALM + 1; vp->lvalue += 2; vp->strvalue[1] = vp->lvalue; + vp->strvalue[vp->lvalue] = '\0'; vp->attribute = PW_DIGEST_ATTRIBUTES; default: break; @@ -412,7 +415,8 @@ while (*ptr != '"' && *ptr != '\0' && *ptr != '\n') { if (string < estring) - *string++ = *ptr++; + *string++ = *ptr; + ptr++; } if (*ptr == '"') { @@ -426,7 +430,8 @@ while (*ptr != '\0' && strchr(stopat, *ptr) == NULL) { if (string < estring) - *string++ = *ptr++; + *string++ = *ptr; + ptr++; } *string = '\0'; *uptr = ptr; @@ -453,7 +458,7 @@ { int mode; char attrstr[AUTH_ID_LEN]; - char valstr[AUTH_STRING_LEN]; + char valstr[AUTH_STRING_LEN + 1]; DICT_ATTR *attr = NULL; DICT_VALUE *dval; VALUE_PAIR *pair; @@ -594,10 +599,13 @@ case PW_DIGEST_NONCE_COUNT: case PW_DIGEST_USER_NAME: /* overlapping! */ + if (pair->lvalue > AUTH_STRING_LEN - 2) + pair->lvalue = AUTH_STRING_LEN - 2; memmove(&pair->strvalue[2], &pair->strvalue[0], pair->lvalue); pair->strvalue[0] = pair->attribute - PW_DIGEST_REALM + 1; pair->lvalue += 2; pair->strvalue[1] = pair->lvalue; + pair->strvalue[pair->lvalue] = '\0'; pair->attribute = PW_DIGEST_ATTRIBUTES; } @@ -673,7 +681,7 @@ } else { - strncat(value, ptr, 1); + strncat(value, (char *)ptr, 1); lv--; if (lv < 0) break; } diff -Nru /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/lib/sendserver.c /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/lib/sendserver.c --- /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/lib/sendserver.c 2005-07-21 09:01:07.000000000 +0100 +++ /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/lib/sendserver.c 2006-07-05 01:27:54.000000000 +0100 @@ -1,5 +1,5 @@ /* - * $Id: sendserver.c,v 1.15 2005/07/21 08:01:07 sobomax Exp $ + * $Id: sendserver.c,v 1.18 2006/07/05 00:27:54 sobomax Exp $ * * Copyright (C) 1995,1996,1997 Lars Fenneberg * @@ -81,7 +81,7 @@ memcpy ((char *) passbuf, vp->strvalue, (size_t) length); secretlen = strlen (secret); - vector = (char *)auth->vector; + vector = (unsigned char *)auth->vector; for(i = 0; i < padded_length; i += AUTH_VECTOR_LEN) { /* Calculate the MD5 digest*/ @@ -183,7 +183,7 @@ AUTH_HDR *auth, *recv_auth; UINT4 auth_ipaddr, nas_ipaddr; char *server_name; /* Name of server to query */ - int salen; + socklen_t salen; int result; int total_length; int length; @@ -271,7 +271,7 @@ memset((char *) auth->vector, 0, AUTH_VECTOR_LEN); secretlen = strlen (secret); memcpy ((char *) auth + total_length, secret, secretlen); - rc_md5_calc (vector, (char *) auth, total_length + secretlen); + rc_md5_calc (vector, (unsigned char *) auth, total_length + secretlen); memcpy ((char *) auth->vector, (char *) vector, AUTH_VECTOR_LEN); } else @@ -401,6 +401,9 @@ int totallen; unsigned char calc_digest[AUTH_VECTOR_LEN]; unsigned char reply_digest[AUTH_VECTOR_LEN]; +#ifdef DIGEST_DEBUG + u_char *ptr; +#endif totallen = ntohs (auth->length); secretlen = strlen (secret); @@ -445,9 +448,9 @@ rc_log(LOG_ERR, " %s", buf); } #endif - rc_md5_calc (calc_digest, (char *) auth, totallen + secretlen); + rc_md5_calc (calc_digest, (unsigned char *) auth, totallen + secretlen); #ifdef DIGEST_DEBUG - rc_log(LOG_ERR, "Digest is:"); + rc_log(LOG_ERR, "Calculated digest is:"); for (ptr = (u_char *)calc_digest; ptr < ((u_char *)calc_digest) + 16; ptr += 32) { char buf[65]; int i; @@ -460,24 +463,19 @@ } rc_log(LOG_ERR, " %s", buf); } -#endif - -#ifdef DIGEST_DEBUG - { - int i; + rc_log(LOG_ERR, "Reply digest is:"); + for (ptr = (u_char *)reply_digest; ptr < ((u_char *)reply_digest) + 16; ptr += 32) { + char buf[65]; + int i; - fputs("reply_digest: ", stderr); - for (i = 0; i < AUTH_VECTOR_LEN; i++) - { - fprintf(stderr,"%.2x ", (int) reply_digest[i]); - } - fputs("\ncalc_digest: ", stderr); - for (i = 0; i < AUTH_VECTOR_LEN; i++) - { - fprintf(stderr,"%.2x ", (int) calc_digest[i]); - } - fputs("\n", stderr); - } + buf[0] = '\0'; + for (i = 0; i < 32; i++) { + if (ptr + i >= ((u_char *)reply_digest) + 16) + break; + sprintf(buf + i * 2, "%.2X", ptr[i]); + } + rc_log(LOG_ERR, " %s", buf); + } #endif if (memcmp ((char *) reply_digest, (char *) calc_digest, diff -Nru /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/src/radiusclient.c /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/src/radiusclient.c --- /tmp/Jk0DjtGJ17/radiusclient-ng-0.5.3/src/radiusclient.c 2005-03-01 14:58:44.000000000 +0000 +++ /tmp/WWhXiWNXFX/radiusclient-ng-0.5.5/src/radiusclient.c 2006-04-04 21:52:04.000000000 +0100 @@ -23,12 +23,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: radiusclient.c,v 1.5 2005/03/01 14:58:44 janakj Exp $ + * $Id: radiusclient.c,v 1.6 2006/04/04 20:52:04 sobomax Exp $ */ #include <ctype.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> #include <radiusclient-ng.h> @@ -46,8 +47,9 @@ int main(int argc, char **argv) { - int i, nas_port, ch, acct, server, ecount, firstline, len, theend; + int i, nas_port, ch, acct, server, ecount, firstline, theend; void *rh; + size_t len; VALUE_PAIR *send, **vp; char *rc_conf, *cp; char lbuf[4096];
Attachment:
pgpHLwYKjVjxB.pgp
Description: PGP signature