View | Details | Raw Unified | Return to bug 160264
Collapse All | Expand All

(-)Makefile (-12 / +8 lines)
Lines 15-20 Link Here
15
MAINTAINER=	gremlin@portal-to-web.de
15
MAINTAINER=	gremlin@portal-to-web.de
16
COMMENT=	The www.gazi.edu.tr tacacs+ Daemon with pam and libradius support
16
COMMENT=	The www.gazi.edu.tr tacacs+ Daemon with pam and libradius support
17
17
18
USE_RC_SUBR=	tac_plus
19
20
CONFLICTS=	ru-tac+ia-[0-9]* tac_plus-[0-9]*
21
18
WRKPREFIX=	tac_plus.F5.0.0.alpha
22
WRKPREFIX=	tac_plus.F5.0.0.alpha
19
WRKSRC=		${WRKDIR}/${WRKPREFIX}/
23
WRKSRC=		${WRKDIR}/${WRKPREFIX}/
20
24
Lines 25-43 Link Here
25
29
26
.include <bsd.port.pre.mk>
30
.include <bsd.port.pre.mk>
27
31
28
.if ${OSVERSION} > 900007
29
BROKEN=		fails to build with new utmpx
30
.endif
31
32
do-install:
32
do-install:
33
	${INSTALL_PROGRAM} ${WRKSRC}/tac_plus ${PREFIX}/sbin
33
	@${INSTALL_PROGRAM} ${WRKSRC}/tac_plus ${PREFIX}/sbin
34
	${INSTALL_MAN} ${WRKSRC}/tac_plus.1 ${PREFIX}/man/man1/tac_plus.1
34
	@${INSTALL_MAN} ${WRKSRC}/tac_plus.1 ${PREFIX}/man/man1/tac_plus.1
35
	@${MKDIR} ${PREFIX}/etc/tac_plus
35
	@${MKDIR} ${PREFIX}/etc/tac_plus
36
	${INSTALL_DATA} ${WRKSRC}/tac_plus.cfg ${PREFIX}/etc/tac_plus/
36
	@${INSTALL_DATA} -m 640 ${WRKSRC}/tac_plus.cfg ${PREFIX}/etc/tac_plus/tac_plus.cfg.sample
37
	${INSTALL_DATA} ${WRKSRC}/radius.example ${PREFIX}/etc/tac_plus/
37
	@${INSTALL_DATA} -m 640 ${WRKSRC}/radius.example ${PREFIX}/etc/tac_plus/radius.cfg.sample
38
	@if [ ! -f ${PREFIX}/etc/rc.d/tac_plus.sh ]; then \
39
		${ECHO} "Installing ${PREFIX}/etc/rc.d/tac_plus.sh startup file."; \
40
		${INSTALL_SCRIPT} -m 751 ${FILESDIR}/tac_plus.sh ${PREFIX}/etc/rc.d/tac_plus.sh.sample; \
41
	fi
42
38
43
.include <bsd.port.post.mk>
39
.include <bsd.port.post.mk>
(-)pkg-plist (-4 / +3 lines)
Lines 1-5 Link Here
1
etc/tac_plus/radius.cfg.sample
2
etc/tac_plus/tac_plus.cfg.sample
1
sbin/tac_plus
3
sbin/tac_plus
2
etc/rc.d/tac_plus.sh.sample
4
@dirrmtry etc/tac_plus
3
etc/tac_plus/radius.example
4
etc/tac_plus/tac_plus.cfg
5
@dirrm etc/tac_plus
(-)files/patch-Makefile (+55 lines)
Added Link Here
1
--- ./Makefile.orig	2001-03-21 09:33:15.000000000 +0100
2
+++ ./Makefile	2011-08-29 00:31:55.000000000 +0200
3
@@ -33,9 +33,9 @@
4
 CPPFLAGS = 
5
 CFLAGS = $(CPPFLAGS) -g -O2
6
 LDFLAGS = 
7
-OSLIBS = -lldap -lldap -lc -lcrypt -lresolv -lnsl -llber -lcrypt -lc 
8
-DEFINES = -DUSE_LDAP 
9
-OS= -DLINUX -DGLIBC
10
+OSLIBS = -lc -lcrypt -lcrypt -lc -I/usr/local/include -L/usr/local/lib -lradius
11
+DEFINES = -DUSE_RADIUS 
12
+OS= 
13
 # For AIX
14
 # See /usr/lpp/bos/bsdport on your system for details of how to define bsdcc
15
 # CC=bsdcc
16
@@ -52,7 +52,7 @@
17
 #OSLIBS=-lsocket -lnsl
18
 
19
 # For FreeBSD
20
-# OS=-DFREEBSD
21
+OS=-DFREEBSD
22
 # You may also need to add:
23
 # OSLIBS=-lcrypt
24
 # NOTE: If you want your password encryption to be compatible with
25
@@ -108,7 +108,8 @@
26
 # End of customisable section of Makefile
27
 #
28
 
29
-CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB)
30
+
31
+CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB) -I/usr/local/include -L/usr/local/lib
32
 
33
 HFILES = expire.h parse.h regmagic.h md5.h regexp.h tac_plus.h 
34
 
35
@@ -117,7 +118,9 @@
36
 	packet.c report.c sendauth.c tac_plus.c utils.c pw.c hash.c \
37
 	parse.c regexp.c programs.c enable.c pwlib.c default_fn.c \
38
 	skey_fn.c default_v0_fn.c sendpass.c maxsess.c tac_pam.c \
39
-	db.c db_null.c db_mysql.c ldap.c
40
+	db.c db_null.c db_mysql.c radius.c
41
+
42
+# add ldap.c and also define USE_LDAP to enable LDAP support
43
 
44
 OBJS = $(SRCS:.c=.o)
45
 
46
@@ -154,7 +157,8 @@
47
 install:
48
 	cp tac_plus ${prefix}/sbin
49
 	cp tac_plus.1 ${prefix}/man/man8/tac_plus.8
50
-	cp tac_plus.cfg /etc
51
+	cp tac_plus.cfg ${prefix}/etc/tac_plus
52
+	cp radius.example ${prefix}/etc/tac_plus
53
 
54
 depend:
55
 	makedepend $(CFLAGS) $(SRCS)
(-)files/patch-aa (-95 lines)
Removed Link Here
1
*** Makefile	Wed Mar 21 09:33:15 2001
2
--- ../pkg/tac_plus.new/Makefile	Mon Jan 21 15:51:28 2002
3
***************
4
*** 33,41 ****
5
  CPPFLAGS = 
6
  CFLAGS = $(CPPFLAGS) -g -O2
7
  LDFLAGS = 
8
! OSLIBS = -lldap -lldap -lc -lcrypt -lresolv -lnsl -llber -lcrypt -lc 
9
! DEFINES = -DUSE_LDAP 
10
! OS= -DLINUX -DGLIBC
11
  # For AIX
12
  # See /usr/lpp/bos/bsdport on your system for details of how to define bsdcc
13
  # CC=bsdcc
14
--- 33,41 ----
15
  CPPFLAGS = 
16
  CFLAGS = $(CPPFLAGS) -g -O2
17
  LDFLAGS = 
18
! OSLIBS = -lc -lcrypt -lcrypt -lc -I/usr/local/include -L/usr/local/lib -lradius
19
! DEFINES = -DUSE_RADIUS 
20
! OS= 
21
  # For AIX
22
  # See /usr/lpp/bos/bsdport on your system for details of how to define bsdcc
23
  # CC=bsdcc
24
***************
25
*** 52,58 ****
26
  #OSLIBS=-lsocket -lnsl
27
  
28
  # For FreeBSD
