Re: RADIUS on Linux/Alpha

Richard Bullington (rbulling@obscure.org)
Wed, 23 Jul 1997 06:11:39 -0400 (EDT)

I know it's terrible form responding to one's own messages, but I forgot
that I had to patch the code to get it to work.

On Wed, 23 Jul 1997, Richard Bullington wrote:

> On Wed, 23 Jul 1997, Douglas W Babst wrote:
>
> > I'm a recent proud owner of a DEC Alpha clone (433mhz Durango, RedHat
> > Linux 4.2, 2.0.30 kernel) and have run into my first (fairly) serious
> > compiling problem. Has anyone compiled Livingston 1.16 RADIUS on
> > Linux/Alpha? Below are the results of the make.
>
> The radiusd described at http://miquels.www.cistron.nl/radius/ is working
> beautifully here on Red Hat 4.1, 2.0.27 kernel, UDB 166MHz Alpha hardware.
> This may suit your purposes. It is based on 1.16 RADIUS and has
> significant enhancements, also described at that URL.

What I meant to add was, 'as long as you fix the integer size assumption
that the MD5 code makes, and the crypt assumptions that GNU libc makes,
and link it dynamically'.

This patch is not ideal, and it will probably fail on i386 boxes, but it
works for getting things running on the Alpha:

diff -U 3 -r radiusd-cistron-1.5.3-original/src/Makefile radiusd-cistron-1.5.3/src/Makefile
--- radiusd-cistron-1.5.3-original/src/Makefile Thu Feb 20 08:12:51 1997
+++ radiusd-cistron-1.5.3/src/Makefile Sun Jun 15 08:13:55 1997
@@ -13,9 +13,10 @@
DBM = -DNDBM
DBMLIB = -ldb

-CFLAGS = -Wall -g -DCISTRON_COMPAT # -DNOSHADOW
-LDFLAGS = -static
+CFLAGS = -Wall -pedantic -g -DCISTRON_COMPAT # -DNOSHADOW
+LDFLAGS =
+#LDFLAGS = -static
CC = gcc
-LIBS = $(SLIB)
+LIBS = $(SLIB) -lcrypt

include Make.inc
diff -U 3 -r radiusd-cistron-1.5.3-original/src/md5.h radiusd-cistron-1.5.3/src/md5.h
--- radiusd-cistron-1.5.3-original/src/md5.h Mon Feb 10 10:50:28 1997
+++ radiusd-cistron-1.5.3/src/md5.h Sun Jun 15 08:26:56 1997
@@ -21,7 +21,7 @@
typedef unsigned short int UINT2;

/* UINT4 defines a four byte word */
-#if defined(__alpha) && defined(__osf__)
+#if defined(__alpha) || defined(__osf__)
typedef unsigned int UINT4;
#else
typedef unsigned long int UINT4;
diff -U 3 -r radiusd-cistron-1.5.3-original/src/radiusd.c radiusd-cistron-1.5.3/src/radiusd.c
--- radiusd-cistron-1.5.3-original/src/radiusd.c Mon May 5 07:44:09 1997
+++ radiusd-cistron-1.5.3/src/radiusd.c Sun Jun 8 13:54:09 1997
@@ -50,6 +50,7 @@
#include <sys/wait.h>
#include <malloc.h>
#include <getopt.h>
+#include <crypt.h>

#if !defined(NOSHADOW)
#include <shadow.h>

-Richard Bullington <rbulling@obscure.org> http://www.obscure.org