From 058621f9bd60adeac0ce2b950835056940cd3e01 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sat, 18 Jan 2014 20:16:38 +1100 Subject: [PATCH] ENH: continue with rest of fail2ban config even if errors. Closes gh-585 --- ChangeLog | 2 ++ THANKS | 1 + fail2ban-client | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4469b43a..b22fd955 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,8 @@ ver. 0.8.12 (2013/12/XX) - things-can-only-get-better a specific jail. - Filter dovecot reordered session and TLS items in regex with wider scope for session characters. Thanks Ivo Truxa. Closes gh-586 + - A single bad failregex or command syntax in configuration files won't stop + fail2ban from starting. Thanks Tomasz Ciolek. Closes gh-585. - Enhancements: - long names on jails documented based on iptables limit of 30 less diff --git a/THANKS b/THANKS index 9224d207..a5ef4fda 100644 --- a/THANKS +++ b/THANKS @@ -82,6 +82,7 @@ Stephen Gildea Steven Hiscocks Tom Pike Tomas Pihl +Tomasz Ciolek Tyler Vaclav Misek Vincent Deffontaines diff --git a/fail2ban-client b/fail2ban-client index 1237680b..0f863ab0 100755 --- a/fail2ban-client +++ b/fail2ban-client @@ -145,6 +145,7 @@ class Fail2banClient: def __processCmd(self, cmd, showRet = True): beautifier = Beautifier() + ret = True for c in cmd: beautifier.setInputCmd(c) try: @@ -155,10 +156,10 @@ class Fail2banClient: if showRet: print beautifier.beautify(ret[1]) else: + ret = False logSys.error("NOK: " + `ret[1].args`) if showRet: print beautifier.beautifyError(ret[1]) - return False except socket.error: if showRet: logSys.error("Unable to contact server. Is it running?") @@ -167,7 +168,7 @@ class Fail2banClient: if showRet: logSys.error(e) return False - return True + return ret ## # Process a command line.