merged with upstream

debian-releases/etch debian/0.5.4-1
Yaroslav Halchenko 2005-09-20 16:37:44 +00:00
parent 018e4a115d
commit b54377be2c
9 changed files with 58 additions and 35 deletions

View File

@ -4,9 +4,22 @@
|_| \__,_|_|_/___|_.__/\__,_|_||_|
=============================================================
Fail2Ban (version 0.5.3) 2005/09/08
Fail2Ban (version 0.5.4) 2005/09/13
=============================================================
ver. 0.5.4 (2005/09/13) - beta
----------
- Fixed bug #1286222.
- Propagated patches introduced by Debian maintainer
(Yaroslav Halchenko):
* Fixed handling of SYSLOG logging target. Now it can log
to any SYSLOG target and facility as directed by the
config
* Format of SYSLOG entries fixed to look closer to standard
* Fixed errata in config/gentoo-confd
* Introduced findtime configuration variable to control the
lifetime of caught "failed" log entries
ver. 0.5.3 (2005/09/08) - beta
----------
- Fixed a bug when overriding "maxfailures" or "bantime".

View File

@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: fail2ban
Version: 0.5.3
Version: 0.5.4
Summary: Ban IPs that make too many password failure
Home-page: http://fail2ban.sourceforge.net
Author: Cyril Jaquier

6
README
View File

