aboutsummaryrefslogtreecommitdiffstats
path: root/main/fail2ban
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2018-01-09 08:08:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-24 08:19:48 +0000
commit8b14324d24a1ae2b9746f9b225872acd50a72f92 (patch)
tree4ab00d436fb5df6fd665b91c63802b3bb04cb97b /main/fail2ban
parente524bf7b4f23bcac0071afd7533e0ee97dc7b260 (diff)
downloadaports-8b14324d24a1ae2b9746f9b225872acd50a72f92.tar.bz2
aports-8b14324d24a1ae2b9746f9b225872acd50a72f92.tar.xz
main/fail2ban: improve logrotate script
* by default fail2ban's log has 600 root:root permissions this breaks logcheck & other log parsers that need read only group permissions * this patch provides the same permissions as syslog (640 :wheel)
Diffstat (limited to 'main/fail2ban')
-rw-r--r--main/fail2ban/APKBUILD4
-rw-r--r--main/fail2ban/fail2ban.logrotate4
2 files changed, 5 insertions, 3 deletions
diff --git a/main/fail2ban/APKBUILD b/main/fail2ban/APKBUILD
index 6954909d36..ca6cd3cb8e 100644
--- a/main/fail2ban/APKBUILD
+++ b/main/fail2ban/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fail2ban
pkgver=0.10.3.1
-pkgrel=0
+pkgrel=1
pkgdesc="Scans log files for login failures then updates iptables to reject originating ip address"
url="http://www.fail2ban.org"
arch="noarch"
@@ -50,7 +50,7 @@ package() {
sha512sums="78388fce93e7a28f86905d7797cd188cfc19515ab43f85356da629f4f3797fba0e9e043f3d1a37740da463bd3cba629d660a3f7fc792be8a8f05e75fbf77c3ad fail2ban-0.10.3.1.tar.gz
1e7581dd04e7777d6fd5c40cc842a7ec5f4e6a0374673d020d89dd61bf4093d48934844bee89bcac9084f9ae44f3beb66e714cf3c2763d79c3e8feb790c5e43b fail2ban.confd
-60c80dcf8ced5a0323daef2df702f862d99ac45f56b91015ce39be8471cf9d6a3bb45d776df0330692f40db37638dc3ef2004cfc65f26d50dd67c94fbfdf4ec2 fail2ban.logrotate
+4ff9dd2793f42e414d83676104f47966f781b9e042e90dbc839d4e6b27faee08ebea2231b178d1d41084fa6c59aa62689bdb713977096d8b235a33e73268ccc5 fail2ban.logrotate
84915967ae1276f1e14a5813680ee2ebf081af1ff452a688ae5f9ac3363f4aff90e39f8e6456b5c33d5699917d28a16308797095fd1ef9bb1fbcb46d4cea3def alpine-ssh.jaild
672762f513e14a29c0183fbab0f7acfa45e8e3e6d25f98d443bf82cad03d15af21b14789a223aeb5642806fa7c2092caede99593059b68230165c311b1eb7fea alpine-sshd.filterd
36a81b771be0b36fe0dfb5ee4c72c9cb5b504e110618a8eb6f0f241b4e57d92df01dc5cc04b6b68d5bc6a5e6d68de1000092770285d7a328e5937e50b4b226a3 alpine-sshd-ddos.filterd"
diff --git a/main/fail2ban/fail2ban.logrotate b/main/fail2ban/fail2ban.logrotate
index 5d22bd0395..f635c3ddde 100644
--- a/main/fail2ban/fail2ban.logrotate
+++ b/main/fail2ban/fail2ban.logrotate
@@ -4,6 +4,8 @@
missingok
compress
postrotate
- /usr/bin/fail2ban-client set logtarget /var/log/fail2ban.log 1>/dev/null || true
+ /usr/bin/fail2ban-client set logtarget /var/log/fail2ban.log 1>/dev/null || true
+ chown :wheel /var/log/fail2ban.log
+ chmod 640 /var/log/fail2ban.log
endscript
}