Commit Graph

1088 Commits (a648cc29e81263f423ecb62f776a7d81c4c72c38)

Author SHA1 Message Date
Yaroslav Halchenko a648cc29e8 Merge: 'github_kwirk_fail2ban/filter-init' into 0.9 -- allow options for filters (move maxlines into filters handling)
* github_kwirk_fail2ban/filter-init:
  ENH: Renamed OptionConfigReader to DefinitionInitConfigReader
  ENH: Rename splitAction to extractOptions in jailreader
  ENH: Use os.path.join for filter/action config readers
  ENH: Remove redundant `maxlines` option from jail reader
  TST: Add test for FilterReader [Init] `maxlines` override
  ENH: Move jail `maxlines` to filter config
  NF: Filters now allow adding of [Init] section similar to actions

Conflicts:
	fail2ban/tests/clientreadertestcase.py
2013-04-21 23:34:48 -04:00
Yaroslav Halchenko 28f00161c9 Merge 'github_kwirk_fail2ban/warnings-fix' into 0.9: warnings + tests
* github_kwirk_fail2ban/warnings-fix:
  BF+TST: Correctly reset time in tearDownMyTime
  ENH: Reimplement warning suppression of setup.py test --quiet
  BF: Remove warnings handler which breaks setup.py python2<2.7 and python3<3.2
  ENH: For python3.2+ use ConfigPaser which replaces SafeConfigParser
  TST: Change depreciated unittest assertEquals method to assertEqual
  TST: Ensure files are closed in tests to remove ResourceWarnings
  BF: Change logging instance logSys `warn` method to `warning`
2013-04-21 22:57:37 -04:00
Steven Hiscocks dadd6aed2f BF+TST: Correctly reset time in tearDownMyTime 2013-04-21 17:39:56 +01:00
Steven Hiscocks 6f3c66f466 ENH: Reimplement warning suppression of setup.py test --quiet 2013-04-21 13:23:08 +01:00
Steven Hiscocks e57505e074 ENH: Renamed OptionConfigReader to DefinitionInitConfigReader 2013-04-21 11:27:32 +01:00
Steven Hiscocks 1a43a0bce1 ENH: Rename splitAction to extractOptions in jailreader 2013-04-21 11:26:46 +01:00
Steven Hiscocks c95b87c13c ENH: Use os.path.join for filter/action config readers 2013-04-21 11:21:06 +01:00
Steven Hiscocks 9d2d907fc1 BF: Remove warnings handler which breaks setup.py python2<2.7 and python3<3.2 2013-04-21 10:59:14 +01:00
Steven Hiscocks b182c5b5d4 ENH: For python3.2+ use ConfigPaser which replaces SafeConfigParser
Current SafeConfigParser alias to be dropped in future python versions
2013-04-21 10:30:13 +01:00
Steven Hiscocks 3936793413 TST: Change depreciated unittest assertEquals method to assertEqual 2013-04-21 10:28:34 +01:00
Steven Hiscocks c9b1b88bfc TST: Ensure files are closed in tests to remove ResourceWarnings 2013-04-21 10:26:30 +01:00
Steven Hiscocks 12df12f282 BF: Change logging instance logSys `warn` method to `warning`
`warn` is long time depreciated method, which may be dropped in
python3.4 http://bugs.python.org/issue13235
2013-04-21 10:21:54 +01:00
Yaroslav Halchenko 7341031a30 ENH: use os.path.join for consistency -- add "Contributors" to authors 2013-04-20 23:12:38 -04:00
Steven Hiscocks f07a92f0f7 RF: setup.py now imports version number again 2013-04-21 00:58:22 +01:00
Steven Hiscocks 55810a3c30 TST+RF: Add ability to execute test from setup.py with setuptools
Note that the fail2ban version can no longer be imported from
"fail2ban.version", as this breaks 2to3 conversion for tests
2013-04-20 20:17:36 +01:00
Steven Hiscocks 9e684abad7 TST: Move test gathering to function is test utils 2013-04-20 20:13:21 +01:00
Steven Hiscocks 4cc3a81cc1 TST: Move test TZ changes to setUp and tearDown methods 2013-04-20 20:09:44 +01:00
Steven Hiscocks b47ea7f813 ENH: Remove redundant `maxlines` option from jail reader 2013-04-19 18:17:56 +01:00
Steven Hiscocks 5b227b6670 TST: Add test for FilterReader [Init] `maxlines` override 2013-04-18 22:33:42 +01:00
Steven Hiscocks 9672e44d39 ENH: Move jail `maxlines` to filter config 2013-04-18 22:11:41 +01:00
Steven Hiscocks 01499ad0de NF: Filters now allow adding of [Init] section similar to actions 2013-04-18 22:07:19 +01:00
Yaroslav Halchenko 9a14cf8b7b Merge branch 'master' into 0.9
* master:
  DOC: initiated changelog (but not juice left to actually fill it up ;-))
  TST: test all valid loglevels in server testcases
  TST: Add tag replace and escape test for actions
  ENH: Minor change to action for consistency of execStart/Stop
  TST: Coverage for coveralls.io should only be run on success
  TST: no cover additions to server, primarily daemon creation
  DOC: thanks @kwirk for spotting the typos in exception message
  FD_CLOEXEC support
  Typo in default pidfile in fail2ban.conf

Conflicts:
	.travis.yml   -- after_success
	ChangeLog     -- added perspective changelog for 0.8.9
	fail2ban/server/asyncserver.py -- imports
	fail2ban/server/server.py -- no pragma (if I got it right ;-) )