@ -4,7 +4,7 @@
|_| \__,_|_|_/___|_.__/\__,_|_||_|
=============================================================
Fail2Ban (version 0.5.3) 2005/09/08
Fail2Ban (version 0.5.4) 2005/09/13
=============================================================
Fail2Ban scans log files like /var/log/pwdfail and bans IP
@ -58,8 +58,8 @@ Require: python-2.3 (http://www.python.org)
To install, just do:
> tar xvfj fail2ban-0.5.3.tar.bz2
> cd fail2ban-0.5.3
> tar xvfj fail2ban-0.5.4.tar.bz2
> cd fail2ban-0.5.4
> python setup.py install
This will install Fail2Ban into /usr/lib/fail2ban. The fail2ban

View File

@ -1,6 +1,6 @@
# Fail2Ban configuration file
#
# $Revision: 1.8.2.11 $
# $Revision: 1.8.2.13 $
#
# 2005.06.21 modified for readability Iain Lea iain@bricbrac.de
@ -23,14 +23,16 @@ debug = false
#
logtargets = /var/log/fail2ban.log
# Option: syslog-target
# Notes.: where to find syslog facility if logtarget SYSLOG.
# Values: file(socket) hostname hostname:port Default: /dev/log
# Option: syslog-target
# Notes.: where to find syslog facility if logtarget SYSLOG.
# Values: SOCKET HOST HOST:PORT Default: /dev/log
#
syslog-target = /dev/log
# Option: syslog-facility
# Notes.: which syslog facility to use if logtarget SYSLOG.
# Values: NUM Default: 1
# Option: syslog-facility
# Notes.: which syslog facility to use if logtarget SYSLOG.
# Values: NUM Default: 1
#
syslog-facility = 1
# Option: pidlock

View File

@ -16,7 +16,7 @@
#
# Author: Cyril Jaquier
#
# $Revision: 1.1 $
# $Revision: 1.1.2.1 $
# Command line options for Fail2Ban. Refer to "fail2ban -h" for
# valid options.

7
debian/changelog vendored
View File

@ -1,7 +1,14 @@
fail2ban (0.5.4-1) unstable; urgency=low
* New upstream release
-- Yaroslav Halchenko <debian@onerussian.com> Tue, 20 Sep 2005 12:19:19 -0400
fail2ban (0.5.3-2) unstable; urgency=low
* Refined comments in README.Debian
* Reindented init.d script
P.S. Was not released
-- Yaroslav Halchenko <debian@onerussian.com> Sun, 11 Sep 2005 15:19:44 -0400

View File

@ -16,12 +16,12 @@
# Author: Cyril Jaquier
# Modified by: Yaroslav Halchenko (SYSLOG, findtime)
#
# $Revision: 1.20.2.16 $
#
# $Revision: 1.20.2.18 $
__author__ = "Cyril Jaquier"
__version__ = "$Revision: 1.20.2.16 $"
__date__ = "$Date: 2005/09/05 21:12:08 $"
__version__ = "$Revision: 1.20.2.18 $"
__date__ = "$Date: 2005/09/13 20:42:33 $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
@ -90,7 +90,7 @@ def sigTERMhandler(signum, frame):
exit properly.
"""
logSys.debug("Signal handler called with sig "+`signum`)
killApp()
killApp()
def killApp():
""" Flush the ban list, remove the PID lock file and exit
@ -227,7 +227,7 @@ def main():
logSys.setLevel(logging.INFO)
elif conf["verbose"] > 1:
logSys.setLevel(logging.DEBUG)
# Set debug log level
if conf["debug"]:
logSys.setLevel(logging.DEBUG)
@ -243,15 +243,14 @@ def main():
# Bug fix for #1234699
os.umask(0077)
for target in conf["logtargets"].split():
# target formatter
# target formatter
# By default global formatter is taken. Is different for SYSLOG
tformatter = formatter
if target == "STDERR":
hdlr = logging.StreamHandler(sys.stderr)
elif target == "SYSLOG":
# SYSLOG target can be either
# a socket (file, so it starts with /)
# a socket (file, so it starts with /)
# or hostname
# or hostname:port
syslogtargets = re.findall("(/[\w/]*)|([^/ ][^: ]*)(:(\d+)){,1}",
@ -270,7 +269,7 @@ def main():
else:
if not ( syslogtargets[0] == "" ): # got socket
syslogtarget = syslogtargets[0]
else: # got hostname and may be a port
else: # got hostname and maybe a port
if syslogtargets[3] == "": # no port specified
port = 514
else:
@ -300,7 +299,7 @@ def main():
logSys.error("You must be root")
if not conf["debug"]:
sys.exit(-1)
# Checks that no instance of Fail2Ban is currently running.
pid = pidLock.exists()
if pid:
@ -350,12 +349,11 @@ def main():
["str", "fwend", ""],
["str", "fwban", ""],
["str", "fwunban", ""])
# Gets the options of each sections
for t in confReader.getSections():
l = confReader.getLogOptions(t, optionValues)
if l["enabled"]:
# Creates a logreader object
lObj = LogReader(l["logfile"], l["timeregex"], l["timepattern"],
l["failregex"], l["maxfailures"], l["findtime"])

View File

@ -16,17 +16,18 @@
# Author: Cyril Jaquier
#
# $Revision: 1.1.2.3 $
# $Revision: 1.1.2.4 $
__author__ = "Cyril Jaquier"
__version__ = "$Revision: 1.1.2.3 $"
__date__ = "$Date: 2005/09/08 18:05:59 $"
__version__ = "$Revision: 1.1.2.4 $"
__date__ = "$Date: 2005/09/12 14:42:08 $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
import logging, smtplib
from utils.strings import replaceTag
from time import strftime, gmtime
# Gets the instance of the logger.
logSys = logging.getLogger("fail2ban")
@ -55,8 +56,10 @@ class Mail:
subj = replaceTag(subject, aInfo)
msg = replaceTag(message, aInfo)
mail = ("From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" %
(self.fromAddr, ", ".join(self.toAddr), subj)) + msg
mail = ("From: %s\r\nTo: %s\r\nDate: %s\r\nSubject: %s\r\n\r\n" %
(self.fromAddr, ", ".join(self.toAddr),
strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()),
subj)) + msg
try:
server = smtplib.SMTP(self.host, self.port)

View File

@ -16,12 +16,12 @@
# Author: Cyril Jaquier
#
# $Revision: 1.12.2.8 $
# $Revision: 1.12.2.10 $
__author__ = "Cyril Jaquier"
__version__ = "$Revision: 1.12.2.8 $"
__date__ = "$Date: 2005/09/08 18:20:51 $"
__version__ = "$Revision: 1.12.2.10 $"
__date__ = "$Date: 2005/09/13 20:43:00 $"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
version = "0.5.3"
version = "0.5.4"