Commit Graph

113 Commits (7c409dd24fbbef88e0d972e20d5f4223a06dce5d)

Author SHA1 Message Date
Yaroslav Halchenko 7c409dd24f Merge branch 'master' of git://github.com/fail2ban/fail2ban
* 'master' of git://github.com/fail2ban/fail2ban:
  BF: log error only if there were missed config files that couldn't be read
  DOC: missing cinfo tags are ok. Log error for self referencing definitions
  DOC: s/defination/definition/g learn to spell
  ENH: remove stats of config files and use results of SafeConfigParserWithIncludes.read to facilitate meaningful error messages
  DOC: ChangeLog for recursive tag substition
  ENH: allow recursive tag substitution in action files.
2013-05-02 23:28:18 -04:00
Yaroslav Halchenko f21566049c BF: pyinotify backend should also handle IN_MOVED_TO events 2013-04-29 13:54:14 -04:00
Daniel Black 1d9abd1b39 ENH: allow recursive tag substitution in action files. 2013-04-29 12:37:16 +10:00
Daniel Black 0ac8746d05 ENH: Account for views in named filter. By Romain Riviere in gentoo bug #259458 2013-04-28 11:03:44 +10:00
Steven Hiscocks 94956bee84 TST: test all valid loglevels in server testcases 2013-04-14 15:59:05 +01:00
Steven Hiscocks 4c4b60f4b4 TST: Add tag replace and escape test for actions 2013-04-14 15:58:35 +01:00
Yaroslav Halchenko ffaa9697ee Adjusting previous PR (MySQL logs) according to my comments 2013-04-09 18:00:40 -04:00
Yaroslav Halchenko 3e6be243bf Merge branch 'Support_for_mysql_log_example' of https://github.com/arto-p/fail2ban
* 'Support_for_mysql_log_example' of https://github.com/arto-p/fail2ban:
  Added testcase for MySQL date format to testcases/datedetectortestcase.py and example of MySQL log file.
  Added support for MySQL logfiles

Conflicts:
	testcases/datedetectortestcase.py -- conflictde with other added test cases
2013-04-09 17:55:14 -04:00
Yaroslav Halchenko 33a31e096a RF+TST: bring inBanList back from private to protected and enabled its rudimentary unittests 2013-03-29 15:33:08 -04:00
Yaroslav Halchenko e7184e70f6 ENH: increase waiting to 4 sec for gamin/pyinotify
This will be the last gesture from me for the bloody tests:
https://travis-ci.org/kwirk/fail2ban/jobs/5904668
2013-03-29 14:59:52 -04:00
Yaroslav Halchenko ef3f2b7e99 TST: be more aggressive in cleanup of temp files + use mktemp instead of mkstemp 2013-03-27 23:40:50 -04:00
Yaroslav Halchenko bf4d4af1d4 ENH(BF?): overload open() (for buffering) within filtertestcase to guarantee atomic writing
This is with the hope to further resolve random tests failures
( primarily on fast travis-ci systems ;) )
2013-03-27 15:11:49 -04:00
Yaroslav Halchenko ab044b75ea BF: delay check for the existence of config directory until read() 2013-03-27 12:22:39 -04:00
Yaroslav Halchenko f643e2e907 non-static (get|set)BaseDir for Configurator. fixes #160
ConfigReader's (get|set)BaseDir are no longer static as a result of
.d/ support RFing
2013-03-27 11:51:07 -04:00
Yaroslav Halchenko 72b06479a5 ENH: Slight tune ups for fresh SOGo filter + comment into the sample log file 2013-03-27 11:09:54 -04:00
Yaroslav Halchenko 105306e1a8 Merge remote-tracking branch 'pr/117/head' -- SOGo filters
* pr/117/head:
  An example of failed logins against sogo
  Update sogo-auth.conf
  Update config/filter.d/sogo-auth.conf
  Create sogo-auth.conf
  Update config/jail.conf
2013-03-27 11:09:35 -04:00
Yaroslav Halchenko cd57d9c552 Merge pull request #155 from yarikoptic/master
TST+ENH: enable basic (smoke) testing of the default jail.conf + improve postfix filter
2013-03-27 05:43:55 -07:00
Yaroslav Halchenko 91d5736c12 ENH: postfix filter -- react also on (450 4.7.1) with empty from/to. fixes #126 2013-03-26 09:40:04 -04:00
Yaroslav Halchenko c06b7abb46 TST: basic testing of reading the shipped jail.conf (forcing all jails to be enabled) 2013-03-26 00:01:56 -04:00
Yaroslav Halchenko 7064a411c2 ENH: _copy_lines_between_files -- read all needed, and only then write/flush at once
I think this is the one which should resolve
https://github.com/fail2ban/fail2ban/issues/103
2013-03-25 23:05:55 -04:00
Yaroslav Halchenko 52af29a080 ENH: adding ability to incorporate tracebacks into log lines while running tests 2013-03-25 23:05:48 -04:00
Yaroslav Halchenko f72bc13111 BF: allow to wait longer for FilterPoll in test_move_file 2013-03-25 23:05:47 -04:00
Yaroslav Halchenko e6983b4f9b BF: Remove custom __str__ for MonitorFailures and just adjust __name__ of the generated class
Also to guarantee unique file names across tests -- append incremental
numeric suffix.

This should prevent unittest from not reporting specific unittest method names,
thus complicating the analysis of failures
2013-03-25 23:05:07 -04:00
Yaroslav Halchenko 755f27493e Merge branch '_tent/conf_d'. fixes #114
It also fixes #115 since current implementation provides similarly informative
error messages.  But see #153 for possible improvements