29
! # OS=-DFREEBSD
30
  # You may also need to add:
31
  # OSLIBS=-lcrypt
32
  # NOTE: If you want your password encryption to be compatible with
33
--- 52,58 ----
34
  #OSLIBS=-lsocket -lnsl
35
  
36
  # For FreeBSD
37
! OS=-DFREEBSD
38
  # You may also need to add:
39
  # OSLIBS=-lcrypt
40
  # NOTE: If you want your password encryption to be compatible with
41
***************
42
*** 108,114 ****
43
  # End of customisable section of Makefile
44
  #
45
  
46
! CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB)
47
  
48
  HFILES = expire.h parse.h regmagic.h md5.h regexp.h tac_plus.h 
49
  
50
--- 108,115 ----
51
  # End of customisable section of Makefile
52
  #
53
  
54
! 
55
! CFLAGS = $(DEBUG) $(OPT_FLAGS) $(DEFINES) $(INCLUDES) $(FLAGS) $(OS) $(PIDFILE) $(LDFLAGS) $(DB) -I/usr/local/include -L/usr/local/lib
56
  
57
  HFILES = expire.h parse.h regmagic.h md5.h regexp.h tac_plus.h 
58
  
59
***************
60
*** 117,123 ****
61
  	packet.c report.c sendauth.c tac_plus.c utils.c pw.c hash.c \
62
  	parse.c regexp.c programs.c enable.c pwlib.c default_fn.c \
63
  	skey_fn.c default_v0_fn.c sendpass.c maxsess.c tac_pam.c \
64
! 	db.c db_null.c db_mysql.c ldap.c
65
  
66
  OBJS = $(SRCS:.c=.o)
67
  
68
--- 118,126 ----
69
  	packet.c report.c sendauth.c tac_plus.c utils.c pw.c hash.c \
70
  	parse.c regexp.c programs.c enable.c pwlib.c default_fn.c \
71
  	skey_fn.c default_v0_fn.c sendpass.c maxsess.c tac_pam.c \
72
! 	db.c db_null.c db_mysql.c radius.c
73
! 
74
! # add ldap.c and also define USE_LDAP to enable LDAP support
75
  
76
  OBJS = $(SRCS:.c=.o)
77
  
78
***************
79
*** 154,160 ****
80
  install:
81
  	cp tac_plus ${prefix}/sbin
82
  	cp tac_plus.1 ${prefix}/man/man8/tac_plus.8
83
! 	cp tac_plus.cfg /etc
84
  
85
  depend:
86
  	makedepend $(CFLAGS) $(SRCS)
87
--- 157,164 ----
88
  install:
89
  	cp tac_plus ${prefix}/sbin
90
  	cp tac_plus.1 ${prefix}/man/man8/tac_plus.8
91
! 	cp tac_plus.cfg ${prefix}/etc/tac_plus
92
! 	cp radius.example ${prefix}/etc/tac_plus
93
  
94
  depend:
95
  	makedepend $(CFLAGS) $(SRCS)
(-)files/patch-ab (-23 lines)
Removed Link Here
1
Index: config.c
2
@@ -109,7 +109,7 @@
3
 static int no_user_dflt = 0;	/* default if user doesn't exist */
4
 static char *authen_default = NULL;	/* top level authentication default */
5
 static int authen_default_method = 0; /*For method check */
6
-static char *nopasswd_str = "nopassword";
7
+char *nopasswd_str = "nopassword";
8
 
