$OpenBSD: patch-radius_src_radiusd_c,v 1.3 2008/07/02 18:07:41 ajacoutot Exp $ --- radius/src/radiusd.c.orig Tue Jul 1 10:08:23 2008 +++ radius/src/radiusd.c Tue Jul 1 10:09:19 2008 @@ -72,7 +72,6 @@ static char sccsid[] = #include #include #include -#include #include "radius.h" #include "users.h" @@ -627,8 +626,8 @@ int fd; UINT4 addr; char secret[20]; char hostnm[128]; - int result; - size_t salen; + ssize_t result; + socklen_t salen; struct sockaddr_in *sin; u_short port; @@ -644,8 +643,7 @@ int fd; salen = sizeof (rad_saremote); sin = (struct sockaddr_in *) & rad_saremote; - result = recvfrom (fd, (char *) recv_buffer, - (int) sizeof(recv_buffer), + result = recvfrom (fd, (char *) recv_buffer, sizeof(recv_buffer), (int) 0, (struct sockaddr *)&rad_saremote, &salen); addr = ntohl(sin->sin_addr.s_addr); @@ -1847,12 +1845,12 @@ int activefd; code = PW_PASSWORD_REJECT; } else { -#endif PASSCHANGE +#endif code = PW_AUTHENTICATION_REJECT; report[RR_REJECT]++; #ifdef PASSCHANGE } -#endif PASSCHANGE +#endif DEBUG("sending reject to %s\n", req2strp(authreq)); total_length = build_packet(authreq,(VALUE_PAIR *)NULL,msg,code,FW_REPLY,send_buffer); @@ -2498,9 +2496,9 @@ const size_t hostnm_len; #define BUFFER_LEN 256 #define SECRET_LEN 64 -#define SECRET_LEN_S "64" +#define SECRET_LEN_S "63" #define HOSTNM_LEN 128 -#define HOSTNM_LEN_S "128" +#define HOSTNM_LEN_S "127" int update_clients() {