mirror of https://github.com/fail2ban/fail2ban
fixed an issue with command line parameters
parent
f2136c09d5
commit
ac5242815f
|
@ -54,6 +54,12 @@ class ConfigReader:
|
||||||
sections.remove("MAIL")
|
sections.remove("MAIL")
|
||||||
logSys.debug("Found sections: " + `sections`)
|
logSys.debug("Found sections: " + `sections`)
|
||||||
return sections
|
return sections
|
||||||
|
|
||||||
|
def setValue(self, sec, label, value):
|
||||||
|
""" Override a value for a section
|
||||||
|
"""
|
||||||
|
self.configParser.set(sec, label, value)
|
||||||
|
|
||||||
|
|
||||||
# Each optionValues entry is composed of an array with:
|
# Each optionValues entry is composed of an array with:
|
||||||
# 0 -> the type of the option
|
# 0 -> the type of the option
|
||||||
|
@ -82,4 +88,4 @@ class ConfigReader:
|
||||||
"'. Using default one: '" + `option[2]` + "'")
|
"'. Using default one: '" + `option[2]` + "'")
|
||||||
values[option[1]] = option[2]
|
values[option[1]] = option[2]
|
||||||
return values
|
return values
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,8 @@ fail2ban (0.5.4-5.11) unstable; urgency=low
|
||||||
case if check of fwban or fwban command failed (closes: #329163, #331695).
|
case if check of fwban or fwban command failed (closes: #329163, #331695).
|
||||||
(Introduced patch was further adjusted by upstream author)
|
(Introduced patch was further adjusted by upstream author)
|
||||||
* Added -f command line parameter for [findtime]
|
* Added -f command line parameter for [findtime]
|
||||||
* Fixing the issue of not respecting command line parameters
|
* Fixed the issue of not respecting command line parameters for parameters
|
||||||
|
within sections
|
||||||
|
|
||||||
-- Yaroslav Halchenko <debian@onerussian.com> Mon, 3 Oct 2005 22:26:28 -1000
|
-- Yaroslav Halchenko <debian@onerussian.com> Mon, 3 Oct 2005 22:26:28 -1000
|
||||||
|
|
||||||
|
|
|
@ -228,6 +228,13 @@ def main():
|
||||||
|
|
||||||
# Gets command line options
|
# Gets command line options
|
||||||
getCmdLineOptions(optList)
|
getCmdLineOptions(optList)
|
||||||
|
|
||||||
|
# Now we need to update confReader.configParser with 'commandline'
|
||||||
|
# overwritten parameters. There is no way to assign configParser
|
||||||
|
# with defaults (as I thought before) below in the code: thus defaults
|
||||||
|
# have to be overridden
|
||||||
|
for t, label, v in optionValues:
|
||||||
|
confReader.setValue("DEFAULT", label, `conf[label]`)
|
||||||
|
|
||||||
# PID lock
|
# PID lock
|
||||||
pidLock.setPath(conf["pidlock"])
|
pidLock.setPath(conf["pidlock"])
|
||||||
|
|
Loading…
Reference in New Issue