aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorohauer <ohauer@FreeBSD.org>2011-09-21 06:04:09 +0800
committerohauer <ohauer@FreeBSD.org>2011-09-21 06:04:09 +0800
commit4aa6f3e4cce8798f5b5805b374fdd62df2cabc8b (patch)
tree8f4b57fe852af298084e54d4cdf195d6fe563bc2 /net
parentffded6f8792eeb81886d983aff58f2d6f9423a3e (diff)
downloadfreebsd-ports-graphics-4aa6f3e4cce8798f5b5805b374fdd62df2cabc8b.tar.gz
freebsd-ports-graphics-4aa6f3e4cce8798f5b5805b374fdd62df2cabc8b.tar.zst
freebsd-ports-graphics-4aa6f3e4cce8798f5b5805b374fdd62df2cabc8b.zip
- fix build on FreeBSD9
( "struct utmp" was replaced with "struct utmpx" on FreeBSD-9 ) PR: ports/160264 Submitted by: ohauer Approved by: maintainer timeout
Diffstat (limited to 'net')
-rw-r--r--net/tac_plus-libradius/Makefile21
-rw-r--r--net/tac_plus-libradius/files/patch-Makefile55
-rw-r--r--net/tac_plus-libradius/files/patch-aa95
-rw-r--r--net/tac_plus-libradius/files/patch-ac19
-rw-r--r--net/tac_plus-libradius/files/patch-ad27
-rw-r--r--net/tac_plus-libradius/files/patch-ae11
-rw-r--r--net/tac_plus-libradius/files/patch-af38
-rw-r--r--net/tac_plus-libradius/files/patch-ag20
-rw-r--r--net/tac_plus-libradius/files/patch-config.c (renamed from net/tac_plus-libradius/files/patch-ab)11
-rw-r--r--net/tac_plus-libradius/files/patch-db_null.c (renamed from net/tac_plus-libradius/files/patch-ah)4
-rw-r--r--net/tac_plus-libradius/files/patch-do_acct.c25
-rw-r--r--net/tac_plus-libradius/files/patch-parse.c23
-rw-r--r--net/tac_plus-libradius/files/patch-parse.h9
-rw-r--r--net/tac_plus-libradius/files/patch-pwlib.c34
-rw-r--r--net/tac_plus-libradius/files/patch-tac_plus.h40
-rw-r--r--net/tac_plus-libradius/files/tac_plus.in36
-rw-r--r--net/tac_plus-libradius/files/tac_plus.sh20
-rw-r--r--net/tac_plus-libradius/pkg-plist7
18 files changed, 242 insertions, 253 deletions
diff --git a/net/tac_plus-libradius/Makefile b/net/tac_plus-libradius/Makefile
index 052663e78f6..e93bdcc8576 100644
--- a/net/tac_plus-libradius/Makefile
+++ b/net/tac_plus-libradius/Makefile
@@ -6,6 +6,7 @@
PORTNAME= tac_plus-libradius
PORTVERSION= 5.0.0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.portal-to-web.de/tacacs/ \
http://www.santel.lu/projects/ldap-tacacs/
@@ -15,6 +16,10 @@ DISTFILES= tac_plus.F5.0.0.alpha.tar.gz \
MAINTAINER= gremlin@portal-to-web.de
COMMENT= The www.gazi.edu.tr tacacs+ Daemon with pam and libradius support
+USE_RC_SUBR= tac_plus
+
+CONFLICTS= ru-tac+ia-[0-9]* tac_plus-[0-9]*
+
WRKPREFIX= tac_plus.F5.0.0.alpha
WRKSRC= ${WRKDIR}/${WRKPREFIX}/
@@ -25,19 +30,11 @@ MAN1= tac_plus.1
.include <bsd.port.pre.mk>
-.if ${OSVERSION} > 900007
-BROKEN= fails to build with new utmpx
-.endif
-
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/tac_plus ${PREFIX}/sbin
- ${INSTALL_MAN} ${WRKSRC}/tac_plus.1 ${PREFIX}/man/man1/tac_plus.1
+ @${INSTALL_PROGRAM} ${WRKSRC}/tac_plus ${PREFIX}/sbin
+ @${INSTALL_MAN} ${WRKSRC}/tac_plus.1 ${PREFIX}/man/man1/tac_plus.1
@${MKDIR} ${PREFIX}/etc/tac_plus
- ${INSTALL_DATA} ${WRKSRC}/tac_plus.cfg ${PREFIX}/etc/tac_plus/
- ${INSTALL_DATA} ${WRKSRC}/radius.example ${PREFIX}/etc/tac_plus/
- @if [ ! -f ${PREFIX}/etc/rc.d/tac_plus.sh ]; then \
- ${ECHO} "Installing ${PREFIX}/etc/rc.d/tac_plus.sh startup file."; \
- ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/tac_plus.sh ${PREFIX}/etc/rc.d/tac_plus.sh.sample; \
- fi
+ @${INSTALL_DATA} -m 640 ${WRKSRC}/tac_plus.cfg ${PREFIX}/etc/tac_plus/tac_plus.cfg.sample
+ @${INSTALL_DATA} -m 640 ${WRKSRC}/radius.example ${PREFIX}/etc/tac_plus/radius.cfg.sample
.include <bsd.port.post.mk>
diff --git a/net/tac_plus-libradius/files/patch-Makefile b/net/tac_plus-libradius/files/patch-Makefile
new file mode 100644
index 00000000000..932f60b7abc
--- /dev/null
+++ b/net/tac_plus-libradius/files/patch-Makefile
@@ -0,0 +1,55 @@
+--- ./Makefile.orig 2001-03-21 09:33:15.000000000 +0100
++++ ./Makefile 2011-08-29 00:31:55.000000000 +0200
+@@ -33,9 +33,9 @@
+ CPPFLAGS =
+ CFLAGS = $(CPPFLAGS) -g -O2
+ LDFLAGS =
+-OSLIBS = -lldap -lldap -lc -lcrypt -lresolv -lnsl -llber -lcrypt -lc
+-DEFINES = -DUSE_LDAP
+-OS= -DLINUX -DGLIBC
++OSLIBS = -lc -lcrypt -lcrypt -lc -I/usr/local/include -L/usr/local/lib -lradius
++DEFINES = -DUSE_RADIUS
++OS=
+ # For AIX
+ # See /usr/lpp/bos/bsdport on your system for details of how to define bsdcc
+ # CC=bsdcc
+@@ -52,7 +52,7 @@
+ #OSLIBS=-lsocket -lnsl
+
+ # For FreeBSD
+-# OS=-DFREEBSD
++OS=-DFREEBSD
+ # You may also need to add:
+ # OSLIBS=-lcrypt
+ # NOTE: If you want your password encryption to be compatible with
+@@ -108,7 +108,8 @@
+ # End of customisable section of Makefile
+ #
+
+-CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB)
++
++CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB) -I/usr/local/include -L/usr/local/lib
+
+ HFILES = expire.h parse.h regmagic.h md5.h regexp.h tac_plus.h
+
+@@ -117,7 +118,9 @@
+ packet.c report.c sendauth.c tac_plus.c utils.c pw.c hash.c \
+ parse.c regexp.c programs.c enable.c pwlib.c default_fn.c \
+ skey_fn.c default_v0_fn.c sendpass.c maxsess.c tac_pam.c \
+- db.c db_null.c db_mysql.c ldap.c
++ db.c db_null.c db_mysql.c radius.c
++
++# add ldap.c and also define USE_LDAP to enable LDAP support
+
+ OBJS = $(SRCS:.c=.o)
+
+@@ -154,7 +157,8 @@
+ install:
+ cp tac_plus ${prefix}/sbin
+ cp tac_plus.1 ${prefix}/man/man8/tac_plus.8
+- cp tac_plus.cfg /etc
++ cp tac_plus.cfg ${prefix}/etc/tac_plus
++ cp radius.example ${prefix}/etc/tac_plus
+
+ depend:
+ makedepend $(CFLAGS) $(SRCS)
diff --git a/net/tac_plus-libradius/files/patch-aa b/net/tac_plus-libradius/files/patch-aa
deleted file mode 100644
index 1baeb705662..00000000000
--- a/net/tac_plus-libradius/files/patch-aa
+++ /dev/null
@@ -1,95 +0,0 @@
-*** Makefile Wed Mar 21 09:33:15 2001
---- ../pkg/tac_plus.new/Makefile Mon Jan 21 15:51:28 2002
-***************
-*** 33,41 ****
- CPPFLAGS =
- CFLAGS = $(CPPFLAGS) -g -O2
- LDFLAGS =
-! OSLIBS = -lldap -lldap -lc -lcrypt -lresolv -lnsl -llber -lcrypt -lc
-! DEFINES = -DUSE_LDAP
-! OS= -DLINUX -DGLIBC
- # For AIX
- # See /usr/lpp/bos/bsdport on your system for details of how to define bsdcc
- # CC=bsdcc
---- 33,41 ----
- CPPFLAGS =
- CFLAGS = $(CPPFLAGS) -g -O2
- LDFLAGS =
-! OSLIBS = -lc -lcrypt -lcrypt -lc -I/usr/local/include -L/usr/local/lib -lradius
-! DEFINES = -DUSE_RADIUS
-! OS=
- # For AIX
- # See /usr/lpp/bos/bsdport on your system for details of how to define bsdcc
- # CC=bsdcc
-***************
-*** 52,58 ****
- #OSLIBS=-lsocket -lnsl
-
- # For FreeBSD
-! # OS=-DFREEBSD
- # You may also need to add:
- # OSLIBS=-lcrypt
- # NOTE: If you want your password encryption to be compatible with
---- 52,58 ----
- #OSLIBS=-lsocket -lnsl
-
- # For FreeBSD
-! OS=-DFREEBSD
- # You may also need to add:
- # OSLIBS=-lcrypt
- # NOTE: If you want your password encryption to be compatible with
-***************
-*** 108,114 ****
- # End of customisable section of Makefile
- #
-
-! CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB)
-
- HFILES = expire.h parse.h regmagic.h md5.h regexp.h tac_plus.h
-
---- 108,115 ----
- # End of customisable section of Makefile
- #
-
-!
-! CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB) -I/usr/local/include -L/usr/local/lib
-
- HFILES = expire.h parse.h regmagic.h md5.h regexp.h tac_plus.h
-
-***************
-*** 117,123 ****
- packet.c report.c sendauth.c tac_plus.c utils.c pw.c hash.c \
- parse.c regexp.c programs.c enable.c pwlib.c default_fn.c \
- skey_fn.c default_v0_fn.c sendpass.c maxsess.c tac_pam.c \
-! db.c db_null.c db_mysql.c ldap.c
-
- OBJS = $(SRCS:.c=.o)
-
---- 118,126 ----
- packet.c report.c sendauth.c tac_plus.c utils.c pw.c hash.c \
- parse.c regexp.c programs.c enable.c pwlib.c default_fn.c \
- skey_fn.c default_v0_fn.c sendpass.c maxsess.c tac_pam.c \
-! db.c db_null.c db_mysql.c radius.c
-!
-! # add ldap.c and also define USE_LDAP to enable LDAP support
-
- OBJS = $(SRCS:.c=.o)
-
-***************
-*** 154,160 ****
- install:
- cp tac_plus ${prefix}/sbin
- cp tac_plus.1 ${prefix}/man/man8/tac_plus.8
-! cp tac_plus.cfg /etc
-
- depend:
- makedepend $(CFLAGS) $(SRCS)
---- 157,164 ----
- install:
- cp tac_plus ${prefix}/sbin
- cp tac_plus.1 ${prefix}/man/man8/tac_plus.8
-! cp tac_plus.cfg ${prefix}/etc/tac_plus
-! cp radius.example ${prefix}/etc/tac_plus
-
- depend:
- makedepend $(CFLAGS) $(SRCS)
diff --git a/net/tac_plus-libradius/files/patch-ac b/net/tac_plus-libradius/files/patch-ac
deleted file mode 100644
index 851f6c8201e..00000000000
--- a/net/tac_plus-libradius/files/patch-ac
+++ /dev/null
@@ -1,19 +0,0 @@
-*** do_acct.c Mon Dec 18 17:58:02 2000
---- do_acct.c Sat Jan 19 15:22:46 2002
-***************
-*** 159,165 ****
- #endif
- entry.ut_time = utime;
-
-! wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND | O_SYNC, 0644);
- if (wtmpfd < 0) {
- report(LOG_ERR, "Can't open wtmp file %s -- %s",
- wtmpfile, sys_errlist[errno]);
---- 159,165 ----
- #endif
- entry.ut_time = utime;
-
-! wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND , 0644);
- if (wtmpfd < 0) {
- report(LOG_ERR, "Can't open wtmp file %s -- %s",
- wtmpfile, sys_errlist[errno]);
diff --git a/net/tac_plus-libradius/files/patch-ad b/net/tac_plus-libradius/files/patch-ad
deleted file mode 100644
index ae996bbcb08..00000000000
--- a/net/tac_plus-libradius/files/patch-ad
+++ /dev/null
@@ -1,27 +0,0 @@
-*** parse.c Fri Mar 16 09:14:21 2001
---- ../../tac_plus.F5.0.0.alpha/parse.c Sun Jan 20 19:46:42 2002
-***************
-*** 99,104 ****
---- 99,107 ----
- #ifdef USE_LDAP
- declare ("ldap", S_ldap);
- #endif
-+ #ifdef USE_RADIUS
-+ declare ("radius",S_radius);
-+ #endif
- declare("member", S_member);
- declare("message", S_message);
- declare("name", S_name);
-***************
-*** 177,182 ****
---- 180,189 ----
- #ifdef USE_LDAP
- case S_ldap:
- return ("ldap");
-+ #endif
-+ #ifdef USE_RADIUS
-+ case S_radius:
-+ return ("radius");
- #endif
- case S_expires:
- return ("expires");
diff --git a/net/tac_plus-libradius/files/patch-ae b/net/tac_plus-libradius/files/patch-ae
deleted file mode 100644
index 26d25829f14..00000000000
--- a/net/tac_plus-libradius/files/patch-ae
+++ /dev/null
@@ -1,11 +0,0 @@
-*** parse.h Fri Mar 16 09:18:44 2001
---- ../../tac_plus.F5.0.0.alpha/parse.h Sat Jan 19 23:55:09 2002
-***************
-*** 85,87 ****
---- 85,90 ----
- #ifdef USE_LDAP
- #define S_ldap 46
- #endif /* LDAP */
-+ #ifdef USE_RADIUS
-+ #define S_radius 47
-+ #endif /* radius */
diff --git a/net/tac_plus-libradius/files/patch-af b/net/tac_plus-libradius/files/patch-af
deleted file mode 100644
index 1fc87d78217..00000000000
--- a/net/tac_plus-libradius/files/patch-af
+++ /dev/null
@@ -1,38 +0,0 @@
-*** pwlib.c Fri Mar 16 14:42:54 2001
---- ../../tac_plus.F5.0.0.alpha/pwlib.c Sat Jan 19 23:22:07 2002
-***************
-*** 40,45 ****
---- 40,49 ----
- #include "ldap.h"
- #endif /* LDAP */
-
-+ #ifdef USE_RADIUS
-+ #include "radius.h"
-+ #endif
-+
- /* Generic password verification routines for des, file and cleartext
- passwords */
-
-***************
-*** 166,171 ****
---- 170,189 ----
- #ifdef USE_LDAP
- case (S_ldap):
- if (ldap_verify(name, passwd, file)==1) {
-+ data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
-+ return (0);
-+ } else {
-+ data->status = TAC_PLUS_AUTHEN_STATUS_PASS;
-+ }
-+ exp_date = NULL;
-+ set_expiration_status(exp_date, data);
-+ return (data->status == TAC_PLUS_AUTHEN_STATUS_PASS);
-+ break;
-+ #endif
-+
-+ #ifdef USE_RADIUS
-+ case (S_radius):
-+ if (radius_verify(name,passwd,file)==1) {
- data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
- return (0);
- } else {
diff --git a/net/tac_plus-libradius/files/patch-ag b/net/tac_plus-libradius/files/patch-ag
deleted file mode 100644
index e2aeb5dbac4..00000000000
--- a/net/tac_plus-libradius/files/patch-ag
+++ /dev/null
@@ -1,20 +0,0 @@
---- tac_plus.h.orig Fri Feb 27 09:48:32 2004
-+++ tac_plus.h Fri Feb 27 09:49:16 2004
-@@ -70,7 +70,7 @@
- */
- /* #define REARMSIGNAL */
-
--#define VERSION "F4.0.3.alpha.v7(DB&PAM support)"
-+#define VERSION "F4.0.3.alpha.v7(DB,PAM&libradius support - incl. mmersbers patches!)"
-
- /*
- * System definitions.
-@@ -681,7 +681,7 @@
- extern char *cfg_get_global_secret();
- #ifdef USE_PAM
- extern char *cfg_get_pam_service();
--#endif / *PAM */
-+#endif /* PAM */
- extern void cfg_clean_config();
- extern char *cfg_nodestring();
-
diff --git a/net/tac_plus-libradius/files/patch-ab b/net/tac_plus-libradius/files/patch-config.c
index 1ddb87ba27d..1b6ac80c03f 100644
--- a/net/tac_plus-libradius/files/patch-ab
+++ b/net/tac_plus-libradius/files/patch-config.c
@@ -1,4 +1,5 @@
-Index: config.c
+--- ./config.c.orig 2001-03-16 10:04:27.000000000 +0100
++++ ./config.c 2011-08-29 00:31:55.000000000 +0200
@@ -109,7 +109,7 @@
static int no_user_dflt = 0; /* default if user doesn't exist */
static char *authen_default = NULL; /* top level authentication default */
@@ -8,16 +9,16 @@ Index: config.c
/* A host definition structure. Currently unused, but when we start
configuring host-specific information e.g. per-host keys, this is
-@@ -602,6 +602,12 @@
- fprintf(stderr,"sym_code=%i, ldap\n",sym_code);
+@@ -603,6 +603,12 @@
authen_default_method = sym_code;
break;
-+#endif
+ #endif
+#ifdef USE_RADIUS
+ case S_radius:
+ fprintf(stderr,"sym_code=%i, radius\n",sym_code);
+ authen_default_method = sym_code;
+ break;
- #endif
++#endif
+ default:
diff --git a/net/tac_plus-libradius/files/patch-ah b/net/tac_plus-libradius/files/patch-db_null.c
index 9bcd9db9840..5f335fdb561 100644
--- a/net/tac_plus-libradius/files/patch-ah
+++ b/net/tac_plus-libradius/files/patch-db_null.c
@@ -1,5 +1,5 @@
---- db_null.c.orig Fri Feb 27 09:49:40 2004
-+++ db_null.c Fri Feb 27 09:51:14 2004
+--- ./db_null.c.orig 2000-12-18 17:58:02.000000000 +0100
++++ ./db_null.c 2011-08-29 00:31:55.000000000 +0200
@@ -48,9 +48,7 @@
char *a_username;
char *elapsed_time;char *bytes_in;char *bytes_out;
diff --git a/net/tac_plus-libradius/files/patch-do_acct.c b/net/tac_plus-libradius/files/patch-do_acct.c
new file mode 100644
index 00000000000..ffa659850d9
--- /dev/null
+++ b/net/tac_plus-libradius/files/patch-do_acct.c
@@ -0,0 +1,25 @@
+--- ./do_acct.c.orig 2000-12-18 17:58:02.000000000 +0100
++++ ./do_acct.c 2011-08-29 00:31:55.000000000 +0200
+@@ -21,6 +21,13 @@
+
+ static int acctfd = 0;
+
++#if defined(__FreeBSD__) && __FreeBSD_version >= 900007
++# define utmp utmpx
++# define ut_time ut_tv.tv_sec
++# define ut_name ut_user
++#endif
++
++
+ /* Make a acct entry into the accounting file for accounting.
+ Return 1 on error */
+
+@@ -159,7 +166,7 @@
+ #endif
+ entry.ut_time = utime;
+
+- wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND | O_SYNC, 0644);
++ wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND , 0644);
+ if (wtmpfd < 0) {
+ report(LOG_ERR, "Can't open wtmp file %s -- %s",
+ wtmpfile, sys_errlist[errno]);
diff --git a/net/tac_plus-libradius/files/patch-parse.c b/net/tac_plus-libradius/files/patch-parse.c
new file mode 100644
index 00000000000..e48bfe1218d
--- /dev/null
+++ b/net/tac_plus-libradius/files/patch-parse.c
@@ -0,0 +1,23 @@
+--- ./parse.c.orig 2001-03-16 09:14:21.000000000 +0100
++++ ./parse.c 2011-08-29 00:31:55.000000000 +0200
+@@ -99,6 +99,9 @@
+ #ifdef USE_LDAP
+ declare ("ldap", S_ldap);
+ #endif
++#ifdef USE_RADIUS
++ declare ("radius",S_radius);
++#endif
+ declare("member", S_member);
+ declare("message", S_message);
+ declare("name", S_name);
+@@ -178,6 +181,10 @@
+ case S_ldap:
+ return ("ldap");
+ #endif
++#ifdef USE_RADIUS
++ case S_radius:
++ return ("radius");
++#endif
+ case S_expires:
+ return ("expires");
+ case S_after:
diff --git a/net/tac_plus-libradius/files/patch-parse.h b/net/tac_plus-libradius/files/patch-parse.h
new file mode 100644
index 00000000000..c179972d6db
--- /dev/null
+++ b/net/tac_plus-libradius/files/patch-parse.h
@@ -0,0 +1,9 @@
+--- ./parse.h.orig 2001-03-16 09:18:44.000000000 +0100
++++ ./parse.h 2011-08-29 00:31:55.000000000 +0200
+@@ -85,3 +85,6 @@
+ #ifdef USE_LDAP
+ #define S_ldap 46
+ #endif /* LDAP */
++#ifdef USE_RADIUS
++#define S_radius 47
++#endif /* radius */
diff --git a/net/tac_plus-libradius/files/patch-pwlib.c b/net/tac_plus-libradius/files/patch-pwlib.c
new file mode 100644
index 00000000000..eb5bc3389cb
--- /dev/null
+++ b/net/tac_plus-libradius/files/patch-pwlib.c
@@ -0,0 +1,34 @@
+--- ./pwlib.c.orig 2001-03-16 14:42:54.000000000 +0100
++++ ./pwlib.c 2011-08-29 00:31:55.000000000 +0200
+@@ -40,6 +40,10 @@
+ #include "ldap.h"
+ #endif /* LDAP */
+
++#ifdef USE_RADIUS
++#include "radius.h"
++#endif
++
+ /* Generic password verification routines for des, file and cleartext
+ passwords */
+
+@@ -177,6 +181,20 @@
+ break;
+ #endif
+
++#ifdef USE_RADIUS
++ case (S_radius):
++ if (radius_verify(name,passwd,file)==1) {
++ data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
++ return (0);
++ } else {
++ data->status = TAC_PLUS_AUTHEN_STATUS_PASS;
++ }
++ exp_date = NULL;
++ set_expiration_status(exp_date, data);
++ return (data->status == TAC_PLUS_AUTHEN_STATUS_PASS);
++ break;
++#endif
++
+
+ #ifdef USE_PAM
+ case (S_pam):
diff --git a/net/tac_plus-libradius/files/patch-tac_plus.h b/net/tac_plus-libradius/files/patch-tac_plus.h
new file mode 100644
index 00000000000..a675cce6a70
--- /dev/null
+++ b/net/tac_plus-libradius/files/patch-tac_plus.h
@@ -0,0 +1,40 @@
+--- ./tac_plus.h.orig 2000-12-18 17:58:02.000000000 +0100
++++ ./tac_plus.h 2011-08-29 00:31:55.000000000 +0200
+@@ -70,7 +70,7 @@
+ */
+ /* #define REARMSIGNAL */
+
+-#define VERSION "F4.0.3.alpha.v7(DB&PAM support)"
++#define VERSION "F4.0.3.alpha.v7(DB,PAM&libradius support - incl. mmersbers patches!)"
+
+ /*
+ * System definitions.
+@@ -154,6 +154,7 @@
+ #endif /* MSCHAP */
+
+ #include <string.h>
++#include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+@@ -172,7 +173,11 @@
+ #include <sys/syslog.h>
+ #endif
+
++#if __FreeBSD_version >= 900007
++#include <utmpx.h>
++#else
+ #include <utmp.h>
++#endif
+
+ #include <unistd.h>
+
+@@ -681,7 +686,7 @@
+ extern char *cfg_get_global_secret();
+ #ifdef USE_PAM
+ extern char *cfg_get_pam_service();
+-#endif / *PAM */
++#endif /* PAM */
+ extern void cfg_clean_config();
+ extern char *cfg_nodestring();
+
diff --git a/net/tac_plus-libradius/files/tac_plus.in b/net/tac_plus-libradius/files/tac_plus.in
new file mode 100644
index 00000000000..16effd09a74
--- /dev/null
+++ b/net/tac_plus-libradius/files/tac_plus.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: tac_plus
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Define these tac_plus_* variables in
+# /etc/rc.conf or
+# /etc/rc.conf.local
+#
+# tac_plus_enabe="YES"
+# tac_plus_cfg="%%PREFIX%%/etc/tac_plus/tac_plus.cfg"
+# tac_plus_flags="-d 1" # see man (1) tac_plus
+#
+
+. /etc/rc.subr
+
+name="tac_plus"
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/tac_plus
+pidfile=/var/run/tac_plus.pid
+tac_plus_enable=${tac_plus_enable:-"NO"}
+tac_plus_flags=${tac_plus_flags:-"-d 1"}
+tac_plus_configfile=${tac_plus_configfile:-"%%PREFIX%%/etc/tac_plus/tac_plus.cfg"}
+
+load_rc_config $name
+
+required_files=${tac_plus_configfile}
+tac_plus_flags="-C ${tac_plus_configfile} ${tac_plus_flags}"
+
+run_rc_command "$1"
diff --git a/net/tac_plus-libradius/files/tac_plus.sh b/net/tac_plus-libradius/files/tac_plus.sh
deleted file mode 100644
index 5494b7c3ff9..00000000000
--- a/net/tac_plus-libradius/files/tac_plus.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
-
-case "$1" in
-start)
- [ -x ${PREFIX}/sbin/tac_plus -a -f ${PREFIX}/etc/tac_plus/tac_plus.conf ] && ${PREFIX}/sbin/tac_plus -C ${PREFIX}/etc/tac_plus/tac_plus.conf -d 1 && echo -n ' tac_plus'
- ;;
-stop)
- killall tac_plus && echo -n ' tac_plus'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
-
-exit 0
diff --git a/net/tac_plus-libradius/pkg-plist b/net/tac_plus-libradius/pkg-plist
index 7b3c6f32d5d..7378923f757 100644
--- a/net/tac_plus-libradius/pkg-plist
+++ b/net/tac_plus-libradius/pkg-plist
@@ -1,5 +1,4 @@
+etc/tac_plus/radius.cfg.sample
+etc/tac_plus/tac_plus.cfg.sample
sbin/tac_plus
-etc/rc.d/tac_plus.sh.sample
-etc/tac_plus/radius.example
-etc/tac_plus/tac_plus.cfg
-@dirrm etc/tac_plus
+@dirrmtry etc/tac_plus