mirror of https://github.com/fail2ban/fail2ban
closes #2596: fixed supplying of backend-related `logtype` to the jail filter - don't merge it (provide as init parameter if not set in definition section), init parameters don't affect config-cache (better implementation as in #2387 and it covered now with new test)
parent
05f9e53660
commit
8dc6f30cdd
@ -0,0 +1,31 @@
|
|||||||
|
# Fail2Ban configuration file
|
||||||
|
#
|
||||||
|
|
||||||
|
[INCLUDES]
|
||||||
|
|
||||||
|
# Read common prefixes (logtype is set in default section)
|
||||||
|
before = ../../../../config/filter.d/common.conf
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
_daemon = test
|
||||||
|
|
||||||
|
failregex = ^<lt_<logtype>/__prefix_line> failure from <HOST>$
|
||||||
|
ignoreregex =
|
||||||
|
|
||||||
|
# following sections define prefix line considering logtype:
|
||||||
|
|
||||||
|
# backend-related (retrieved from backend, overwrite default):
|
||||||
|
[lt_file]
|
||||||
|
__prefix_line = FILE
|
||||||
|
|
||||||
|
[lt_journal]
|
||||||
|
__prefix_line = JRNL
|
||||||
|
|
||||||
|
# specified in definition section of filter (see filter checklogtype_test.conf):
|
||||||
|
[lt_test]
|
||||||
|
__prefix_line = TEST
|
||||||
|
|
||||||
|
# specified in init parameter of jail (see ../jail.conf, jail checklogtype_init):
|
||||||
|
[lt_init]
|
||||||
|
__prefix_line = INIT
|
@ -0,0 +1,12 @@
|
|||||||
|
# Fail2Ban configuration file
|
||||||
|
#
|
||||||
|
|
||||||
|
[INCLUDES]
|
||||||
|
|
||||||
|
# Read common prefixes (logtype is set in default section)
|
||||||
|
before = checklogtype.conf
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
# overwrite logtype in definition (no backend anymore):
|
||||||
|
logtype = test
|
Loading…
Reference in new issue