From 52c19503715ac5e21aa98e5cc6bfcfd36c9acda3 Mon Sep 17 00:00:00 2001 From: "Serg G. Brester" Date: Fri, 24 Mar 2017 19:03:17 +0100 Subject: [PATCH 1/3] Update mysqld-auth.conf small typo, closes gh-1725 (Thx @seth-reeser) --- config/filter.d/mysqld-auth.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filter.d/mysqld-auth.conf b/config/filter.d/mysqld-auth.conf index 3ad70cb7..31bd2056 100644 --- a/config/filter.d/mysqld-auth.conf +++ b/config/filter.d/mysqld-auth.conf @@ -1,4 +1,4 @@ -# Fail2Ban filter for unsuccesfull MySQL authentication attempts +# Fail2Ban filter for unsuccesful MySQL authentication attempts # # # To log wrong MySQL access attempts add to /etc/my.cnf in [mysqld]: From e8596cfce755080baee24ceda500b7deb81cb11a Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 27 Mar 2017 11:27:41 +0200 Subject: [PATCH 2/3] amend resp. restore of change from 59c35bc44a175a672e084bc30511dfa3436ff052 (gh-129): - logging of "Log rotation detected" with new MSG level - introduces new log-level MSG (as INFO-2, 18) --- fail2ban/__init__.py | 2 ++ fail2ban/server/filter.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py index cd92dbab..7c752e24 100644 --- a/fail2ban/__init__.py +++ b/fail2ban/__init__.py @@ -34,7 +34,9 @@ Below derived from: https://mail.python.org/pipermail/tutor/2007-August/056243.html """ +logging.MSG = logging.INFO - 2 logging.NOTICE = logging.INFO + 5 +logging.addLevelName(logging.MSG, 'MSG') logging.addLevelName(logging.NOTICE, 'NOTICE') diff --git a/fail2ban/server/filter.py b/fail2ban/server/filter.py index 459a47d0..066ee68f 100644 --- a/fail2ban/server/filter.py +++ b/fail2ban/server/filter.py @@ -820,7 +820,7 @@ class FileContainer: ## sys.stdout.flush() # Compare hash and inode if self.__hash != myHash or self.__ino != stats.st_ino: - logSys.info("Log rotation detected for %s" % self.__filename) + logSys.log(logging.MSG, "Log rotation detected for %s" % self.__filename) self.__hash = myHash self.__ino = stats.st_ino self.__pos = 0 From 7982d1e627913a8cde7bf840bbf3fcb8cb25deda Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 27 Mar 2017 11:31:41 +0200 Subject: [PATCH 3/3] Update ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index e6114caa..213e2c0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,7 @@ releases. - filter.d/domino-smtp: IBM Domino SMTP task (gh-1603) ### Enhancements +* Introduced new log-level `MSG` (as INFO-2, equivalent to 18) ver. 0.9.6 (2016/12/10) - stretch-is-coming