2013-04-16 23:50:43 -04:00
Yaroslav Halchenko b8e823bd4e DOC: initiated changelog (but not juice left to actually fill it up ;-)) 2013-04-16 23:44:38 -04:00
Yaroslav Halchenko 4869186c8f Merge branch 'py3' of https://github.com/kwirk/fail2ban into 0.9
* 'py3' of https://github.com/kwirk/fail2ban: (38 commits)
  DOC: Add python3 to requirements
  ENH: Clarify use of bytes in csocket and asyncserver for python3
  DOC: Revert dnsToIp error change, seperate log message for socket.error
  TST: Tweak python3 open statement to resolve python2.5 SyntaxError
  TST: Revert changes for filter testcase open statement
  DOC: Revert setup.py messages to use print statement
  Add *.bak files generated by 2to3 to gitignore
  TST: Fix up fail2ban python3 scripts
  TST: Fix issues in tests which assumed dictionary's order
  ENH: setup.py now automatically runs 2to3 for python3.x
  TST: Remove Travis CI unsupported versions of python from Travis config
  add fail2ban-2to3 to MANIFEST file
  ENH: Add python3 versions to Travis CI config
  BF: Handle expected errors for python3.{0,1} when changing log target
  Minor tweaks to fail2ban-regex for encoding
  Added ability to set log file encoding with fail2ban-regex
  Add ability to set log encoding for jail
  Move handling of unicode decoding to FileContainer readline
  Fix incorrect exit code from fail2ban-2to3
  Remove redundant reassignment of variable
  ...

Conflicts:
	fail2ban/tests/servertestcase.py -- both branches added a new unittest at the same point
2013-04-16 23:24:49 -04:00
Yaroslav Halchenko f5572c8ade Merge pull request #173 from kwirk/maxlines
Maxlines jail setting tweaks
2013-04-16 19:50:00 -07:00
Yaroslav Halchenko 8af32ed547 Merge pull request #176 from kwirk/guacamole
Guacamole filter and Apache Tomcat date format
2013-04-16 17:44:28 -07:00
Steven Hiscocks 4d80fad874 ENH+DOC: Add Guacamole filter, example log and jail 2013-04-16 21:13:31 +01:00
Steven Hiscocks c6bd8fc807 ENH+TST: Add Apache Tomcat date format 2013-04-16 21:09:53 +01:00
Steven Hiscocks 1756f709da DOC: Revert change to fail2ban-refex from 183cfa6 2013-04-15 22:14:00 +01:00
Steven Hiscocks 183cfa6e00 ENH: Default maxlines value in jail.conf, and verify value is int >0 2013-04-15 21:21:19 +01:00
Steven Hiscocks be0e8faa4e TST: Add maxlines to transmitter testcases 2013-04-15 21:14:12 +01:00
Steven Hiscocks f14cb7302a DOC: Add python3 to requirements 2013-04-15 21:00:45 +01:00
Steven Hiscocks 4db77ebf41 ENH: Clarify use of bytes in csocket and asyncserver for python3 2013-04-15 20:47:37 +01:00
Steven Hiscocks a8f2e02eea DOC: Revert dnsToIp error change, seperate log message for socket.error 2013-04-15 20:44:13 +01:00
Yaroslav Halchenko 12f1398ec1 Merge pull request #172 from kwirk/minor
Minor tweaks -- removing duplication and improving testing
2013-04-15 06:31:09 -07: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
Steven Hiscocks 3d6791fe3e ENH: Minor change to action for consistency of execStart/Stop 2013-04-14 15:57:37 +01:00
Steven Hiscocks d259e903a3 TST: Coverage for coveralls.io should only be run on success 2013-04-14 15:56:14 +01:00
Steven Hiscocks 28e9acf86a TST: no cover additions to server, primarily daemon creation 2013-04-14 15:55:18 +01:00
Steven Hiscocks 88187fc161 TST: Tweak python3 open statement to resolve python2.5 SyntaxError 2013-04-14 11:00:08 +01:00
Steven Hiscocks d28788c87b TST: Revert changes for filter testcase open statement
Also merging python3 support
2013-04-14 10:24:44 +01:00
Steven Hiscocks 36097ffc3e DOC: Revert setup.py messages to use print statement 2013-04-14 10:18:22 +01:00
Yaroslav Halchenko ffe48741e3 DOC: thanks @kwirk for spotting the typos in exception message 2013-04-13 22:20:57 -04:00
Steven Hiscocks 70bcb0e32f Add *.bak files generated by 2to3 to gitignore 2013-04-13 17:05:19 +01:00
Steven Hiscocks 9241ded376 TST: Fix up fail2ban python3 scripts 2013-04-13 17:01:18 +01:00
Steven Hiscocks d061b2b549 TST: Fix issues in tests which assumed dictionary's order 2013-04-13 16:55:22 +01:00
Steven Hiscocks fa0f8f9e6d Merge branch '0.9' into py3
Conflicts:
	.travis.yml
	MANIFEST
	bin/fail2ban-regex
	fail2ban/server/filter.py
	fail2ban/tests/servertestcase.py
	setup.py
2013-04-13 16:54:22 +01:00
Yaroslav Halchenko 301460f451 Merge remote-tracking branch 'pr/167/head': FD_CLOEXEC bug fixes (filters) + support (actions). Avoid sockets descriptors leak.
* pr/167/head:
  FD_CLOEXEC support
2013-04-11 15:05:56 -04:00
Yaroslav Halchenko 5aef036f54 Merge remote-tracking branch 'github_kwirk_fail2ban/module' into 0.9
* github_kwirk_fail2ban/module:
  TST: revert change of log format for testcases in commit a3d82e2
  ENH: fail2ban logging uses __name__ for logger names
2013-04-11 14:19:39 -04:00