mirror of https://github.com/fail2ban/fail2ban
122 lines
4.0 KiB
Plaintext
Executable File
122 lines
4.0 KiB
Plaintext
Executable File
#! /bin/sh /usr/share/dpatch/dpatch-run
|
|
## 00_reload.dpatch by Yaroslav Halchenko <debian@onerussian.com>
|
|
##
|
|
## All lines beginning with `## DP:' are a description of the patch.
|
|
## DP: No description.
|
|
|
|
@DPATCH@
|
|
diff -urNad fail2ban-0.7.8~/server/actions.py fail2ban-0.7.8/server/actions.py
|
|
--- fail2ban-0.7.8~/server/actions.py 2007-03-07 15:54:33.000000000 -0500
|
|
+++ fail2ban-0.7.8/server/actions.py 2007-03-26 17:43:24.000000000 -0400
|
|
@@ -125,10 +125,10 @@
|
|
# @return True when the thread exits nicely
|
|
|
|
def run(self):
|
|
+ self.setActive(True)
|
|
for action in self.__actions:
|
|
action.execActionStart()
|
|
- self.setActive(True)
|
|
- while self.isActive():
|
|
+ while self._isActive():
|
|
if not self.getIdle():
|
|
#logSys.debug(self.jail.getName() + ": action")
|
|
ret = self.__checkBan()
|
|
diff -urNad fail2ban-0.7.8~/server/filter.py fail2ban-0.7.8/server/filter.py
|
|
--- fail2ban-0.7.8~/server/filter.py 2007-02-01 15:50:16.000000000 -0500
|
|
+++ fail2ban-0.7.8/server/filter.py 2007-03-26 17:43:24.000000000 -0400
|
|
@@ -385,7 +385,7 @@
|
|
self.__setFilePos()
|
|
lastLine = None
|
|
for line in self.__crtHandler:
|
|
- if not self.isActive():
|
|
+ if not self._isActive():
|
|
# The jail has been stopped
|
|
break
|
|
try:
|
|
diff -urNad fail2ban-0.7.8~/server/filtergamin.py fail2ban-0.7.8/server/filtergamin.py
|
|
--- fail2ban-0.7.8~/server/filtergamin.py 2007-03-26 17:43:18.000000000 -0400
|
|
+++ fail2ban-0.7.8/server/filtergamin.py 2007-03-26 17:43:24.000000000 -0400
|
|
@@ -99,7 +99,7 @@
|
|
|
|
def run(self):
|
|
self.setActive(True)
|
|
- while self.isActive():
|
|
+ while self._isActive():
|
|
if not self.getIdle():
|
|
# We cannot block here because we want to be able to
|
|
# exit.
|
|
diff -urNad fail2ban-0.7.8~/server/filterpoll.py fail2ban-0.7.8/server/filterpoll.py
|
|
--- fail2ban-0.7.8~/server/filterpoll.py 2006-12-23 11:37:21.000000000 -0500
|
|
+++ fail2ban-0.7.8/server/filterpoll.py 2007-03-26 17:43:24.000000000 -0400
|
|
@@ -93,7 +93,7 @@
|
|
|
|
def run(self):
|
|
self.setActive(True)
|
|
- while self.isActive():
|
|
+ while self._isActive():
|
|
if not self.getIdle():
|
|
# Get file modification
|
|
for f in self.getLogPath():
|
|
diff -urNad fail2ban-0.7.8~/server/jail.py fail2ban-0.7.8/server/jail.py
|
|
--- fail2ban-0.7.8~/server/jail.py 2006-11-06 17:48:53.000000000 -0500
|
|
+++ fail2ban-0.7.8/server/jail.py 2007-03-26 17:43:24.000000000 -0400
|
|
@@ -89,10 +89,10 @@
|
|
self.__filter.join()
|
|
self.__action.join()
|
|
|
|
- def isActive(self):
|
|
- isActive0 = self.__filter.isActive()
|
|
- isActive1 = self.__action.isActive()
|
|
- return isActive0 or isActive1
|
|
+ def isAlive(self):
|
|
+ isAlive0 = self.__filter.isAlive()
|
|
+ isAlive1 = self.__action.isAlive()
|
|
+ return isAlive0 or isAlive1
|
|
|
|
def setIdle(self, value):
|
|
self.__filter.setIdle(value)
|
|
diff -urNad fail2ban-0.7.8~/server/jailthread.py fail2ban-0.7.8/server/jailthread.py
|
|
--- fail2ban-0.7.8~/server/jailthread.py 2006-10-24 15:38:42.000000000 -0400
|
|
+++ fail2ban-0.7.8/server/jailthread.py 2007-03-26 17:43:24.000000000 -0400
|
|
@@ -105,7 +105,7 @@
|
|
# Check if the filter thread is running.
|
|
# @return True if the thread is running
|
|
|
|
- def isActive(self):
|
|
+ def _isActive(self):
|
|
return self.__isRunning
|
|
|
|
##
|
|
diff -urNad fail2ban-0.7.8~/server/server.py fail2ban-0.7.8/server/server.py
|
|
--- fail2ban-0.7.8~/server/server.py 2007-03-26 17:43:18.000000000 -0400
|
|
+++ fail2ban-0.7.8/server/server.py 2007-03-26 17:43:24.000000000 -0400
|
|
@@ -96,7 +96,7 @@
|
|
def startJail(self, name):
|
|
try:
|
|
self.__lock.acquire()
|
|
- if not self.isActive(name):
|
|
+ if not self.isAlive(name):
|
|
self.__jails.get(name).start()
|
|
finally:
|
|
self.__lock.release()
|
|
@@ -104,7 +104,7 @@
|
|
def stopJail(self, name):
|
|
try:
|
|
self.__lock.acquire()
|
|
- if self.isActive(name):
|
|
+ if self.isAlive(name):
|
|
self.__jails.get(name).stop()
|
|
self.delJail(name)
|
|
finally:
|
|
@@ -118,8 +118,8 @@
|
|
finally:
|
|
self.__lock.release()
|
|
|
|
- def isActive(self, name):
|
|
- return self.__jails.get(name).isActive()
|
|
+ def isAlive(self, name):
|
|
+ return self.__jails.get(name).isAlive()
|
|
|
|
def setIdleJail(self, name, value):
|
|
self.__jails.get(name).setIdle(value)
|