From owner-freebsd-hackers Fri Dec 8 07:35:56 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA11286 for hackers-outgoing; Fri, 8 Dec 1995 07:35:56 -0800 (PST) Received: from sssun.spb.su (news.spb.su [193.124.83.67]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA11107 for ; Fri, 8 Dec 1995 07:32:13 -0800 (PST) Received: by sssun.spb.su id AA04490 (5.65.kiae-1 ); Fri, 8 Dec 1995 18:20:01 +0300 To: "Allen D. Harpham" , freebsd-hackers@FreeBSD.ORG References: In-Reply-To: ; from "Allen D. Harpham" at Thu, 7 Dec 1995 18:04:54 -36000 Message-Id: Organization: RELCOM Corp., St.Petersburg Date: Fri, 8 Dec 1995 18:19:54 +0300 From: Andrew Timonin Reply-To: tim@sssun.spb.su Subject: Re: Merit Radius Lines: 318 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG Precedence: bulk In message Allen D. Harpham writes: >Hi All, >Has anyone out there been able to compile merit radius for freebsd. >I have tried several times and get compile errors. Are there any >complied binarys out there. Yes, I've done it for Radius-2.3 and FreeBSD-2.0.5 a couple of weeks ago... Here is a patch, if you want: ---------------------------> cut here <-------------------------- *** ./src/conf.h.orig Thu Aug 24 02:14:09 1995 --- ./src/conf.h Fri Oct 13 16:50:19 1995 *************** *** 50,56 **** --- 50,60 ---- #include #include #else /* bsdi */ + #if defined(__FreeBSD__) + #include + #else #include + #endif /* FreeBSD */ #endif /* bsdi */ /* #ifdef SYSV this is needed even on SunOS 4.1.3 */ *** ./src/radiusd.c.orig Thu Aug 31 21:48:28 1995 --- ./src/radiusd.c Fri Oct 13 17:29:15 1995 *************** *** 153,159 **** static int rad_reply PROTO((AUTH_REQ *, int, char *)); static void rad_reply_init PROTO((AATV *)); /* external radius_send */ ! static void reconfig PROTO((void)); static void record_event PROTO((AUTH_REQ *, AATV *, int, int, char *)); static int redo_action PROTO((AUTH_REQ *, int, char *)); static void reply_timer PROTO((int)); --- 153,159 ---- static int rad_reply PROTO((AUTH_REQ *, int, char *)); static void rad_reply_init PROTO((AATV *)); /* external radius_send */ ! static void reconfig PROTO((int)); static void record_event PROTO((AUTH_REQ *, AATV *, int, int, char *)); static int redo_action PROTO((AUTH_REQ *, int, char *)); static void reply_timer PROTO((int)); *************** *** 3675,3682 **** *************************************************************************/ static void ! reconfig () ! { int n; sigset_t sigoset; --- 3675,3682 ---- *************************************************************************/ static void ! reconfig (dummy) ! int dummy; { int n; sigset_t sigoset; *************** *** 3865,3871 **** "%s: resending packet for %s", func, event->sub_aatv->id)); sendto (event->sub_aatv->sockfd, (char *) event->packet, ! event->len, (int) 0, &event->sin, sizeof (event->sin)); result = EV_ACK; /* prevent freeing of event */ } --- 3865,3871 ---- "%s: resending packet for %s", func, event->sub_aatv->id)); sendto (event->sub_aatv->sockfd, (char *) event->packet, ! event->len, (int) 0, (struct sockaddr *) &event->sin, sizeof (event->sin)); result = EV_ACK; /* prevent freeing of event */ } *** ./src/rlmadmin.c.orig Wed Aug 30 19:10:55 1995 --- ./src/rlmadmin.c Fri Oct 13 20:48:22 1995 *************** *** 359,370 **** --- 359,379 ---- { int count = 0; int do_all; + #ifdef __FreeBSD__ + #include + regexp * rec; + #else int rec; + #endif VALUE_PAIR *vp; VALUE_PAIR *vps; USER_ENTRY *x = user_ent_x; /* head of chain */ + #ifdef __FreeBSD__ + rec = regcomp (user); /* see if regular expression */ + #else rec = re_comp (user); /* see if regular expression */ + #endif if (strcasecmp (user, "all")) { do_all = 0; *************** *** 378,384 **** --- 387,397 ---- { if (do_all || (!strcasecmp (x->name, user)) || + #ifdef __FreeBSD__ + (rec && regexec (rec, x->name))) + #else (!rec && re_exec (x->name))) + #endif { count++; printf ("%s\t", x->name); /* out goes the name */ *************** *** 1167,1174 **** * *************************************************************************/ ! int_handle () ! { printf ("\nUse QUIT to exit program\n"); signal (SIGINT, int_handle); --- 1180,1187 ---- * *************************************************************************/ ! void int_handle (dummy) ! int dummy; { printf ("\nUse QUIT to exit program\n"); signal (SIGINT, int_handle); *** ./src/sendserver.c.orig Thu Aug 31 00:13:04 1995 --- ./src/sendserver.c Sat Oct 14 16:18:33 1995 *************** *** 86,92 **** #endif #ifndef DEFAULT_DIR2 ! #define DEFAULT_DIR2 "/usr/private/etc/raddb" #endif extern char ourhostname[MAXHOSTNAMELEN]; --- 86,92 ---- #endif #ifndef DEFAULT_DIR2 ! #define DEFAULT_DIR2 "/usr/local/etc/raddb" #endif extern char ourhostname[MAXHOSTNAMELEN]; *** ./Makefile.orig Wed Aug 30 20:18:18 1995 --- ./Makefile Sat Oct 14 15:25:55 1995 *************** *** 48,60 **** # Where the configuration files live. RADDB = ./raddb # Some installation stuff. ! DAEMON_INSDIR = /usr/private/etc ! BIN_INSDIR = /usr/private/etc ! RADDB_INSDIR = /usr/private/etc/raddb # The server does not need to be owned by root, unless some shadow password # scheme needs it. You might create a user id "radius" for just this purpose. RADOWN = root ! RADGRP = bin # Define this to point to your AFS Kerberos source directory. # (used as the root of the AFS source directory for the stringtokey() function) --- 48,60 ---- # Where the configuration files live. RADDB = ./raddb # Some installation stuff. ! DAEMON_INSDIR = /usr/local/etc ! BIN_INSDIR = /usr/local/etc ! RADDB_INSDIR = /usr/local/etc/raddb # The server does not need to be owned by root, unless some shadow password # scheme needs it. You might create a user id "radius" for just this purpose. RADOWN = root ! RADGRP = wheel # Define this to point to your AFS Kerberos source directory. # (used as the root of the AFS source directory for the stringtokey() function) *************** *** 149,155 **** $(OBJ)/sendserver.o $(OBJ)/users.o $(OBJ)/util.o $(OBJ)/dummy.o UTIL_OBJS = $(OBJ)/radcheck.o $(OBJ)/radpwtst.o $(OBJ)/radpass.o \ ! $(OBJ)/rlmadmin.o RAD_SRCS = $(SRC)/radiusd.c $(SRC)/authenticate.c $(SRC)/rad.accounting.c \ $(SRC)/rad.kchap.c $(SRC)/rad.kerberos.c $(SRC)/rad.mnet.c \ --- 149,155 ---- $(OBJ)/sendserver.o $(OBJ)/users.o $(OBJ)/util.o $(OBJ)/dummy.o UTIL_OBJS = $(OBJ)/radcheck.o $(OBJ)/radpwtst.o $(OBJ)/radpass.o \ ! $(OBJ)/rlmadmin.o $(OBJ)/strptime.o RAD_SRCS = $(SRC)/radiusd.c $(SRC)/authenticate.c $(SRC)/rad.accounting.c \ $(SRC)/rad.kchap.c $(SRC)/rad.kerberos.c $(SRC)/rad.mnet.c \ *************** *** 185,195 **** # #-------------------------------------------------------------------------- ! CC = cc ! CFLAGS = -g ! LDFLAGS = ! LIBS = ! RANLIB = ranlib # # Solaris 2.x --- 185,195 ---- # #-------------------------------------------------------------------------- ! #CC = cc ! #CFLAGS = -g ! #LDFLAGS = ! #LIBS = ! #RANLIB = ranlib # # Solaris 2.x *************** *** 236,247 **** # #-------------------------------------------------------------------------- ! #CC = cc ! #CFLAGS = -O ! #LDFLAGS = ! #LIBS = -lcrypt ! #MOSTUTIL = $(RADCHECK) $(RADPWTST) $(RADPASS) ! #RANLIB = ranlib # # AIX 3.2 --- 236,247 ---- # #-------------------------------------------------------------------------- ! CC = cc ! CFLAGS = -O -DRADIUS_DIR=\"/usr/local/etc/raddb\" -DRADACCT_DIR=\"/var/account/radacct\" ! LDFLAGS = ! LIBS = -lcrypt ! MOSTUTIL = $(RADCHECK) $(RADPWTST) $(RADPASS) ! RANLIB = ranlib # # AIX 3.2 *************** *** 422,428 **** $(BIN)/builddbm: $(OBJ)/builddbm.o $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/builddbm $(OBJ)/builddbm.o -ldbm ! $(OBJ)/builddbm.o: $(SRC)/builddbm.c $(CC) $(CFLAGS) $(DEFS) -o $(OBJ)/builddbm.o -c $(SRC)/builddbm.c --- 422,428 ---- $(BIN)/builddbm: $(OBJ)/builddbm.o $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/builddbm $(OBJ)/builddbm.o -ldbm ! $(OBJ)/builddbm.o: $(SRC)/builddbm.c $(CC) $(CFLAGS) $(DEFS) -o $(OBJ)/builddbm.o -c $(SRC)/builddbm.c *************** *** 433,444 **** $(OBJ)/radpass.o: $(SRC)/radpass.c $(SRC)/radius.h $(CC) $(CFLAGS) -o $(OBJ)/radpass.o -c $(SRC)/radpass.c ! $(RLMADMIN): $(OBJ)/rlmadmin.o $(RAD_LIB) $(CC) $(CFLAGS) $(LDFLAGS) -o $(RLMADMIN) \ ! $(OBJ)/rlmadmin.o $(RADLIBS) $(RAD_LIB) $(LIBS) $(OBJ)/rlmadmin.o: $(SRC)/rlmadmin.c $(SRC)/radius.h $(CC) $(CFLAGS) -o $(OBJ)/rlmadmin.o -c $(SRC)/rlmadmin.c $(RADPWTST): $(OBJ)/radpwtst.o $(RAD_LIB) $(CC) $(CFLAGS) $(LDFLAGS) -o $(RADPWTST) \ --- 433,447 ---- $(OBJ)/radpass.o: $(SRC)/radpass.c $(SRC)/radius.h $(CC) $(CFLAGS) -o $(OBJ)/radpass.o -c $(SRC)/radpass.c ! $(RLMADMIN): $(OBJ)/rlmadmin.o $(OBJ)/strptime.o $(RAD_LIB) $(CC) $(CFLAGS) $(LDFLAGS) -o $(RLMADMIN) \ ! $(OBJ)/rlmadmin.o $(OBJ)/strptime.o $(RADLIBS) $(RAD_LIB) $(LIBS) $(OBJ)/rlmadmin.o: $(SRC)/rlmadmin.c $(SRC)/radius.h $(CC) $(CFLAGS) -o $(OBJ)/rlmadmin.o -c $(SRC)/rlmadmin.c + + $(OBJ)/strptime.o: $(SRC)/strptime.c + $(CC) $(CFLAGS) -o $(OBJ)/strptime.o -c $(SRC)/strptime.c $(RADPWTST): $(OBJ)/radpwtst.o $(RAD_LIB) $(CC) $(CFLAGS) $(LDFLAGS) -o $(RADPWTST) \ ---------------------------> cut here <-------------------------- >____________________________________________________________________________ >Allen D. Harpham, President | Voice: (402)462-4619 -- Andrew A. Timonin E-mail tim@sssun.spb.su, St.Petersburg phone: office: +7 (812) 1106762 Russia private: +7 (812) 2540779