[packages/fail2ban] restore-idle-gate: wstrzymany filtr pyinotify kolejkuje zdarzenia zamiast je gubić linie dopisane w
arekm
arekm at pld-linux.org
Wed Jul 22 17:47:47 CEST 2026
commit 67e31103e5bda1c6597d1dbaf0e95272457da773
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Jul 22 16:10:21 2026 +0200
restore-idle-gate: wstrzymany filtr pyinotify kolejkuje zdarzenia zamiast je gubić
linie dopisane w oknie gate'a >20s czekały na następny zapis do pliku; teraz _addPending/_checkPending przetwarza je zaraz po odwieszeniu
fail2ban-restore-idle-gate.patch | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/fail2ban-restore-idle-gate.patch b/fail2ban-restore-idle-gate.patch
index 3090c18..c1d22ba 100644
--- a/fail2ban-restore-idle-gate.patch
+++ b/fail2ban-restore-idle-gate.patch
@@ -1,6 +1,24 @@
+diff -ru a/fail2ban/server/filterpyinotify.py b/fail2ban/server/filterpyinotify.py
+--- a/fail2ban/server/filterpyinotify.py 2026-07-22 16:02:09.905136616 +0200
++++ b/fail2ban/server/filterpyinotify.py 2026-07-22 16:02:09.905862427 +0200
+@@ -122,8 +122,12 @@
+ if isWF and not os.path.isfile(path):
+ self._addPending(path, event)
+ return
+- # do nothing if idle:
+- if self.idle: # pragma: no cover (too sporadic to get idle in callback)
++ # if idle - don't drop the consumed event, queue the file instead so
++ # _checkPending() processes it right after unpause (idle is routine
++ # now: the restore gate pauses other jails' filters at jail start)
++ if self.idle:
++ if isWF:
++ self._addPending(path, event)
+ return
+ # be sure we process a file:
+ if not isWF:
diff -ru a/fail2ban/server/server.py b/fail2ban/server/server.py
---- a/fail2ban/server/server.py 2026-07-22 10:48:15.519971293 +0200
-+++ b/fail2ban/server/server.py 2026-07-22 10:48:15.520479676 +0200
+--- a/fail2ban/server/server.py 2026-07-22 16:02:09.904922968 +0200
++++ b/fail2ban/server/server.py 2026-07-22 16:02:09.905735774 +0200
@@ -267,7 +267,19 @@
with self.__lock:
jail = self.__jails[name]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/fail2ban.git/commitdiff/74db76d97f2db8dcde983b6ec2568841c1aacf22
More information about the pld-cvs-commit
mailing list