From fbfc85d8c0337bd6167bbb5279792f17ddbbb355 Mon Sep 17 00:00:00 2001 From: "Sergey G. Brester" Date: Thu, 12 May 2022 18:09:09 +0200 Subject: [PATCH 1/2] common.conf: fixed typo in comment (rfc5424 for logtype) no functional changes; closes #3274 --- config/filter.d/common.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filter.d/common.conf b/config/filter.d/common.conf index 13286038..e6b3c641 100644 --- a/config/filter.d/common.conf +++ b/config/filter.d/common.conf @@ -10,7 +10,7 @@ after = common.local [DEFAULT] -# Type of log-file resp. log-format (file, short, journal, rfc542): +# Type of log-file resp. log-format (file, short, journal, rfc5424): logtype = file # Daemon definition is to be specialized (if needed) in .conf file From 5aeb49a62005cbc9635037fdf2373d044e2b0d8d Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 2 Jun 2022 21:01:44 +0200 Subject: [PATCH 2/2] systemd backend: fixes missing space in message (tag ``) between timestamp and host if the message read from systemd journal; closes gh-3293 --- fail2ban/server/filtersystemd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail2ban/server/filtersystemd.py b/fail2ban/server/filtersystemd.py index 8c67eedc..bf6885ef 100644 --- a/fail2ban/server/filtersystemd.py +++ b/fail2ban/server/filtersystemd.py @@ -250,7 +250,7 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover logSys.log(5, "[%s] Read systemd journal entry: %s %s", self.jailName, date[0], logline) ## use the same type for 1st argument: - return ((logline[:0], date[0], logline.replace('\n', '\\n')), date[1]) + return ((logline[:0], date[0] + ' ', logline.replace('\n', '\\n')), date[1]) def seekToTime(self, date): if isinstance(date, (int, long)):