summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorshannonjr <shannonjr@pkgsrc.org>2007-09-03 13:50:49 +0000
committershannonjr <shannonjr@pkgsrc.org>2007-09-03 13:50:49 +0000
commit244b840db0425af58879d1a2ef01af68f39f2da9 (patch)
treec08a0b0cd453b709e7fa55d1921afa6b976127f0 /security
parent999368ef773be53ba7e36ceb99480cebde95b22d (diff)
downloadpkgsrc-244b840db0425af58879d1a2ef01af68f39f2da9.tar.gz
Prelude sensor for OpenBSD's PF (Packet Filter)
that reports to Prelude Manager.
Diffstat (limited to 'security')
-rw-r--r--security/prelude-pflogger/DESCR2
-rw-r--r--security/prelude-pflogger/MESSAGE7
-rw-r--r--security/prelude-pflogger/Makefile56
-rw-r--r--security/prelude-pflogger/PLIST4
-rw-r--r--security/prelude-pflogger/distinfo7
-rw-r--r--security/prelude-pflogger/files/pflogger.sh28
-rw-r--r--security/prelude-pflogger/patches/patch-aa28
-rw-r--r--security/prelude-pflogger/patches/patch-ab13
8 files changed, 145 insertions, 0 deletions
diff --git a/security/prelude-pflogger/DESCR b/security/prelude-pflogger/DESCR
new file mode 100644
index 00000000000..78f7ae369d8
--- /dev/null
+++ b/security/prelude-pflogger/DESCR
@@ -0,0 +1,2 @@
+Prelude sensor for OpenBSD's PF (Packet Filter)
+that reports to Prelude Manager.
diff --git a/security/prelude-pflogger/MESSAGE b/security/prelude-pflogger/MESSAGE
new file mode 100644
index 00000000000..1415f614492
--- /dev/null
+++ b/security/prelude-pflogger/MESSAGE
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
+
+You need to ensure that the permissions on /dev/bpf0 are set to allow
+read access by ${PRELUDE_USER}:${PRELUDE_GROUP}.
+
+===========================================================================
diff --git a/security/prelude-pflogger/Makefile b/security/prelude-pflogger/Makefile
new file mode 100644
index 00000000000..bde75c252ad
--- /dev/null
+++ b/security/prelude-pflogger/Makefile
@@ -0,0 +1,56 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
+#
+
+DISTNAME= prelude-pflogger-0.9.0-rc2
+PKGNAME= prelude-pflogger-0.9.0
+CATEGORIES= security
+MASTER_SITES= http://prelude-ids.org/download/releases/
+
+MAINTAINER= shannonjr@NetBSD.org
+HOMEPAGE= http://prelude-ids.org/download/releases/
+COMMENT= Prelude sensor for Packet Filter (pf)
+
+.include "../../mk/bsd.prefs.mk"
+
+PRELUDE_USER?= _prelude
+PRELUDE_GROUP?= _prelude
+PRELUDE_PFLOGGER_PID_DIR= ${VARBASE}/run/prelude-pflogger
+
+PKG_GROUPS_VARS+= PRELUDE_GROUP
+PKG_USERS_VARS+= PRELUDE_USER
+
+EGDIR= ${PREFIX}/share/examples/prelude-pflogger
+REQD_DIRS= ${EGDIR}
+
+USE_PKGLOCALEDIR= yes
+USE_LIBTOOL= yes
+GNU_CONFIGURE= yes
+USE_TOOLS+= gmake
+BUILD_DEFS+= VARBASE
+PKG_SYSCONFSUBDIR= prelude-pflogger
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/doc
+CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
+CONF_FILES= ${EGDIR}/prelude-pflogger.conf ${PKG_SYSCONFDIR}/prelude-pflogger.conf
+USE_TOOLS+= autoconf automake aclocal autoheader
+
+FILES_SUBST+= PRELUDE_PFLOGGER_PID_DIR=${PRELUDE_PFLOGGER_PID_DIR:Q}
+FILES_SUBST+= PRELUDE_USER=${PRELUDE_USER:Q}
+FILES_SUBST+= PRELUDE_GROUP=${PRELUDE_GROUP:Q}
+
+MESSAGE_SUBST+= PRELUDE_USER=${PRELUDE_USER:Q}
+MESSAGE_SUBST+= PRELUDE_GROUP=${PRELUDE_GROUP:Q}
+
+SUBST_CLASSES+= make
+SUBST_STAGE.make= post-patch
+SUBST_FILES.make= Makefile.am
+SUBST_SED.make= -e 's,@EGDIR@,${EGDIR},g'
+
+RCD_SCRIPTS= pflogger
+
+pre-configure:
+ set -e; cd ${WRKSRC}; \
+ aclocal; autoheader; automake -a --foreign -i; autoconf
+
+.include "../../security/libprelude/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/security/prelude-pflogger/PLIST b/security/prelude-pflogger/PLIST
new file mode 100644
index 00000000000..e3b9d8283c3
--- /dev/null
+++ b/security/prelude-pflogger/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
+bin/prelude-pflogger
+share/examples/rc.d/pflogger
+share/examples/prelude-pflogger/prelude-pflogger.conf
diff --git a/security/prelude-pflogger/distinfo b/security/prelude-pflogger/distinfo
new file mode 100644
index 00000000000..d61134b8a16
--- /dev/null
+++ b/security/prelude-pflogger/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
+
+SHA1 (prelude-pflogger-0.9.0-rc2.tar.gz) = ae354809dae5f04392a1c93a88be4cf9993c3b43
+RMD160 (prelude-pflogger-0.9.0-rc2.tar.gz) = 7c5808b0ca515c8080c64b52aa0aae166831e4d4
+Size (prelude-pflogger-0.9.0-rc2.tar.gz) = 303763 bytes
+SHA1 (patch-aa) = ad1e951a74b045a22e577baf2cd19b47478d88a1
+SHA1 (patch-ab) = 75a78b3d50067b07448aff9fde565f8bd5ab1b54
diff --git a/security/prelude-pflogger/files/pflogger.sh b/security/prelude-pflogger/files/pflogger.sh
new file mode 100644
index 00000000000..970ca309d04
--- /dev/null
+++ b/security/prelude-pflogger/files/pflogger.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $NetBSD: pflogger.sh,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
+#
+
+# PROVIDE: pflogger
+# REQUIRE: pf NETWORKING
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="pflogger"
+pflogger_user=_prelude
+pflogger_=_prelude
+procname="@PREFIX@/bin/prelude-pflogger"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/prelude-pflogger.conf"
+start_precmd="pflogger_precommand"
+pidfile="@PRELUDE_PFLOGGER_PID_DIR@/prelude-pflogger.pid"
+start_cmd="${procname} --pidfile ${pidfile}"
+
+pflogger_precommand()
+{
+ /bin/mkdir -p @PRELUDE_PFLOGGER_PID_DIR@
+ /usr/sbin/chown @PRELUDE_USER@:@PRELUDE_GROUP@ @PRELUDE_PFLOGGER_PID_DIR@
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/security/prelude-pflogger/patches/patch-aa b/security/prelude-pflogger/patches/patch-aa
new file mode 100644
index 00000000000..4c631dc2e0f
--- /dev/null
+++ b/security/prelude-pflogger/patches/patch-aa
@@ -0,0 +1,28 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
+
+--- Makefile.am.orig 2005-09-18 08:30:01.000000000 -0600
++++ Makefile.am
+@@ -5,18 +5,11 @@ EXTRA_DIST = prelude-pflogger.conf confi
+ ChangeLog
+
+ install-data-local:
+- @if test -f $(DESTDIR)$(configdir)/prelude-pflogger.conf; then \
+- echo "********************************************************************************"; \
+- echo; \
+- echo "$(DESTDIR)$(configdir)/prelude-pflogger.conf already exist..."; \
+- echo "Installing default configuration in $(DESTDIR)$(configdir)/prelude-pflogger.conf-dist"; \
+- echo; \
+- echo "********************************************************************************"; \
+- $(INSTALL) -m 600 $(top_srcdir)/prelude-pflogger.conf $(DESTDIR)$(configdir)/prelude-pflogger.conf-dist; \
+- else \
+- $(INSTALL) -d -m 700 $(DESTDIR)$(configdir); \
+- $(INSTALL) -m 600 $(top_srcdir)/prelude-pflogger.conf $(DESTDIR)$(configdir)/; \
++ $(INSTALL) -m 644 $(top_srcdir)/prelude-pflogger.conf @EGDIR@/; \
++ @if ! test -f $(configdir)/prelude-pflogger.conf; then \
++ $(INSTALL) -d -m 755 $(configdir); \
++ $(INSTALL) -m 644 $(top_srcdir)/prelude-pflogger.conf $(configdir)/; \
+ fi
+
+ uninstall-local:
+- rm -f $(DESTDIR)$(configdir)/prelude-pflogger.conf;
++ rm -f @EGDIR@/prelude-pflogger.conf;
diff --git a/security/prelude-pflogger/patches/patch-ab b/security/prelude-pflogger/patches/patch-ab
new file mode 100644
index 00000000000..a1b160ce18e
--- /dev/null
+++ b/security/prelude-pflogger/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/09/03 13:50:49 shannonjr Exp $
+
+--- configure.in.orig 2007-09-03 04:45:30.000000000 -0600
++++ configure.in
+@@ -57,7 +57,7 @@ AC_TYPE_SIGNAL
+ AC_FUNC_VPRINTF
+ AC_CHECK_FUNCS(gettimeofday select socket strdup strerror strstr)
+
+-configdir=$sysconfdir/prelude-pflogger
++configdir=$sysconfdir
+ prelude_conf=$configdir/prelude-pflogger.conf
+
+ AC_DEFINE_UNQUOTED(PRELUDE_PFLOGGER_CONF, "$prelude_conf", Path to the Prelude PFlogger configuration file)