summaryrefslogtreecommitdiff
path: root/net/radiusd-cistron
diff options
context:
space:
mode:
authormartti <martti@pkgsrc.org>2001-10-11 09:57:20 +0000
committermartti <martti@pkgsrc.org>2001-10-11 09:57:20 +0000
commit12a00a67c7bd1f664e82e21bc08544da6b42d24c (patch)
tree1242dfcfbb7a468471e35dfdc0c41c67bb000e90 /net/radiusd-cistron
parentfd11b83d3dbc5b3dd6892589f48c65101d2f85be (diff)
downloadpkgsrc-12a00a67c7bd1f664e82e21bc08544da6b42d24c.tar.gz
Added radiusd-cistron which was submitted in pkg/13274.
Diffstat (limited to 'net/radiusd-cistron')
-rw-r--r--net/radiusd-cistron/Makefile48
-rw-r--r--net/radiusd-cistron/distinfo8
-rw-r--r--net/radiusd-cistron/files/radiusd.sh.tmpl21
-rw-r--r--net/radiusd-cistron/patches/patch-aa27
-rw-r--r--net/radiusd-cistron/patches/patch-ab55
-rw-r--r--net/radiusd-cistron/patches/patch-ac12
-rw-r--r--net/radiusd-cistron/patches/patch-af131
-rw-r--r--net/radiusd-cistron/pkg/DESCR4
-rw-r--r--net/radiusd-cistron/pkg/PLIST51
9 files changed, 357 insertions, 0 deletions
diff --git a/net/radiusd-cistron/Makefile b/net/radiusd-cistron/Makefile
new file mode 100644
index 00000000000..324a6ec645f
--- /dev/null
+++ b/net/radiusd-cistron/Makefile
@@ -0,0 +1,48 @@
+# $NetBSD: Makefile,v 1.1 2001/10/11 09:57:20 martti Exp $
+
+DISTNAME= radiusd-cistron-1.6.4
+CATEGORIES= net
+MASTER_SITES= ftp://ftp.cistron.nl/pub/people/miquels/radius/ \
+ ftp://ftp.freeradius.org/pub/radius/
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.radius.cistron.nl/
+COMMENT= RADIUS-compliant remote authentication and accouting server
+
+MAKEFILE= Makefile.BSD
+
+do-build:
+ cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE}
+
+do-install:
+ cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE} install
+ @${MKDIR} -m 700 /var/log/radacct
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT.Cistron ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT.Livingston ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/ChangeLog ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/INSTALL.OLD ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/README ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.Y2K ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.cisco ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.pam ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.proxy ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.simul ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.usersfile ${PREFIX}/share/doc/radiusd-cistron
+ ${INSTALL_MAN} ${WRKSRC}/doc/radlast.1 ${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/doc/radtest.1 ${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/doc/raduse.1 ${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/doc/radwho.1 ${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/doc/radzap.1 ${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/doc/clients.5rad ${PREFIX}/man/man5
+ ${INSTALL_MAN} ${WRKSRC}/doc/naslist.5rad ${PREFIX}/man/man5
+ ${INSTALL_MAN} ${WRKSRC}/doc/radiusd.8 ${PREFIX}/man/man8
+ ${INSTALL_MAN} ${WRKSRC}/doc/radwatch.8 ${PREFIX}/man/man8
+
+post-install:
+ @${SED} -e "s=!!PREFIX!!=${PREFIX}=g" ${FILESDIR}/radiusd.sh.tmpl \
+ > ${PREFIX}/etc/rc.d/radiusd.sh
+ @${CHMOD} 555 ${PREFIX}/etc/rc.d/radiusd.sh
+ @${CHOWN} root:wheel ${PREFIX}/etc/rc.d/radiusd.sh
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/radiusd-cistron/distinfo b/net/radiusd-cistron/distinfo
new file mode 100644
index 00000000000..30c1e4f63c3
--- /dev/null
+++ b/net/radiusd-cistron/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2001/10/11 09:57:20 martti Exp $
+
+SHA1 (radiusd-cistron-1.6.4.tar.gz) = df2b8790c09d077218685d1811dae0126cf0d2b9
+Size (radiusd-cistron-1.6.4.tar.gz) = 144054 bytes
+SHA1 (patch-aa) = 39ad1c632a8f4757acd2a45fcbd8302abf23d25f
+SHA1 (patch-ab) = ee7534f09d3a4391bf8e2e25abe57f18fcf61a0e
+SHA1 (patch-ac) = b5666314e0e049bf43e8ab96955fb565e9fc282d
+SHA1 (patch-af) = fac15b8bafe774eef0fb6cc3ffc9e5d143e20495
diff --git a/net/radiusd-cistron/files/radiusd.sh.tmpl b/net/radiusd-cistron/files/radiusd.sh.tmpl
new file mode 100644
index 00000000000..f12114eedce
--- /dev/null
+++ b/net/radiusd-cistron/files/radiusd.sh.tmpl
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# $NetBSD: radiusd.sh.tmpl,v 1.1 2001/10/11 09:57:21 martti Exp $
+#
+
+PREFIX=!!PREFIX!!
+
+case "$1" in
+ start)
+ ${PREFIX}/sbin/radiusd -y && echo -n ' radiusd'
+ ;;
+ stop)
+ if [ -f /var/run/radiusd.pid ]; then
+ kill `cat /var/run/radiusd.pid` && echo -n ' radiusd'
+ rm -f /var/run/radiusd.pid
+ fi
+ ;;
+ *)
+ echo "$0 start | stop"
+ ;;
+esac
diff --git a/net/radiusd-cistron/patches/patch-aa b/net/radiusd-cistron/patches/patch-aa
new file mode 100644
index 00000000000..45110adf23a
--- /dev/null
+++ b/net/radiusd-cistron/patches/patch-aa
@@ -0,0 +1,27 @@
+$NetBSD: patch-aa,v 1.1 2001/10/11 09:57:21 martti Exp $
+
+--- src/Makefile.BSD.orig Fri Jun 26 06:00:17 1998
++++ src/Makefile.BSD Fri Oct 23 13:32:18 1998
+@@ -3,9 +3,9 @@
+ #
+ #
+
+-CC = gcc
+-CFLAGS = -Wall -g -DNOSHADOW
+-LDFLAGS = # -s #tatic
++#CC = gcc
++CFLAGS += -DNOSHADOW -DPREFIX=\"$(PREFIX)\"
++LDFLAGS = -s #tatic
+ LIBS =
+ LCRYPT = -lcrypt
+
+@@ -15,7 +15,7 @@
+ #PAM = -DPAM
+ #PAMLIB = -lpam
+
+-BINDIR = /usr/local/bin
+-SBINDIR = /usr/local/sbin
++BINDIR = $(PREFIX)/bin
++SBINDIR = $(PREFIX)/sbin
+
+ .include "Make.inc"
diff --git a/net/radiusd-cistron/patches/patch-ab b/net/radiusd-cistron/patches/patch-ab
new file mode 100644
index 00000000000..b8ee42b123d
--- /dev/null
+++ b/net/radiusd-cistron/patches/patch-ab
@@ -0,0 +1,55 @@
+$NetBSD: patch-ab,v 1.1 2001/10/11 09:57:21 martti Exp $
+
+--- src/Make.inc.orig Mon Apr 3 11:00:59 2000
++++ src/Make.inc Wed May 3 18:56:35 2000
+@@ -4,7 +4,7 @@
+ #
+ #
+
+-RADIUS_DIR = /etc/raddb
++RADIUS_DIR = ${PREFIX}/etc/raddb
+
+ SERVER_OBJS = radiusd.o dict.o files.o util.o md5.o attrprint.o \
+ acct.o radius.o pam.o log.o version.o proxy.o \
+@@ -111,21 +111,20 @@
+
+ install:
+ # Install the binaries
+- install -d $(SBINDIR)
+- install -d $(BINDIR)
+- install -d $(RADIUS_DIR)
+- install -m 755 -s radiusd $(SBINDIR)/radiusd
+- install -m 755 -s radwho $(BINDIR)
+- install -m 755 -s raduse $(BINDIR)
+- install -m 755 -s radzap $(BINDIR)
+- install -m 755 -s radtest $(BINDIR)
+- install -m 755 checkrad.pl $(SBINDIR)/checkrad
+- install -m 755 radlast $(BINDIR)
++ ${INSTALL} -d $(RADIUS_DIR)
++ ${BSD_INSTALL_PROGRAM} radiusd $(SBINDIR)/radiusd
++ ${BSD_INSTALL_PROGRAM} radwho $(BINDIR)
++ ${BSD_INSTALL_PROGRAM} raduse $(BINDIR)
++ ${BSD_INSTALL_PROGRAM} radzap $(BINDIR)
++ ${BSD_INSTALL_PROGRAM} radtest $(BINDIR)
++ ${BSD_INSTALL_SCRIPT} ../scripts/radwatch ${SBINDIR}/radwatch
++ ${BSD_INSTALL_SCRIPT} checkrad.pl $(SBINDIR)/checkrad
++ ${BSD_INSTALL_SCRIPT} radlast $(BINDIR)
+ # Install the config files
+ @echo "Creating/updating files in $(RADIUS_DIR)"; \
+ cd ../raddb; \
+ for i in [a-c]* [e-z]*; do \
+- [ ! -f $(RADIUS_DIR)/$$i ] && cp $$i $(RADIUS_DIR)/$$i; \
++ [ ! -f $(RADIUS_DIR)/$$i ] && cp $$i $(RADIUS_DIR)/$$i.sample; \
+ done; \
+ for i in dictionary*; do \
+ [ ! -f $(RADIUS_DIR)/$$i ] && cp $$i $(RADIUS_DIR)/$$i; \
+@@ -133,8 +132,4 @@
+ echo "** $(RADIUS_DIR)/$$i"; \
+ nt=1; \
+ fi; \
+- done; \
+- if [ "$$nt" ]; then \
+- echo "** The samples in ../raddb are newer than these files";\
+- echo "** Please investigate and copy manually if appropriate";\
+- fi
++ done;
diff --git a/net/radiusd-cistron/patches/patch-ac b/net/radiusd-cistron/patches/patch-ac
new file mode 100644
index 00000000000..7e032a4fffe
--- /dev/null
+++ b/net/radiusd-cistron/patches/patch-ac
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.1 2001/10/11 09:57:21 martti Exp $
+
+--- src/conf.h.orig Thu Mar 30 10:24:59 2000
++++ src/conf.h Wed May 3 18:37:57 2000
+@@ -1,6 +1,6 @@
+ /* Default Database File Names */
+
+-#define RADIUS_DIR "/etc/raddb"
++#define RADIUS_DIR PREFIX "/etc/raddb"
+ #define RADLOG_DIR "/var/log"
+
+ #ifdef aix
diff --git a/net/radiusd-cistron/patches/patch-af b/net/radiusd-cistron/patches/patch-af
new file mode 100644
index 00000000000..26513648e6e
--- /dev/null
+++ b/net/radiusd-cistron/patches/patch-af
@@ -0,0 +1,131 @@
+$NetBSD: patch-af,v 1.1 2001/10/11 09:57:21 martti Exp $
+
+--- src/radwho.c.orig Wed Jul 5 12:53:20 2000
++++ src/radwho.c Wed Jan 10 23:55:49 2001
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <sys/utsname.h>
++#include <sys/ioctl.h>
+ #include <time.h>
+ #include <ctype.h>
+ #include <netinet/in.h>
+@@ -34,18 +35,21 @@
+ * Header above output and format.
+ */
+ char *hdr1 =
+-"Login Name What TTY When From Location";
+-char *ufmt1 = "%-10.10s %-17.17s %-5.5s %-4.4s %-9.9s %-9.9s %-.16s%s";
++"Login Name What TTY When From Location";
++char *ufmt1 = "%-16.16s %-17.17s %-5.5s %-4.4s %-9.9s %-9.9s %-.*s%s";
+ char *ufmt1r = "%s,%s,%s,%s,%s,%s,%s%s";
+-char *rfmt1 = "%-10.10s %-17.17s %-5.5s %s%-3d %-9.9s %-9.9s %-.19s%s";
++char *rfmt1 = "%-16.16s %-17.17s %-5.5s %s%-3d %-9.9s %-9.9s %-.*s%s";
+ char *rfmt1r = "%s,%s,%s,%s%d,%s,%s,%s%s";
++#define FMT1_HOST_SIZE 13
+
+ char *hdr2 =
+-"Login Port What When From Location";
+-char *ufmt2 = "%-10.10s %-6.6d %-7.7s %-13.13s %-10.10s %-.16s%s";
++"Login Port What When From Location";
++char *ufmt2 = "%-16.16s %-6.6d %-7.7s %-13.13s %-10.10s %-.*s%s";
+ char *ufmt2r = "%s,%d,%s,%s,%s,%s%s";
+-char *rfmt2 = "%-10.10s %s%-5d %-6.6s %-13.13s %-10.10s %-.28s%s";
++char *rfmt2 = "%-16.16s %s%-5d %-6.6s %-13.13s %-10.10s %-.*s%s";
+ char *rfmt2r = "%s,%s%d,%s,%s,%s,%s%s";
++#define FMT2_HOST_SIZE 19
++
+
+ char *eol = "\n";
+ NAS *naslist;
+@@ -301,7 +305,8 @@
+ return tmp;
+ }
+ if (strncmp(tty, "cu", 2) == 0) {
+- return tmp + 2;
++ sprintf(tmp, "%.15s", tty + 2);
++ return tmp;
+ }
+ return "??";
+ }
+@@ -363,6 +368,8 @@
+ */
+ int main(int argc, char **argv)
+ {
++ struct winsize ws;
++ int extra_width = 0;
+ FILE *fp;
+ struct radutmp rt;
+ struct utmp ut;
+@@ -378,6 +385,11 @@
+ char *p, *q, *portind;
+ int c, portno;
+
++ ioctl(0, TIOCGWINSZ, &ws);
++ if (ws.ws_col >= 80) {
++ extra_width = ws.ws_col - 80;
++ }
++
+ while((c = getopt(argc, argv, "Dflhnsipcr")) != EOF) switch(c) {
+ case 'D':
+ use_dns = 0;
+@@ -469,14 +481,17 @@
+ while(fread(&ut, sizeof(ut), 1, fp) == 1) {
+ #ifdef USER_PROCESS
+ if (ut.ut_user[0] && ut.ut_line[0] &&
+- ut.ut_type == USER_PROCESS) {
++ ut.ut_type == USER_PROCESS)
+ #else
+- if (ut.ut_user[0] && ut.ut_line[0]) {
++ if (ut.ut_user[0] && ut.ut_line[0])
+ #endif
+- if (showname)
++ {
++ strncpy(inbuf, ut.ut_name, UT_NAMESIZE);
++ inbuf[UT_NAMESIZE] = '\0';
++ if (showname)
+ printf((rawoutput == 0? ufmt1: ufmt1r),
+- ut.ut_name,
+- fullname(ut.ut_name),
++ inbuf,
++ fullname(inbuf),
+ "shell",
+ ttyshort(ut.ut_line),
+ #ifdef __svr4__
+@@ -485,10 +500,11 @@
+ dotime(ut.ut_time),
+ #endif
+ ut.ut_host,
++ FMT1_HOST_SIZE + extra_width,
+ myname, eol);
+ else
+ printf((rawoutput==0? ufmt2:ufmt2r),
+- ut.ut_name,
++ inbuf,
+ ttyshort(ut.ut_line),
+ "shell",
+ #ifdef __svr4__
+@@ -497,6 +513,7 @@
+ dotime(ut.ut_time),
+ #endif
+ ut.ut_host,
++ FMT2_HOST_SIZE + extra_width,
+ myname, eol);
+ }
+ }
+@@ -541,6 +558,7 @@
+ portind, portno,
+ dotime(rt.time),
+ nasname(ntohl(rt.nas_address)),
++ FMT1_HOST_SIZE + extra_width,
+ hostname(rt.framed_address), eol);
+ else
+ printf((rawoutput == 0? rfmt2: rfmt2r),
+@@ -549,6 +567,7 @@
+ proto(rt.proto, rt.porttype),
+ dotime(rt.time),
+ nasname(ntohl(rt.nas_address)),
++ FMT2_HOST_SIZE + extra_width,
+ hostname(rt.framed_address), eol);
+ }
+ }
diff --git a/net/radiusd-cistron/pkg/DESCR b/net/radiusd-cistron/pkg/DESCR
new file mode 100644
index 00000000000..e75cfa5f913
--- /dev/null
+++ b/net/radiusd-cistron/pkg/DESCR
@@ -0,0 +1,4 @@
+This is the Cistron RADIUS daemon. Radiusd is a daemon that handles
+remote authentication requests and accounting for RADIUS clients. The
+clients may be terminal servers, Network Access Servers or other
+RADIUS servers.
diff --git a/net/radiusd-cistron/pkg/PLIST b/net/radiusd-cistron/pkg/PLIST
new file mode 100644
index 00000000000..8a0f21df67e
--- /dev/null
+++ b/net/radiusd-cistron/pkg/PLIST
@@ -0,0 +1,51 @@
+@comment $NetBSD: PLIST,v 1.1 2001/10/11 09:57:21 martti Exp $
+bin/radlast
+bin/radtest
+bin/raduse
+bin/radwho
+bin/radzap
+etc/raddb/clients.sample
+etc/raddb/dictionary
+etc/raddb/dictionary.ascend
+etc/raddb/dictionary.cisco
+etc/raddb/dictionary.compat
+etc/raddb/dictionary.livingston
+etc/raddb/dictionary.shiva
+etc/raddb/dictionary.tunnel
+etc/raddb/dictionary.usr
+etc/raddb/dictionary.versanet
+etc/raddb/hints.sample
+etc/raddb/huntgroups.sample
+etc/raddb/naslist.sample
+etc/raddb/naspasswd.sample
+etc/raddb/realms.sample
+etc/raddb/users.sample
+man/man1/radlast.1
+man/man1/radtest.1
+man/man1/raduse.1
+man/man1/radwho.1
+man/man1/radzap.1
+man/man5/clients.5rad
+man/man5/naslist.5rad
+man/man8/radiusd.8
+man/man8/radwatch.8
+sbin/checkrad
+sbin/radiusd
+sbin/radwatch
+share/doc/radiusd-cistron/COPYRIGHT.Cistron
+share/doc/radiusd-cistron/COPYRIGHT.Livingston
+share/doc/radiusd-cistron/ChangeLog
+share/doc/radiusd-cistron/INSTALL.OLD
+share/doc/radiusd-cistron/README
+share/doc/radiusd-cistron/README.Y2K
+share/doc/radiusd-cistron/README.cisco
+share/doc/radiusd-cistron/README.pam
+share/doc/radiusd-cistron/README.proxy
+share/doc/radiusd-cistron/README.simul
+share/doc/radiusd-cistron/README.usersfile
+etc/rc.d/radiusd.sh
+@dirrm etc/raddb
+@dirrm share/doc/radiusd-cistron
+@unexec rm -f /var/log/radius.log
+@unexec rm -f /var/run/radiusd.pid
+@unexec echo "Leaving /var/run/radutmp, /var/log/radwtmp and /var/log/radacct alone."