9
 /* A host definition structure. Currently unused, but when we start
10
    configuring host-specific information e.g. per-host keys, this is
11
@@ -602,6 +602,12 @@
12
 		fprintf(stderr,"sym_code=%i, ldap\n",sym_code);
13
 		authen_default_method = sym_code;
14
 		break;
15
+#endif
16
+#ifdef USE_RADIUS
17
+		case S_radius:
18
+		fprintf(stderr,"sym_code=%i, radius\n",sym_code);
19
+		authen_default_method = sym_code;
20
+                break;
21
 #endif
22
                 
23
  
(-)files/patch-ac (-19 lines)
Removed Link Here
1
*** do_acct.c	Mon Dec 18 17:58:02 2000
2
--- do_acct.c	Sat Jan 19 15:22:46 2002
3
***************
4
*** 159,165 ****
5
  #endif
6
      entry.ut_time = utime;
7
  
8
!     wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND | O_SYNC, 0644);	
9
      if (wtmpfd < 0) {
10
  	report(LOG_ERR, "Can't open wtmp file %s -- %s",
11
  	       wtmpfile, sys_errlist[errno]);
12
--- 159,165 ----
13
  #endif
14
      entry.ut_time = utime;
15
  
16
!     wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND , 0644);	
17
      if (wtmpfd < 0) {
18
  	report(LOG_ERR, "Can't open wtmp file %s -- %s",
19
  	       wtmpfile, sys_errlist[errno]);
(-)files/patch-ad (-27 lines)
Removed Link Here
1
*** parse.c	Fri Mar 16 09:14:21 2001
2
--- ../../tac_plus.F5.0.0.alpha/parse.c	Sun Jan 20 19:46:42 2002
3
***************
4
*** 99,104 ****
5
--- 99,107 ----
6
  #ifdef USE_LDAP
7
      declare ("ldap", S_ldap);
8
  #endif
9
+ #ifdef USE_RADIUS
10
+     declare ("radius",S_radius);
11
+ #endif
12
      declare("member", S_member);
13
      declare("message", S_message);
14
      declare("name", S_name);
15
***************
16
*** 177,182 ****
17
--- 180,189 ----
18
  #ifdef USE_LDAP
19
      case S_ldap:
20
        return ("ldap");
21
+ #endif
22
+ #ifdef USE_RADIUS
23
+     case S_radius:
24
+       return ("radius");
25
  #endif
26
     case S_expires:
27
  	return ("expires");
(-)files/patch-ae (-11 lines)
Removed Link Here
1
*** parse.h	Fri Mar 16 09:18:44 2001
2
--- ../../tac_plus.F5.0.0.alpha/parse.h	Sat Jan 19 23:55:09 2002
3
***************
4
*** 85,87 ****
5
--- 85,90 ----
6
  #ifdef USE_LDAP
7
  #define S_ldap            46
8
  #endif /* LDAP */
9
+ #ifdef USE_RADIUS
10
+ #define S_radius	  47
11
+ #endif /* radius */
(-)files/patch-af (-38 lines)
Removed Link Here
1
*** pwlib.c	Fri Mar 16 14:42:54 2001
2
--- ../../tac_plus.F5.0.0.alpha/pwlib.c	Sat Jan 19 23:22:07 2002
3
***************
4
*** 40,45 ****
5
--- 40,49 ----
6
  #include "ldap.h"
7
  #endif /* LDAP */
8
  
9
+ #ifdef USE_RADIUS
10
+ #include "radius.h"
11
+ #endif
12
+ 
13
  /* Generic password verification routines for des, file and cleartext
14
     passwords */
15
  
16
***************
17
*** 166,171 ****
18
--- 170,189 ----
19
  #ifdef USE_LDAP
20
  	case (S_ldap):
