Linux fixes for radius 2.0

Alan L. Wendt (alan@ezlink.com)
Fri, 1 Nov 1996 14:09:53 -0700 (MST)

I've got radius 2.0 working under Linux 1.3.100 with shadow passwords.
I mailed josh a full patch but I cannot post the patch to this group.
Aside from the obvious makefile stuff, I had to do the following.

radius-2.0/radius/src/radiusd.c line 116:
add defs of writefds & selectfds
Current source passes NULL which has the wrong size.
add struct timeval timeleft;
Current source passes NULL pointer but Linux updates through this.
add FD_ZERO(&writefds); FD_ZERO(&selectfds);

radius-2.0/radius/src/radiusd.c line 386:
add something like the following:
timeleft.tv_sec = 30;
timeleft.tv_usec = 0;

update the select call to pass &writefds, &selectfds, &timeleft
instead of NULLS..

radius-2.0/radius/src/radiusd.c line 1927:
database does not supply trailing nulls on allocated strings,
add
memcpy(buffer, contentd.dptr, contentd.dsize);
buffer[contentd.dsize] = 0;
and change the sscanf 'contentd.dptr' string to 'buffer'

radius-2.0/radius/src/util.c line 98
parentheses needed around hp->h_addr.

Alan Wendt
alan@ezlink.com