fixing the issue with disregarding command line parameters

debian-releases/etch
Yaroslav Halchenko 2005-10-14 21:27:19 +00:00
parent 93dbf609fa
commit f2136c09d5
2 changed files with 13 additions and 4 deletions

6
debian/changelog vendored
View File

@ -1,4 +1,4 @@
fail2ban (0.5.4-5.10) unstable; urgency=low
fail2ban (0.5.4-5.11) unstable; urgency=low
* Added a notification regarding the importance of 0.5.4-5 change of
failregex in the config file.
@ -15,7 +15,9 @@ fail2ban (0.5.4-5.10) unstable; urgency=low
chains. Implemented automatic restart of fail2ban main function in
case if check of fwban or fwban command failed (closes: #329163, #331695).
(Introduced patch was further adjusted by upstream author)
* Added -f command line parameter for [findtime]
* Fixing the issue of not respecting command line parameters
-- Yaroslav Halchenko <debian@onerussian.com> Mon, 3 Oct 2005 22:26:28 -1000
fail2ban (0.5.4-5) unstable; urgency=low

View File

@ -62,8 +62,9 @@ def dispUsage():
print " -h display this help message"
print " -i <IP(s)> IP(s) to ignore"
print " -k kill a currently running instance"
print " -r <VALUE> allow a max of VALUE password failure"
print " -t <TIME> ban IP for TIME seconds"
print " -r <VALUE> allow a max of VALUE password failure [maxfailures]"
print " -t <TIME> ban IP for TIME seconds [bantime]"
print " -f <TIME> lifetime in secods of failed entry [findtime]"
print " -v verbose. Use twice for greater effect"
print " -V print software version"
print
@ -150,6 +151,12 @@ def getCmdLineOptions(optList):
except ValueError:
logSys.warn("banTime must be an integer")
logSys.warn("Using default value")
if opt[0] == "-f":
try:
conf["findtime"] = int(opt[1])
except ValueError:
logSys.warn("findTime must be an integer")
logSys.warn("Using default value")
if opt[0] == "-i":
conf["ignoreip"] = opt[1]
if opt[0] == "-r":