21
          if (ldap_verify(name, passwd, file)==1) {
22
+             data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
23
+             return (0);
24
+         } else {
25
+             data->status = TAC_PLUS_AUTHEN_STATUS_PASS;
26
+         }
27
+         exp_date = NULL;
28
+         set_expiration_status(exp_date, data);
29
+         return (data->status == TAC_PLUS_AUTHEN_STATUS_PASS);	 
30
+         break; 
31
+ #endif
32
+ 
33
+ #ifdef USE_RADIUS
34
+ 	case (S_radius):
35
+ 	if (radius_verify(name,passwd,file)==1) {
36
              data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
37
              return (0);
38
          } else {
(-)files/patch-ag (-20 lines)
Removed Link Here
1
--- tac_plus.h.orig	Fri Feb 27 09:48:32 2004
2
+++ tac_plus.h	Fri Feb 27 09:49:16 2004
3
@@ -70,7 +70,7 @@
4
  */
5
 /* #define REARMSIGNAL */
6
 
7
-#define VERSION "F4.0.3.alpha.v7(DB&PAM support)"
8
+#define VERSION "F4.0.3.alpha.v7(DB,PAM&libradius support - incl. mmersbers patches!)"
9
 
10
 /*
11
  * System definitions. 
12
@@ -681,7 +681,7 @@
13
 extern char *cfg_get_global_secret();
14
 #ifdef USE_PAM
15
 extern char *cfg_get_pam_service();
16
-#endif / *PAM */ 
17
+#endif /* PAM */ 
18
 extern void cfg_clean_config();
19
 extern char *cfg_nodestring();
20
 
(-)files/patch-ah (-13 lines)
Removed Link Here
1
--- db_null.c.orig	Fri Feb 27 09:49:40 2004
2
+++ db_null.c	Fri Feb 27 09:51:14 2004
3
@@ -48,9 +48,7 @@
4
 char *a_username;
5
 char *elapsed_time;char *bytes_in;char *bytes_out;
6
 {
7
-report(LOG_INFO,"Db accounting user=%s pass=%s host=%s 
8
-db_name=%s table=%s servern=%s clientn=%s username=%s et=%s bi=%s bo=%s",db_user,db_password,db_hostname,
9
-db_name,db_table,s_name,c_name,a_username,elapsed_time,bytes_in,bytes_out);
10
+report(LOG_INFO,"Db accounting user=%s pass=%s host=%s db_name=%s table=%s servern=%s clientn=%s username=%s et=%s bi=%s bo=%s",db_user,db_password,db_hostname, db_name,db_table,s_name,c_name,a_username,elapsed_time,bytes_in,bytes_out);
11
 return (1);
12
 }
13
 #endif
(-)files/patch-config.c (+24 lines)
Added Link Here
1
--- ./config.c.orig	2001-03-16 10:04:27.000000000 +0100
2
+++ ./config.c	2011-08-29 00:31:55.000000000 +0200
3
@@ -109,7 +109,7 @@
4
 static int no_user_dflt = 0;	/* default if user doesn't exist */
5
 static char *authen_default = NULL;	/* top level authentication default */
6
 static int authen_default_method = 0; /*For method check */
7
-static char *nopasswd_str = "nopassword";
8
+char *nopasswd_str = "nopassword";
9
 
10
 /* A host definition structure. Currently unused, but when we start
11
    configuring host-specific information e.g. per-host keys, this is
12
@@ -603,6 +603,12 @@
13
 		authen_default_method = sym_code;
14
 		break;
15
 #endif
16
+#ifdef USE_RADIUS
17
+		case S_radius:
18
+		fprintf(stderr,"sym_code=%i, radius\n",sym_code);
19
+		authen_default_method = sym_code;
20
+                break;
21
+#endif
22
                 
23
  
24
 		default:
(-)files/patch-db_null.c (+13 lines)
Added Link Here
1
--- ./db_null.c.orig	2000-12-18 17:58:02.000000000 +0100
2
+++ ./db_null.c	2011-08-29 00:31:55.000000000 +0200
3
@@ -48,9 +48,7 @@
4
 char *a_username;
5
 char *elapsed_time;char *bytes_in;char *bytes_out;
6
 {
7
-report(LOG_INFO,"Db accounting user=%s pass=%s host=%s 
8
-db_name=%s table=%s servern=%s clientn=%s username=%s et=%s bi=%s bo=%s",db_user,db_password,db_hostname,
9
-db_name,db_table,s_name,c_name,a_username,elapsed_time,bytes_in,bytes_out);
10
+report(LOG_INFO,"Db accounting user=%s pass=%s host=%s db_name=%s table=%s servern=%s clientn=%s username=%s et=%s bi=%s bo=%s",db_user,db_password,db_hostname, db_name,db_table,s_name,c_name,a_username,elapsed_time,bytes_in,bytes_out);
11
 return (1);
12
 }
13
 #endif
(-)files/patch-do_acct.c (+25 lines)
Added Link Here
1
--- ./do_acct.c.orig	2000-12-18 17:58:02.000000000 +0100
2
+++ ./do_acct.c	2011-08-29 00:31:55.000000000 +0200
3
@@ -21,6 +21,13 @@
4
 
5
 static int acctfd = 0;
6
 
7
+#if defined(__FreeBSD__) && __FreeBSD_version >= 900007
8
+# define utmp utmpx
9
+# define ut_time ut_tv.tv_sec
10
+# define ut_name ut_user
11
+#endif
12
+
13
+
14
 /* Make a acct entry into the accounting file for accounting. 
15
    Return 1 on error  */
16
 
17
@@ -159,7 +166,7 @@
18
 #endif
19
     entry.ut_time = utime;
20
 
21
-    wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND | O_SYNC, 0644);	
22
+    wtmpfd = open(wtmpfile, O_CREAT | O_WRONLY | O_APPEND , 0644);	
23
     if (wtmpfd < 0) {
24
 	report(LOG_ERR, "Can't open wtmp file %s -- %s",
25
 	       wtmpfile, sys_errlist[errno]);
(-)files/patch-parse.c (+23 lines)
Added Link Here
1
--- ./parse.c.orig	2001-03-16 09:14:21.000000000 +0100
2
+++ ./parse.c	2011-08-29 00:31:55.000000000 +0200
3
@@ -99,6 +99,9 @@
4
 #ifdef USE_LDAP
5
     declare ("ldap", S_ldap);
6
 #endif
7
+#ifdef USE_RADIUS
8
+    declare ("radius",S_radius);
9
+#endif
10
     declare("member", S_member);
11
     declare("message", S_message);
12
     declare("name", S_name);
13
@@ -178,6 +181,10 @@
14
     case S_ldap:
15
       return ("ldap");
16
 #endif
17
+#ifdef USE_RADIUS
18
+    case S_radius:
19
+      return ("radius");
20
+#endif
21
    case S_expires:
22
 	return ("expires");
23
     case S_after:
(-)files/patch-parse.h (+9 lines)
Added Link Here
1
--- ./parse.h.orig	2001-03-16 09:18:44.000000000 +0100
2
+++ ./parse.h	2011-08-29 00:31:55.000000000 +0200
3
@@ -85,3 +85,6 @@
4
 #ifdef USE_LDAP
5
 #define S_ldap            46
6
 #endif /* LDAP */
7
+#ifdef USE_RADIUS
8
+#define S_radius	  47
9
+#endif /* radius */
(-)files/patch-pwlib.c (+34 lines)
Added Link Here
1
--- ./pwlib.c.orig	2001-03-16 14:42:54.000000000 +0100
2
+++ ./pwlib.c	2011-08-29 00:31:55.000000000 +0200
3
@@ -40,6 +40,10 @@
4
 #include "ldap.h"
5
 #endif /* LDAP */
6
 
7
+#ifdef USE_RADIUS
8
+#include "radius.h"
9
+#endif
10
+
11
 /* Generic password verification routines for des, file and cleartext
12
    passwords */
13
 
14
@@ -177,6 +181,20 @@
15
         break; 
16
 #endif
17
 
18
+#ifdef USE_RADIUS
19
+	case (S_radius):
20
+	if (radius_verify(name,passwd,file)==1) {
21
+            data->status = TAC_PLUS_AUTHEN_STATUS_FAIL;
22
+            return (0);
23
+        } else {
24
+            data->status = TAC_PLUS_AUTHEN_STATUS_PASS;
25
+        }
26
+        exp_date = NULL;
27
+        set_expiration_status(exp_date, data);
28
+        return (data->status == TAC_PLUS_AUTHEN_STATUS_PASS);	 
29
+        break; 
30
+#endif
31
+
32
 
33
 #ifdef USE_PAM
34
         case (S_pam):
(-)files/patch-tac_plus.h (+40 lines)
Added Link Here
1
--- ./tac_plus.h.orig	2000-12-18 17:58:02.000000000 +0100
2
+++ ./tac_plus.h	2011-08-29 00:31:55.000000000 +0200
3
@@ -70,7 +70,7 @@
4
  */
5
 /* #define REARMSIGNAL */
6
 
7
-#define VERSION "F4.0.3.alpha.v7(DB&PAM support)"
8
+#define VERSION "F4.0.3.alpha.v7(DB,PAM&libradius support - incl. mmersbers patches!)"
9
 
10
 /*
11
  * System definitions. 
12
@@ -154,6 +154,7 @@
13
 #endif /* MSCHAP */
14
 
15
 #include <string.h>
16
+#include <sys/param.h>
17
 #include <sys/types.h>
18
 #include <sys/socket.h>
19
 #include <sys/ioctl.h>
20
@@ -172,7 +173,11 @@
21
 #include <sys/syslog.h>
22
 #endif
23
 
24
+#if __FreeBSD_version >= 900000
25
+#include <utmpx.h>
26
+#else
27
 #include <utmp.h>
28
+#endif
29
 
30
 #include <unistd.h>
31
 
32
@@ -681,7 +686,7 @@
33
 extern char *cfg_get_global_secret();
34
 #ifdef USE_PAM
35
 extern char *cfg_get_pam_service();
36
-#endif / *PAM */ 
37
+#endif /* PAM */ 
38
 extern void cfg_clean_config();
39
 extern char *cfg_nodestring();
40
 
(-)files/tac_plus.in (+36 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: tac_plus
7
# REQUIRE: DAEMON
8
# KEYWORD: shutdown
9
10
#
11
# Define these tac_plus_* variables in
12
#   /etc/rc.conf        or
13
#   /etc/rc.conf.local
14
#
15
# tac_plus_enabe="YES"
16
# tac_plus_cfg="%%PREFIX%%/etc/tac_plus/tac_plus.cfg"
17
# tac_plus_flags="-d 1" # see man (1) tac_plus
18
#
19
20
. /etc/rc.subr
21
22
name="tac_plus"
23
rcvar=`set_rcvar`
24
25
command=%%PREFIX%%/sbin/tac_plus
26
pidfile=/var/run/tac_plus.pid
27
tac_plus_enable=${tac_plus_enable:-"NO"}
28
tac_plus_flags=${tac_plus_flags:-"-d 1"}
29
tac_plus_configfile=${tac_plus_configfile:-"%%PREFIX%%/etc/tac_plus/tac_plus.cfg"}
30
31
load_rc_config $name
32
33
required_files=${tac_plus_configfile}
34
tac_plus_flags="-C ${tac_plus_configfile} ${tac_plus_flags}"
35
36
run_rc_command "$1"
(-)files/tac_plus.sh (-20 lines)
Removed Link Here
1
#!/bin/sh
2
3
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
4
    echo "$0: Cannot determine the PREFIX" >&2
5
    exit 1
6
fi
7
8
case "$1" in
9
start)
10
	[ -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'
11
	;;
12
stop)
13
	killall tac_plus && echo -n ' tac_plus'
14
	;;
15
*)
16
	echo "Usage: `basename $0` {start|stop}" >&2
17
	;;
18
esac
19
20
exit 0

Return to bug 160264