* New upstream release

* Applied post-release changes to resolve issues with gamin and not closed
  on reload log file
pull/3/head
Yaroslav Halchenko 18 years ago
parent ee3f91176c
commit d345865621

8
debian/changelog vendored

@ -1,3 +1,11 @@
fail2ban (0.7.8-1~pre2) UNRELEASED; urgency=low
* New upstream release
* Applied post-release changes to resolve issues with gamin and not closed
on reload log file
-- Yaroslav Halchenko <debian@onerussian.com> Wed, 21 Mar 2007 20:59:15 -0400
fail2ban (0.7.7-1) unstable; urgency=low fail2ban (0.7.7-1) unstable; urgency=low
* New upstream release (included most of the debian-provided patches -- new * New upstream release (included most of the debian-provided patches -- new

@ -0,0 +1,34 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 00_close_log.dpatch by Yaroslav Halchenko <debian@onerussian.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: post release patches
@DPATCH@
Index: server/server.py
===================================================================
--- server/server.py (revision 562)
+++ server/server.py (revision 563)
@@ -326,15 +326,18 @@
else:
# Target should be a file
try:
- open(target, "a")
+ open(target, "a").close()
hdlr = logging.FileHandler(target)
except IOError:
logSys.error("Unable to log to " + target)
logSys.info("Logging to previous target " + self.__logTarget)
return False
self.__logTarget = target
- # Remove previous handler
- logging.getLogger("fail2ban").handlers = []
+ # Removes previous handlers
+ for handler in logging.getLogger("fail2ban").handlers:
+ # Closes the handler.
+ handler.close()
+ logging.getLogger("fail2ban").removeHandler(handler)
# set a format which is simpler for console use
formatter = logging.Formatter("%(asctime)s %(name)-16s: %(levelname)-6s %(message)s")
# tell the handler to use this format

@ -0,0 +1,26 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 00_gamin_cleanup.dpatch by Yaroslav Halchenko <debian@onerussian.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
--- server/filtergamin.py (revision 563)
+++ server/filtergamin.py (revision 565)
@@ -117,5 +117,15 @@
time.sleep(self.getSleepTime())
else:
time.sleep(self.getSleepTime())
+ # Cleanup Gamin
+ self.__cleanup()
logSys.debug(self.jail.getName() + ": filter terminated")
return True
+
+ ##
+ # Desallocates the resources used by Gamin.
+
+ def __cleanup(self):
+ for path in Filter.getLogPath(self):
+ self.monitor.stop_watch(path)
+ del self.monitor

@ -1,2 +1,4 @@
00_mail-whois-lines 00_mail-whois-lines
10_dbts_manpages 10_dbts_manpages
00_close_log
00_gamin_cleanup

Loading…
Cancel
Save