* _tent/conf_d:
  Reincarnated removed (by mistake) test for SplitAction
  ENH: made log messages while parsing files more informative + test for inaccessible file (Closes: gh-24)
  NF: allow customization configuration under corresponding .d directories (Closes gh-114)
  Fix up for warning/error for inaccessible config files
  Warn if config file present but unreadable

Conflicts:
	fail2ban-testcases
2013-03-25 11:53:45 -04:00
Yaroslav Halchenko 007827fac6 ENH: increase timeout to 20 sec from 10 sec in assert_correct_last_attempt
This is done with a hope to resolve randomly failing tests on travis-ci
and thus fixing the #103
2013-03-25 11:03:55 -04:00
Yaroslav Halchenko 3b4084d471 BF: fixing up for handling of TAI64N timestamps and adding some unittest for prev commit (not effective much though) 2013-03-25 10:41:13 -04:00
Artur Penttinen edc0eb2a9c Added testcase for MySQL date format to testcases/datedetectortestcase.py
and example of MySQL log file.
2013-03-25 16:00:07 +02:00
ArndRa ebb6e5f4eb An example of failed logins against sogo 2013-03-25 09:11:51 +01:00
Yaroslav Halchenko 996e23455c DOC: reverted unneeded stripping of DoW + added comments for why [:6] 2013-03-22 20:56:45 -04:00
Yaroslav Halchenko e3d3a6ac02 Merge branch 'datedetector-testcase' of https://github.com/kwirk/fail2ban
* 'datedetector-testcase' of https://github.com/kwirk/fail2ban:
  Correct datedetector testcases for TAI64N format
  Additional date/time formats for datedetector testcases
2013-03-22 20:27:39 -04:00
Steven Hiscocks ec87e3edbd TST: Break out server testcases that modify logging settings 2013-03-22 21:15:37 +00:00
Yaroslav Halchenko 99bf14851f BF+TST: Introduce delay before stopping all jails in testStartStopAllJail. fixes #146 2013-03-22 09:20:21 -04:00
Yaroslav Halchenko 1330c7d4b8 Merge branch 'socket-testcase' of https://github.com/kwirk/fail2ban
* 'socket-testcase' of https://github.com/kwirk/fail2ban:
  Update MANIFEST with and author of testcases/sockettestcase.py
  Added testcase for csocket and asyncserver
2013-03-17 10:10:11 -04:00
Steven Hiscocks 43b8a66482 Update MANIFEST with and author of testcases/sockettestcase.py 2013-03-17 09:18:14 +00:00
Steven Hiscocks 86d48a854f Correct datedetector testcases for TAI64N format 2013-03-16 18:18:27 +00:00
Steven Hiscocks 883892a683 Additional date/time formats for datedetector testcases
Also made a note that some workarounds for certain date/time formats
may cause week/year day to be incorrect. This does not affect
functionality of fail2ban so no urgency to fix.
2013-03-16 17:55:22 +00:00
Steven Hiscocks d4362859ef Added testcase for csocket and asyncserver 2013-03-11 17:22:57 +00:00
Steven Hiscocks 4bbbc07872 Added additional Transmitter tests, and some associated fixes
This includes some tweaks such that errors are raised for certain
commands
2013-03-10 14:55:39 +00:00
Daniel Black 3665e6dc44 Add development documentation and framework for code coverage measurement 2013-03-10 15:18:42 +11:00
Steven Hiscocks b36835f6f0 Added transmitter get cinfo option for action 2013-02-20 23:33:39 +00:00
Steven Hiscocks b6a68f5138 Fix for missing value in transmitter delaction 2013-02-20 23:24:46 +00:00
Steven Hiscocks 088e40c481 Rewrite and enable server testcase for Transmitter 2013-02-20 23:14:42 +00:00
Yaroslav Halchenko ec3080cba5 Reincarnated removed (by mistake) test for SplitAction 2013-02-17 17:21:03 -05:00
Yaroslav Halchenko 2312b1d950 ENH: made log messages while parsing files more informative + test for inaccessible file (Closes: gh-24) 2013-02-17 17:19:09 -05:00
Yaroslav Halchenko 9ba27353b6 NF: allow customization configuration under corresponding .d directories (Closes gh-114)
Additional changes:
  ENH: make basedir for Config's a kwarg to the constructor
  ENH: improved analysis/reporting on presence/accessibility of config
       files.  Got carried away and forgot about existing  work done by
	   Steven Hiscocks in the gh-115 -- will merge it in the next
       commit for the fair ack of his work

Now for any X.conf configuration file we have following ways to
provide customizations

  X.local -- read after .conf (kept for backward compatibility)
  X.d/ -- directory to contain additional .conf files, sorted
               alphabetically, e.g
  X.d/01_enable.conf       - to enable the jail
  X.d/02_custom_port.conf  - to change the port

X could be a 'jail' or 'fail2ban' or any other configuration file in
fail2ban.

Mention that all files still must contain the corresponding sections
(most of the time duplicating it across all of them).
2013-02-17 17:03:23 -05:00
Yaroslav Halchenko 5f2d3832f7 NF: roundcube-auth filter (to close Debian #699442, needing debian/jail.conf section) 2013-01-31 14:41:34 -05:00
Yaroslav Halchenko 9a39292813 ENH: Added login authenticator failed regexp for exim filter 2013-01-04 15:23:05 -05:00
Yaroslav Halchenko 21e966e4bb example logs should carry the same name as the filter they are devised for 2012-12-13 08:24:02 -05:00
pigsyn 123d457924 Update testcases/files/logs/Webmin 2012-12-13 08:33:07 +01:00
pigsyn 38dd1506cc Sample Webmin logs 2012-12-12 23:25:31 -08:00