diff options
author | manu <manu> | 2010-07-14 04:46:18 +0000 |
---|---|---|
committer | manu <manu> | 2010-07-14 04:46:18 +0000 |
commit | 748d2108b2174f6a5c4db8f081e132b5058eb9ee (patch) | |
tree | 7501bd887dba01f8c8c1bce2fd7721dd85d92298 /net | |
parent | 8e19b4ceaf8b7690bce1138a13473077ee517f49 (diff) | |
download | pkgsrc-748d2108b2174f6a5c4db8f081e132b5058eb9ee.tar.gz |
This OpenVPN plugin logs VPN logins and logouts in the wtmpx file.
Using it, you can have a look of OpenPVN usage by the last(1) command.
Diffstat (limited to 'net')
-rw-r--r-- | net/openvpn-acct-wtmpx/DESCR | 2 | ||||
-rw-r--r-- | net/openvpn-acct-wtmpx/MESSAGE | 14 | ||||
-rw-r--r-- | net/openvpn-acct-wtmpx/Makefile | 22 | ||||
-rw-r--r-- | net/openvpn-acct-wtmpx/PLIST | 3 | ||||
-rw-r--r-- | net/openvpn-acct-wtmpx/distinfo | 9 | ||||
-rw-r--r-- | net/openvpn-acct-wtmpx/patches/patch-aa | 36 |
6 files changed, 86 insertions, 0 deletions
diff --git a/net/openvpn-acct-wtmpx/DESCR b/net/openvpn-acct-wtmpx/DESCR new file mode 100644 index 00000000000..f4cf2bb7df5 --- /dev/null +++ b/net/openvpn-acct-wtmpx/DESCR @@ -0,0 +1,2 @@ +This OpenVPN plugin logs VPN logins and logouts in the wtmpx file. +Using it, you can have a look of OpenPVN usage by the last(1) command. diff --git a/net/openvpn-acct-wtmpx/MESSAGE b/net/openvpn-acct-wtmpx/MESSAGE new file mode 100644 index 00000000000..e7ea4e553b8 --- /dev/null +++ b/net/openvpn-acct-wtmpx/MESSAGE @@ -0,0 +1,14 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2010/07/14 04:46:18 manu Exp $ + +In order to enable the use of this module, add this directive to your +OpenVPN server configuration file + + plugin /usr/pkg/lib/openvpn/openvpn-acct-wtmpx.so openvpn + +In order to write to wtmpx(5) databases, OpenVPN needs root privileges. +It acquires them for that purpose by using the logwtmpx program, which +is set-UID root and executable by group nobody. Make sure that group does +fit the unprivilegied group you use for OpenVPN. + +=========================================================================== diff --git a/net/openvpn-acct-wtmpx/Makefile b/net/openvpn-acct-wtmpx/Makefile new file mode 100644 index 00000000000..c315057379f --- /dev/null +++ b/net/openvpn-acct-wtmpx/Makefile @@ -0,0 +1,22 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/07/14 04:46:18 manu Exp $ +# + +DISTNAME= openvpn-acct-wtmpx-20091110 +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} openvpn-2.1_rc20.tar.gz +CATEGORIES= net +MASTER_SITES= http://ftp.espci.fr/pub/openvpn-acct-wtmpx/ +SITES.openvpn-2.1_rc20.tar.gz= http://openvpn.net/release/ +EXTRACT_SUFX= .tgz + +MAINTAINER= manu@NetBSD.org +HOMEPAGE= http://ftp.espci.fr/pub/openvpn-acct-wtmpx/ +COMMENT= Log OpenVPN logins and logouts to wtmpx + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_LIBTOOL= yes +USE_TOOLS+= install + +WRKSRC= ${WRKDIR}/openvpn-acct-wtmpx + +.include "../../mk/bsd.pkg.mk" diff --git a/net/openvpn-acct-wtmpx/PLIST b/net/openvpn-acct-wtmpx/PLIST new file mode 100644 index 00000000000..d14d7a864b6 --- /dev/null +++ b/net/openvpn-acct-wtmpx/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2010/07/14 04:46:18 manu Exp $ +lib/openvpn/openvpn-acct-wtmpx.la +bin/logwtmpx diff --git a/net/openvpn-acct-wtmpx/distinfo b/net/openvpn-acct-wtmpx/distinfo new file mode 100644 index 00000000000..a7356cab9c8 --- /dev/null +++ b/net/openvpn-acct-wtmpx/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/07/14 04:46:18 manu Exp $ + +SHA1 (openvpn-2.1_rc20.tar.gz) = ab0e928bd7d4896ddb0061bf3aba9f3cd6cefe6e +RMD160 (openvpn-2.1_rc20.tar.gz) = 4dd7924cb41a268e76a93af66fd05f948f22e5f3 +Size (openvpn-2.1_rc20.tar.gz) = 844253 bytes +SHA1 (openvpn-acct-wtmpx-20091110.tgz) = 3bbe32fdc4bf17f4decef2b3dfb2fb92885934c9 +RMD160 (openvpn-acct-wtmpx-20091110.tgz) = 1146c27fe190a8b8d6ef863f1861acfeb1f61b39 +Size (openvpn-acct-wtmpx-20091110.tgz) = 1983 bytes +SHA1 (patch-aa) = 08191614818fcb65608fb70abe35be440c211334 diff --git a/net/openvpn-acct-wtmpx/patches/patch-aa b/net/openvpn-acct-wtmpx/patches/patch-aa new file mode 100644 index 00000000000..aa99f712196 --- /dev/null +++ b/net/openvpn-acct-wtmpx/patches/patch-aa @@ -0,0 +1,36 @@ +$NetBSD: patch-aa,v 1.1.1.1 2010/07/14 04:46:25 manu Exp $ +--- Makefile.orig 2009-11-07 04:12:24.000000000 +0000 ++++ Makefile 2010-04-21 17:18:41.000000000 +0000 +@@ -1,14 +1,14 @@ +-prefix=/usr/pkg +-PLUGINDIR=$(prefix)/lib/openvpn +-bindir=/usr/local/bin ++#prefix=/usr/pkg ++PLUGINDIR=${DESTDIR}${PREFIX}/lib/openvpn ++bindir=${DESTDIR}${PREFIX}/bin + + OPENVPN_SRC=../openvpn-2.1_rc20 + CFLAGS= -Wall -Werror -ansi -g -I$(OPENVPN_SRC) -DBINDIR=\"$(bindir)\" + OPENVPN_GROUP=nobody + +-LIBTOOL=libtool +-INSTALL=install ++#LIBTOOL=libtool ++#INSTALL=install + + + all: openvpn-acct-wtmpx.la logwtmpx + +@@ -22,10 +22,12 @@ + logwtmpx: logwtmpx.o + $(CC) -o $@ -lutil $? + + install: openvpn-acct-wtmpx.la logwtmpx ++ $(INSTALL) -d -m 0755 $(PLUGINDIR) + $(LIBTOOL) --mode=install cp openvpn-acct-wtmpx.la $(PLUGINDIR)/ + $(LIBTOOL) --mode=finish ++ $(INSTALL) -d -m 0755 $(bindir) + $(INSTALL) -c -m 4754 -o root -g $(OPENVPN_GROUP) logwtmpx $(bindir)/ + + clean: + rm -rf logwtmpx *.o *.so *.la *.lo .libs |