aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/snort/APKBUILD10
-rw-r--r--main/snort/snort.confd7
2 files changed, 11 insertions, 6 deletions
diff --git a/main/snort/APKBUILD b/main/snort/APKBUILD
index 62207d87dd..e95a5e87e1 100644
--- a/main/snort/APKBUILD
+++ b/main/snort/APKBUILD
@@ -4,13 +4,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=snort
pkgver=2.9.13
-pkgrel=2
+pkgrel=3
pkgdesc="An open source network intrusion prevention and detection system"
url="https://www.snort.org/"
arch="all"
license="GPL-2.0-only"
makedepends="pcre-dev libpcap-dev libnet-dev libdnet-dev daq-dev daq-static
- bison flex zlib-dev libtirpc-dev xz-dev"
+ bison flex zlib-dev libtirpc-dev xz-dev
+ libnfnetlink-dev libnetfilter_queue-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-dev $pkgname-openrc"
source="https://www.snort.org/downloads/snort/snort-$pkgver.tar.gz
@@ -61,12 +62,13 @@ package() {
install -D -m 755 ../snort.initd "$pkgdir"/etc/init.d/snort
install -D -m 644 ../snort.confd "$pkgdir"/etc/conf.d/snort
install -D -m 644 etc/snort.conf "$pkgdir"/etc/snort/snort.conf
+ install -D -m 644 etc/gen-msg.map "$pkgdir"/etc/snort/gen-msg.map
install -D -m 644 rpm/snort.logrotate "$pkgdir"/etc/logrotate.d/snort
mkdir -p "$pkgdir"/usr/lib/snort_dynamicrules
mkdir -p "$pkgdir"/var/lib/snort/rules
mkdir -m 770 -p "$pkgdir"/var/log/snort && chown snort.snort "$pkgdir"/var/log/snort
for file in classification.config reference.config threshold.conf \
- unicode.map
+ unicode.map sid-msg.map
do
ln -s /var/lib/snort/etc/$file "$pkgdir"/etc/snort/$file
done
@@ -76,4 +78,4 @@ package() {
sha512sums="3bc90d3753b01f779e587d8f6a514a18ea446732b0a41809df028b60eacc93fca2c158030c0743a9662958220a98757629eb1d11e7d4d709bf3b76b807b935bd snort-2.9.13.tar.gz
c71d11f4cde4aba432641d3915faec8070e9fea5b33c71f6b2872b2208871180b3c7dbbadd2ddaebe5f3280adf7c5c9daf1585afd331fe552486a675ff676e52 snort.initd
-abc0846ea6e08029c772f24e213f211a39219701e6e2c8b3aa112632318479db7b21014c5f2c4987cb2981cafce0ea744549c3ce754e9145cba9ec5604ae66f3 snort.confd"
+b21491ba5798a5ce3a03a61ada391a667f1684aaf86e7536abb9dd975f6acefe75688c60b8ce28cbfb0c4e66ec19078e468792289d26f1f2e2d401609fd22771 snort.confd"
diff --git a/main/snort/snort.confd b/main/snort/snort.confd
index d4d240ac96..83bc5eadb3 100644
--- a/main/snort/snort.confd
+++ b/main/snort/snort.confd
@@ -4,7 +4,7 @@
IFACE=eth0
# Make sure this matches your IFACE
-PIDFILE=/var/run/snort_$IFACE.pid
+PIDFILE=/var/lib/snort/snort_$IFACE.pid
# You probably don't want to change this, but in case you do
LOGDIR="/var/log/snort"
@@ -12,5 +12,8 @@ LOGDIR="/var/log/snort"
# Probably not this either
CONF=/etc/snort/snort.conf
+# Allow log files to be read by members of snort group (default is 077).
+UMASK=037
+
# This pulls in the options above
-SNORT_OPTS="-D -u snort -i $IFACE -l $LOGDIR -c $CONF"
+SNORT_OPTS="-D -u snort -i $IFACE -l $LOGDIR -c $CONF -m $UMASK"