mirror of https://github.com/fail2ban/fail2ban
fixing the issue with disregarding command line parameters
parent
93dbf609fa
commit
f2136c09d5
|
@ -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
|
||||
|
|
11
fail2ban.py
11
fail2ban.py
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue