[fail2ban/f19] Fix firewalld support (#979622, comment 18)

Adam Tkac atkac at fedoraproject.org
Tue Dec 3 15:19:57 UTC 2013


commit f903335247ba0310992d454aac90c4c9fef67abe
Author: Adam Tkac <vonsch at gmail.com>
Date:   Tue Dec 3 16:19:21 2013 +0100

    Fix firewalld support (#979622, comment 18)
    
    Signed-off-by: Adam Tkac <vonsch at gmail.com>

 fail2ban-0.8.11-singlejail.patch |   12 ++++++++++++
 fail2ban.spec                    |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/fail2ban-0.8.11-singlejail.patch b/fail2ban-0.8.11-singlejail.patch
new file mode 100644
index 0000000..9419c83
--- /dev/null
+++ b/fail2ban-0.8.11-singlejail.patch
@@ -0,0 +1,12 @@
+diff -up fail2ban-0.8.11/config/action.d/firewall-cmd-direct-new.conf.singlejail fail2ban-0.8.11/config/action.d/firewall-cmd-direct-new.conf
+--- fail2ban-0.8.11/config/action.d/firewall-cmd-direct-new.conf.singlejail	2013-12-03 16:17:48.282238194 +0100
++++ fail2ban-0.8.11/config/action.d/firewall-cmd-direct-new.conf	2013-12-03 16:17:57.421402502 +0100
+@@ -20,7 +20,7 @@ actionstop = firewall-cmd --direct --rem
+              firewall-cmd --direct --remove-rules ipv4 filter fail2ban-<name>
+              firewall-cmd --direct --remove-chain ipv4 filter fail2ban-<name>
+ 
+-actioncheck = firewall-cmd --direct --get-chains ipv4 filter | grep -q 'fail2ban-<name>[ \t]'
++actioncheck = firewall-cmd --direct --get-chains ipv4 filter | grep -Eq 'fail2ban-<name>$|fail2ban-<name> '
+ 
+ actionban = firewall-cmd --direct --add-rule ipv4 filter fail2ban-<name> 0 -s <ip> -j <blocktype>
+ 
diff --git a/fail2ban.spec b/fail2ban.spec
index 73c695d..8769761 100644
--- a/fail2ban.spec
+++ b/fail2ban.spec
@@ -11,6 +11,7 @@ Patch0: fail2ban-0.8.3-init.patch
 Patch1: fail2ban-0.8.7.1-sshd.patch
 Patch6: fail2ban-log2syslog.patch
 Patch7: 0001-BF-apache-filters-using-error-log-weren-t-matched-wh.patch
+Patch8: fail2ban-0.8.11-singlejail.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: python-devel >= 2.3
 # For testcases
@@ -47,6 +48,7 @@ and shorewall respectively.
 %patch1 -p1 -b .sshd
 %patch6 -p1 -b .log2syslog
 %patch7 -p1 -b .apache-authfix
+%patch8 -p1 -b .singlejail
 
 %build
 python setup.py build
@@ -130,6 +132,7 @@ fi
 %changelog
 * Tue Dec 03 2013 Adam Tkac <vonsch at gmail.com> - 0.8.11-2
 - include post-release patch for apache-auth filter
+- fix firewalld support (#979622, comment 18)
 
 * Mon Nov 25 2013 Adam Tkac <vonsch at gmail.com> - 0.8.11-1
 - update to 0.8.11 (#1034355)


More information about the scm-commits mailing list