- Use upstream provided systemd files - Drop upstreamed patches, rebase log2syslog and notmp patchesi9ce
parent
6bfd65edcf
commit
d0f8175ad9
@ -1,35 +0,0 @@
|
||||
From 20c717c25c5d180b720bec6902475f07b02f8b87 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan G. Underwood <jonathan.underwood@gmail.com>
|
||||
Date: Sun, 3 Jan 2010 02:16:09 +0000
|
||||
Subject: [PATCH] Set socket file descriptor in AsyncServer.start to be CLOEXEC
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=522767
|
||||
---
|
||||
server/asyncserver.py | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/server/asyncserver.py b/server/asyncserver.py
|
||||
index 35cebf1..96b62d0 100644
|
||||
--- a/server/asyncserver.py
|
||||
+++ b/server/asyncserver.py
|
||||
@@ -26,7 +26,7 @@ __license__ = "GPL"
|
||||
|
||||
from pickle import dumps, loads, HIGHEST_PROTOCOL
|
||||
from common import helpers
|
||||
-import asyncore, asynchat, socket, os, logging, sys, traceback
|
||||
+import asyncore, asynchat, socket, os, logging, sys, traceback, fcntl
|
||||
|
||||
# Gets the instance of the logger.
|
||||
logSys = logging.getLogger("fail2ban.server")
|
||||
@@ -126,6 +126,8 @@ class AsyncServer(asyncore.dispatcher):
|
||||
raise AsyncServerException("Server already running")
|
||||
# Creates the socket.
|
||||
self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
+ fd = self.fileno()
|
||||
+ fcntl.fcntl(fd, fcntl.F_SETFD, fd | fcntl.FD_CLOEXEC)
|
||||
self.set_reuse_addr()
|
||||
try:
|
||||
self.bind(sock)
|
||||
--
|
||||
1.6.5.2
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- fail2ban-0.8.3/config/fail2ban.conf~ 2008-02-27 22:44:55.000000000 +0100
|
||||
+++ fail2ban-0.8.3/config/fail2ban.conf 2009-08-27 20:48:25.000000000 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
# Only one log target can be specified.
|
||||
# Values: STDOUT STDERR SYSLOG file Default: /var/log/fail2ban.log
|
||||
#
|
||||
-logtarget = /var/log/fail2ban.log
|
||||
+logtarget = SYSLOG
|
||||
|
||||
# Option: socket
|
||||
# Notes.: Set the socket file. This is used to communicate with the daemon. Do
|
@ -1,35 +0,0 @@
|
||||
diff -U0 fail2ban-0.8.7.1/ChangeLog.notmp fail2ban-0.8.7.1/ChangeLog
|
||||
--- fail2ban-0.8.7.1/ChangeLog.notmp 2012-07-31 19:45:04.000000000 -0600
|
||||
+++ fail2ban-0.8.7.1/ChangeLog 2012-10-11 11:49:16.317481660 -0600
|
||||
@@ -511 +511 @@
|
||||
-- Changed default PID lock file location from /tmp to /var/run
|
||||
+- Changed default PID lock file location from /var/lib/fail2ban to /var/run
|
||||
diff -up fail2ban-0.8.7.1/client/fail2banreader.py.notmp fail2ban-0.8.7.1/client/fail2banreader.py
|
||||
--- fail2ban-0.8.7.1/client/fail2banreader.py.notmp 2012-07-31 19:45:04.000000000 -0600
|
||||
+++ fail2ban-0.8.7.1/client/fail2banreader.py 2012-10-11 11:49:16.318481661 -0600
|
||||
@@ -42,7 +42,7 @@ class Fail2banReader(ConfigReader):
|
||||
ConfigReader.read(self, "fail2ban")
|
||||
|
||||
def getEarlyOptions(self):
|
||||
- opts = [["string", "socket", "/tmp/fail2ban.sock"]]
|
||||
+ opts = [["string", "socket", "/var/lib/fail2ban/fail2ban.sock"]]
|
||||
return ConfigReader.getOptions(self, "Definition", opts)
|
||||
|
||||
def getOptions(self):
|
||||
diff -up fail2ban-0.8.7.1/config/action.d/dshield.conf.notmp fail2ban-0.8.7.1/config/action.d/dshield.conf
|
||||
diff -up fail2ban-0.8.7.1/config/action.d/mail-buffered.conf.notmp fail2ban-0.8.7.1/config/action.d/mail-buffered.conf
|
||||
diff -up fail2ban-0.8.7.1/config/action.d/mynetwatchman.conf.notmp fail2ban-0.8.7.1/config/action.d/mynetwatchman.conf
|
||||
diff -up fail2ban-0.8.7.1/config/action.d/sendmail-buffered.conf.notmp fail2ban-0.8.7.1/config/action.d/sendmail-buffered.conf
|
||||
diff -up fail2ban-0.8.7.1/files/nagios/f2ban.txt.notmp fail2ban-0.8.7.1/files/nagios/f2ban.txt
|
||||
--- fail2ban-0.8.7.1/files/nagios/f2ban.txt.notmp 2012-07-31 19:45:04.000000000 -0600
|
||||
+++ fail2ban-0.8.7.1/files/nagios/f2ban.txt 2012-10-11 11:53:32.323532817 -0600
|
||||
@@ -6,7 +6,7 @@ HELP:
|
||||
/etc/init.d/fail2ban stop
|
||||
|
||||
2.) delete the socket if available
|
||||
-rm /tmp/fail2ban.sock
|
||||
+rm /var/run/fail2ban/fail2ban.sock
|
||||
|
||||
3.) start the Service
|
||||
/etc/init.d/fail2ban start
|
||||
diff -up fail2ban-0.8.7.1/testcases/actiontestcase.py.notmp fail2ban-0.8.7.1/testcases/actiontestcase.py
|
@ -1,11 +0,0 @@
|
||||
diff -up fail2ban-0.8.8/config/filter.d/sshd.conf.sshd-pam fail2ban-0.8.8/config/filter.d/sshd.conf
|
||||
--- fail2ban-0.8.8/config/filter.d/sshd.conf.sshd-pam 2012-12-05 20:51:29.000000000 -0700
|
||||
+++ fail2ban-0.8.8/config/filter.d/sshd.conf 2013-01-18 14:29:00.300902426 -0700
|
||||
@@ -30,7 +30,6 @@ failregex = ^%(__prefix_line)s(?:error:
|
||||
^%(__prefix_line)s[iI](?:llegal|nvalid) user .* from <HOST>\s*$
|
||||
^%(__prefix_line)sUser .+ from <HOST> not allowed because not listed in AllowUsers\s*$
|
||||
^%(__prefix_line)sUser .+ from <HOST> not allowed because listed in DenyUsers\s*$
|
||||
- ^%(__prefix_line)s(?:pam_unix\(sshd:auth\):\s)?authentication failure; logname=\S* uid=\S* euid=\S* tty=\S* ruser=\S* rhost=<HOST>(?:\s+user=.*)?\s*$
|
||||
^%(__prefix_line)srefused connect from \S+ \(<HOST>\)\s*$
|
||||
^%(__prefix_line)sUser .+ from <HOST> not allowed because none of user's groups are listed in AllowGroups\s*$
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -up fail2ban-0.8.10/config/fail2ban.conf.log2syslog fail2ban-0.8.10/config/fail2ban.conf
|
||||
--- fail2ban-0.8.10/config/fail2ban.conf.log2syslog 2013-06-12 11:21:12.000000000 -0600
|
||||
+++ fail2ban-0.8.10/config/fail2ban.conf 2013-06-12 16:12:48.233512068 -0600
|
||||
@@ -30,7 +30,7 @@ loglevel = 3
|
||||
# (e.g. /etc/logrotate.d/fail2ban on Debian systems)
|
||||
# Values: STDOUT STDERR SYSLOG file Default: /var/log/fail2ban.log
|
||||
#
|
||||
-logtarget = /var/log/fail2ban.log
|
||||
+logtarget = SYSLOG
|
||||
|
||||
# Option: socket
|
||||
# Notes.: Set the socket file. This is used to communicate with the daemon. Do
|
@ -0,0 +1,12 @@
|
||||
diff -up fail2ban-0.8.10/client/fail2banreader.py.notmp fail2ban-0.8.10/client/fail2banreader.py
|
||||
--- fail2ban-0.8.10/client/fail2banreader.py.notmp 2013-06-12 11:21:12.000000000 -0600
|
||||
+++ fail2ban-0.8.10/client/fail2banreader.py 2013-06-12 16:17:43.820837700 -0600
|
||||
@@ -39,7 +39,7 @@ class Fail2banReader(ConfigReader):
|
||||
ConfigReader.read(self, "fail2ban")
|
||||
|
||||
def getEarlyOptions(self):
|
||||
- opts = [["string", "socket", "/tmp/fail2ban.sock"],
|
||||
+ opts = [["string", "socket", "/var/run/fail2ban/fail2ban.sock"],
|
||||
["string", "pidfile", "/var/run/fail2ban/fail2ban.pid"]]
|
||||
return ConfigReader.getOptions(self, "Definition", opts)
|
||||
|
Loading…
Reference in new issue