Commit Graph

588 Commits (576719198805063c1c3b30a7cb31f7beedd7c2f8)

Author SHA1 Message Date
Daniel Black cb982ef921 ENH: multiline filter for sendmail-spam. Closes gh-418 2013-11-08 08:55:45 +11:00
Daniel Black 2f79e7cd49 TST: fix test case for testVariousTimes 2013-11-06 11:01:35 +11:00
Daniel Black 47d35c9d80 MRG: 0.8.11 to 0.9
Epnoc of selinux is now true UTC

Merge multiline support and date detection in filter
2013-11-02 15:59:05 +11:00
Daniel Black 359210f224 ENH: filter.d/squirrelmail added 2013-10-08 20:37:33 +11:00
Daniel Black b8d9c07280 Merge pull request #368 from grooverdan/0.9_datedetmerge
MRG: general merge from master + date time zone
2013-09-28 15:18:20 -07:00
Daniel Black 7b52a578bd BF: group _f for %f in strptime for py2.5 compatibility 2013-09-28 21:29:39 +10:00
Daniel Black 6fd2179725 BF: timefix 2013-09-28 21:15:01 +10:00
Daniel Black 30d1f003e1 BF: add multiline support 2013-09-28 20:56:48 +10:00
Steven Hiscocks 011ccbc675 TST+BF: Fix bug in Filter.{get,set}DatePattern and improve tests 2013-09-24 22:25:17 +01:00
Steven Hiscocks 9c61adcad7 ENH+DOC: Allow setting of Epoch and TAI64N date pattern
Also add this to jail.conf man page
2013-09-24 22:11:04 +01:00
Steven Hiscocks badf9d03b9 ENH: Allow setting of ISO8601 via datepattern (default for systemd) 2013-09-22 18:12:16 +01:00
Daniel Black b3cd5ca807 BF: correct scope for datetime.now 2013-09-22 21:51:51 +10:00
Daniel Black 37de5462be ENH: iso8601 - remove default_timezone set to UTC, isn't valid any more - calculate from local timezone. Enforce T date/time separator in iso8601 regex. Make minutes in timezone optional as per ISO8601. Use consistant regex for ISO8601 2013-09-21 11:47:24 +10:00
Daniel Black a0676cdd1e ENH: add date format 2005-01-23 21:59:59 (%Y-%m-%d %H:%M:%S) so ISO8601 doesnt handle it 2013-09-21 11:44:50 +10:00
Daniel Black 855d802ba8 ENH: more detail in debug messages in date/time detection 2013-09-21 10:31:26 +10:00
Daniel Black 0035c99d07 BF: remove unused function DateDetector.getUnixTime 2013-09-21 10:22:15 +10:00
Daniel Black ec0670f6d5 BF: fix MyTime imports 2013-09-21 09:44:24 +10:00
Daniel Black 33aee14fcc DOC: comment examples of date formats 2013-09-21 09:16:31 +10:00
Daniel Black cfd9778f3c TST: fix unicode on test strings 2013-09-20 21:43:27 +10:00
Daniel Black d9f0438a8d MRG: remerge in %z and %f datetime format 2013-09-20 21:18:44 +10:00
Daniel Black 0f283f8b6f BF: wrong variable name in previous merge 2013-09-20 21:16:39 +10:00
Daniel Black 9805d39b60 MRG: merge date changes to support timezones 2013-09-20 18:22:32 +10:00
Daniel Black 1f1a56174f MRG: merge from master 2013-09-08 21:02:35 +10:00
Daniel Black d5291517a7 MISC: merge from master 2013-07-28 19:43:54 +10:00
Steven Hiscocks 3392190924 DOC: Point to jail.conf(5) manpage when date not matched by datedetector 2013-07-26 18:14:31 +01:00
Steven Hiscocks 27feb57e80 Merge pull request #299 from kwirk/datepatterns-dateregex
Custom date templates and date detector changes
2013-07-26 03:53:40 -07:00
Steven Hiscocks 26b472f70f ENH: Add ejabberd-auth filter and sample log lines 2013-07-18 21:31:51 +01:00
Steven Hiscocks 2b6ecfe56a TST: More verbose when multiple regexs matched in sample test case 2013-07-17 22:25:27 +01:00
Steven Hiscocks 7c3a2a0223 ENH: Allow setting of date pattern as part of filter config Init section 2013-07-17 21:27:19 +01:00
Steven Hiscocks 614fb8505e BF: globally make HEAVYDEBUG logging level when importing fail2ban 2013-07-17 21:12:48 +01:00
Steven Hiscocks 674e1d82f4 TST: vsftpd fail data update due to recent date pattern changes 2013-07-17 21:12:16 +01:00
Steven Hiscocks bf86edb3ae BF: ISO8601 format now returns time in local time zone 2013-07-17 21:11:29 +01:00
Steven Hiscocks d661b8c046 BF: Apache regex and sample fail data update due to date pattern changes 2013-07-17 21:09:30 +01:00
Steven Hiscocks 72430e805d Merge branch 'datepatterns' into datepatterns-dateregex
Conflicts:
	bin/fail2ban-regex
	fail2ban/client/beautifier.py
	fail2ban/server/datedetector.py
2013-07-17 21:07:09 +01:00
Steven Hiscocks 05fac65a50 BF: fail2ban-regex multiline regex matches no longer in missed lines
Closes #263
Closes #282
2013-07-17 00:08:43 +01:00
Steven Hiscocks c61ba9f0de ENH+BF: Allow multi lines regex to be tested with samples test case
Multi line regex currently only flags on last line, and other lines must
be labelled as not matched.
TODO: Create extension to fail JSON data to allow tying together of
multiple lines
2013-07-16 23:47:28 +01:00
Steven Hiscocks 1eea0dcec8 Merge branch 'master' into 0.9
Conflicts:
	ChangeLog
	bin/fail2ban-regex
	bin/fail2ban-testcases
	config/jail.conf
	fail2ban/server/failregex.py
	fail2ban/server/filter.py
	fail2ban/tests/files/logs/lighttpd
	fail2ban/tests/files/logs/mysqld.log
	fail2ban/tests/files/logs/wu-ftpd
	fail2ban/tests/filtertestcase.py
	fail2ban/tests/utils.py
	testcases/files/logs/lighttpd
	testcases/files/logs/lighttpd-auth
	testcases/files/logs/mysqld-auth
	testcases/files/logs/mysqld.log
	testcases/files/logs/wu-ftpd
	testcases/files/logs/wuftpd
2013-07-16 23:16:22 +01:00
Steven Hiscocks acf9e51d98 BF+DOC: All fail2ban config files are UTF-8 decoded for python3 2013-07-10 22:18:53 +01:00
Steven Hiscocks 25f06f779d TST: Execute action timeout test almost equal assertion more forgiving 2013-07-05 18:56:47 +01:00
Steven Hiscocks 8513fde92a BF: Skip error in jail reader when no log files and with systemd backend
Updated to avoid logpath elements entirely
2013-06-30 00:50:15 +01:00
Steven Hiscocks 1aee817be2 BF: Skip error in jail reader when no log files and with systemd backend 2013-06-29 23:26:40 +01:00
Steven Hiscocks 379b4860a1 TST: Fix test for MultipleSameAction with no logs files 2013-06-29 20:36:09 +01:00
Steven Hiscocks 1dbba35cd9 Merge branch 'master' into 0.9
Conflicts:
	fail2ban/client/jailreader.py
	fail2ban/tests/clientreadertestcase.py
	fail2ban/tests/files/logs/sshd
2013-06-29 20:31:26 +01:00
Steven Hiscocks 5ca6a9aeb6 Merge branch 'systemd-journal' into 0.9
Conflicts:
	bin/fail2ban-regex
	config/filter.d/sshd.conf

Closes github #224
2013-06-29 13:00:40 +01:00
Yaroslav Halchenko 8487cb2e90 Merge commit '0.8.10-31-g1ab0f0f' into 0.9
* commit '0.8.10-31-g1ab0f0f': (24 commits)
  BF/ENH: Incorrect authentication data doesn't need tailier so that's optional. Also gained log entry for Unrouteable address
  ENH: readibility thanks to Yaroslav
  DOC: Changelog for fail2ban-regex RF
  DOC: Changelog for asterisk hardening
  ENH: fail2ban-regex -- add specification of loglevels to enable
  RF: reworked -regex cmdline tool to use optparse, some unification and enhancement of outputs
  ENH: 'heavydebug' level == 5 for even more debugging in tricky cases
  ENH: asterisk -- use \S instead of [^:] + prefix failregex with ^\[
  BF: missed a space
  BF: [SSL-out] is optional in assp
  ENH: regex hardening on assp
  ENH: anchor a bit mor. Use \d and \w where possible. Escape a literal .
  TST: attempts at injection with username=rhost=1.2.3.4 have no user= logged in dovecot-1.2.15
  ENH: proftpd chan accept usernames with spaces
  ENH: injection of fail data into USER field
  ENH: dovecot regexs rewritten and extra failures
  ENH: proftp regex hardening and log messages
  ENH/BF: exim improvements with sample
  BF: fix to proxy port in 3proxy example
  ENH: sample log + more specific regex
  ...

Conflicts: -- it was a messy merge/resolution.
	ChangeLog
	bin/fail2ban-regex
	fail2ban-testcases
	fail2ban/server/filter.py
2013-06-18 20:21:23 -04:00
Steven Hiscocks 9b8eaa90ef ENH: Reorder date regex and remove duplicate ISO8601 format 2013-06-18 22:19:53 +01:00
Yaroslav Halchenko f6cb981fc0 Merge commit '0.8.10-1-g460e09a' into 0.9
* commit '0.8.10-1-g460e09a':
  it was not the end of the world and we should continue
  DOC: add information on where to report vulnerabilities + pointer to HOWTO_Seek_Help
  Changes for 0.8.10 release (changelog, version, etc)
  BF: anchor apache- filters.  Close #248
  DOC: credits for gh-244
  Filter Asterisk: Add sample log entry to testcase.
  Filter Asterisk: Add AUTH_UNKNOWN_DOMAIN error to list
  ENH: purge a few more .*
  DOC: credits
  DOC: how to do filter enhancements
  TST: normalize logs to use example.com and 1.2.3.4 as IP
  ENH/BF: constrain regex. Fix ACL error regex
  ENH: port optional
  Update asterisk
  Update asterisk.conf

Conflicts:
	ChangeLog
	DEVELOP
	README.md
	fail2ban/version.py
2013-06-12 21:30:47 -04:00
Yaroslav Halchenko 9f9e9a33c6 BF: in 0.9 it is allowed to have multiple same actions with different names -- so use action_name
+ address RF action._ActionReader__cInfo -> action._initOpts
2013-05-29 12:38:03 -04:00
Yaroslav Halchenko ea6f3bedb0 BF: DefinitionInitConfigReader has _file, not __file 2013-05-29 12:36:40 -04:00
Yaroslav Halchenko a3161f59fa Merge commit '0.8.9-13-g39d32e0' into 0.9
* commit '0.8.9-13-g39d32e0':
  Changelog for previous PR
  DOC: Changelog entry fro preceeding merge from Terence
  TST: Fix fail2ban.conf reader test for unreliable dictionary order
  failregex when roundcube log driver is set to 'syslog'
  fixed failregex line for roundcube 0.9+
  TST: test all stock jails to have actions and correctly specifying blocktype
  CFG: assure actions for all the jails
  BF: blocktype must be defined within [Init] -- adding [Init] section.  Close #232
  ENH: since it seems the default is to use file based logging, $syslog is in Should-{Start|Stop} like Debian https://github.com/fail2ban/fail2ban/blob/debian/debian/fail2ban.init
  ENH: opensuse script from opensuse: https://build.opensuse.org/package/view_file?expand=1&file=fail2ban.init&package=fail2ban&project=openSUSE%3AFactory

Conflicts:
	ChangeLog
	config/jail.conf
	testcases/clientreadertestcase.py -- had to "git show XXX | patch -p2" under tests/ 2 commits: 8a57ffd 7a4db4b
2013-05-29 11:32:35 -04:00
Yaroslav Halchenko d379c0c06d Merge branch 'sshd-locked' of https://github.com/kwirk/fail2ban into 0.9
* 'sshd-locked' of https://github.com/kwirk/fail2ban:
  DOC: Update man page for <SKIPLINES> usage
  ENH: Add new regex for locked accounts for sshd
  BF: fail2ban-regex adding duplicate lines with each regex
2013-05-28 00:27:34 -04:00
Yaroslav Halchenko 84e8ba698a BF: remedy traceback testing case -- just check if called from fail2ban-testcases 2013-05-28 00:26:54 -04:00
Steven Hiscocks 49261925d7 ENH: Add new regex for locked accounts for sshd 2013-05-27 22:06:49 +01:00
Steven Hiscocks 01109e3a04 BF: Fix status of systemd filter backend 2013-05-26 14:05:11 +01:00
Steven Hiscocks 00e289e11b BF+TST: Fix handling of spaces and + char for journalmatch
Previous fix attempted shlex split which whilst worked for reading from
config file, failed when using fail2ban-client, as the input is already
effectively shelx split by the executing shell.

FilterSystemd journal match methods now handle list structures which
should be shlex split when reading from config file, and simply pass all
the relevant arguments from the shell when using fail2ban-client
2013-05-15 00:31:16 +01:00
Steven Hiscocks 09199095b4 BF: Allow journal matches with spaces and "+" in 2013-05-13 23:42:33 +01:00
Steven Hiscocks c1226afe92 TST: Add tests for transmitter journalmatch 2013-05-13 23:42:09 +01:00
Yaroslav Halchenko c21b7c3b9e Merge branch 'master' into 0.9 -- with that also progress into 0.9.0a1
* master:
  Getting ready for further development

Conflicts:
	ChangeLog
	fail2ban/version.py
2013-05-13 12:58:53 -04:00
Yaroslav Halchenko f5a8a8ac7c Release 0.8.9
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iEYEABECAAYFAlGRBZ8ACgkQjRFFY3XAJMhqzwCgvUsrv6cSjo1d8YCQUA8Na0Kk
 44QAoKk7X2sqFM+wvj2vK3stsHa/80qm
 =iBfR
 -----END PGP SIGNATURE-----

Merge tag '0.8.9' into 0.9 (quite a bit of conflicts "resolved")

Release 0.8.9

* tag '0.8.9':
  BF: add missing files to MANIFEST (I think we shoult not rely on sdist anyways -- 'git tag' tarballs are more thorough ;) )
  All the (version) updates for the release of 0.8.9
  BF: (travis) relax the test for needed to be presented installed directories -- allow new
  BF: (travis) if tests ran under coverage -- there is a traceback parts to report (thus > would be present)
  ENH: also print the failing traceback line in case of failure
  ENH: include explicit list of new files which should not be there upon "install --root"
  ENH: now we know that logging handlers closing was still buggy in 2.6.2
  ENH: issue a warning if jail name is longer than 19 symbols (Close #222)
  DOC: inline commends with ';' are in effect only if ';' follows as space
  BF: Fix for filterpoll incorrectly checking for jailless state
  ENH: strengthen detection of working pyinotify
  ENH: use the same python executable for setup.py test
  ENH: actually tune up TraceBack to determine "unittest" portions of the stack across all python  releases
  TST: Some primarily smoke tests for tests utils
  TST: cover few more lines in fail2banreader.py
  ENH: basic test for setup.py itself (when applicable, should greatly improve coverage ;) )
  ENH: consistent operation of formatExceptionInfo + unittest for it
  ENH: point to the status of master branch on travis

Conflicts:
	ChangeLog
	MANIFEST
	README.md
	fail2ban/version.py -- all of the above obvious version changes

   below files primarily  needed just a bit of help in resolution
	config/jail.conf
	fail2ban/server/filterpoll.py
	fail2ban/server/server.py
	fail2ban/tests/servertestcase.py

   and following were more difficult -- git wasn't able to track renames/moves of the code
    fail2ban-testcases -- needed to introduce those changes to tests/utils.py
	testcases/clientreadertestcase.py -- manually applied patch from master
	testcases/utils.py -- manually applied patch from master
2013-05-13 12:29:41 -04:00
Steven Hiscocks 90de5aa568 TST: Update travis coverage config to exempt systemd related code 2013-05-12 13:40:25 +01:00
Steven Hiscocks 33a7763cfc RF+BF+ENH: Rewrite extract options, and now allow "=" char in options 2013-05-10 17:24:23 +01:00
Steven Hiscocks 970291867b TST: Improve tests for JailReader extract options 2013-05-10 17:14:13 +01:00
Steven Hiscocks 4b5d6b6940 ENH: systemd backend produce more reliable isoformat dates 2013-05-10 10:28:06 +01:00
Steven Hiscocks e584ab66ac BF: Avoid setting of log encoding for systemd backend 2013-05-10 10:27:26 +01:00
Steven Hiscocks f7d328195f NF: Add systemd journal backend 2013-05-10 00:15:07 +01:00
Yaroslav Halchenko 709b437b7d Merge commit '0.8.8-312-g7a6eecb' into 0.9
* commit '0.8.8-312-g7a6eecb':
  ENH: close open file in a test
2013-05-09 13:25:41 -04:00
Yaroslav Halchenko 7a86d30c6d ENH: unify appearance of log msgs in executeCmd -- separate additional information with "--" 2013-05-09 11:50:17 -04:00
Yaroslav Halchenko 810a28f136 Merge branch 'actionreader-timeout' of https://github.com/kwirk/fail2ban into 0.9
* 'actionreader-timeout' of https://github.com/kwirk/fail2ban:
  BF: Fix for setting of timeout value via actionreader
2013-05-09 11:39:12 -04:00
Steven Hiscocks 60d1dfebee BF: Fix for setting of timeout value via actionreader 2013-05-08 22:45:49 +01:00
Steven Hiscocks d4e5c174e2 BF: Multiline regex now works with log line strip of "\r\n" 2013-05-08 21:57:23 +01:00
Yaroslav Halchenko f5dfa610e6 Merge branch 'master' into 0.9 (propagating \r\n fix)
* master:
  Previous coverage was 56% (without disregarding any pragma)
  Changelog for preceeding commit
  ENH: strip CR and LF while analyzing the lines (processLine) (Close #202)

Conflicts:
	fail2ban/server/filter.py
2013-05-08 16:37:53 -04:00
Yaroslav Halchenko 2c21fe78a8 Merge branch 'master' into 0.9
* master:
  ENH: close files in _test_move_into_file
  ENH: remove use of $Revision and $Date SVN tags
  Add README.Solaris into distribution

Conflicts:
	client/actionreader.py
2013-05-08 15:16:13 -04:00
Yaroslav Halchenko b86d8e9565 BF: avoid circular imports -- import testcases right in gatherTests 2013-05-08 13:54:11 -04:00
Yaroslav Halchenko f1b6806eb4 Merge branch 'master' into 0.9
* master: (51 commits)
  ENH: Use real (resolving) example.com instead of test.example.com
  DOC: Slight tune ups to ChangeLog -- we must release!
  Changelog entries for the latest merges
  BF: add bash-completion to MANIFEST
  DOC: ChangeLog for default action type change
  ENH: consolidate where blocktype is defined for iptables rules
  BF: default type to unreachable
  ENH: separate out regex and escape a .
  ENH: logs/sshd -- have ":" after [daemon] (other uses are uncommon)
  ENH: logs/sshd -- use example.com as the resolved hostname in sample log lines
  ENH: filter.d/sshd.conf -- allow for trailing "via IP" in logs
  DOC: Drop sudo from bash-completion
  DOC: Added bash-completion script
  ENH: add blocktype to all relevant actions. Also default the rejection to a ICMP reject rather than a drop
  ENH: Removed unused log line
  ENH: logrotate file
  BF: missed MANIFEST include
  BF: missed MANIFEST include
  BF: missed MANIFEST include
  ENH: some form of logrotate based on what distros are doing
  ...

Conflicts:
	ChangeLog
	MANIFEST
	client/actionreader.py
	config/jail.conf
	fail2ban/server/datedetector.py
	fail2ban/tests/datedetectortestcase.py
2013-05-08 13:53:38 -04:00
Steven Hiscocks d5006f36c8 TST: Add test for transmitter datepattern 2013-05-04 18:26:25 +01:00
Steven Hiscocks 9d0f143a81 DOC: Update warning for undetectable date format 2013-05-04 17:25:19 +01:00
Steven Hiscocks 20049dd3a0 NF: Generate datetemplates from strptime format strings
Can also set custom time format from fail2ban-client, replacing the
default detectors
2013-05-04 16:59:01 +01:00
Yaroslav Halchenko b6059f4773 Merge branch 'cmd-timeout' (PR #190) of https://github.com/kwirk/fail2ban into 0.9
* 'cmd-timeout' of https://github.com/kwirk/fail2ban:
  NF: For action execution, log stdout and stderr if debug or cmd error
  NF: Allow setting of timeout for execution of action commands

Conflicts:
	fail2ban/client/actionreader.py
	fail2ban/server/action.py
2013-05-03 00:21:29 -04:00
Yaroslav Halchenko b65205d4ad Merge branch 'master' into 0.9
* master:
  ENH: "is None" instead of "== None" + tune ups in headers
  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
  Changelog entry for the previous commit and some untabify
  BF: pyinotify backend should also handle IN_MOVED_TO events
  ENH: remove stats of config files and use results of SafeConfigParserWithIncludes.read to facilitate meaningful error messages
  DOC: credits for gh-70 fix
  BF: ensure dates in email are in the C locale. Thanks iGeorgeX
  DOC: ChangeLog for recursive tag substition
  ENH: allow recursive tag substitution in action files.
  DOC: document <br> tag
  DOC: ChangeLog for named-refused entry
  ENH: Account for views in named filter. By Romain Riviere in gentoo bug #259458
  DOC: release documentation and distributor contacts
  DOC: changelog entry for enhanced ssh filter
  BF: Rename mentioning of README to README.md (Fixes #187)
  updated README.md to hyperlink, add travis and coversall
  Moving README into a markup README.md for github's goodnesses

Conflicts:
	DEVELOP
	README.md
	fail2ban/client/configreader.py
	fail2ban/server/datedetector.py
2013-05-02 23:55:26 -04:00
Steven Hiscocks c0e8ce5854 NF: For action execution, log stdout and stderr if debug or cmd error 2013-05-01 21:07:13 +01:00
Steven Hiscocks 219860ed8e BF: Raise ValueError for adding of duplicate named action 2013-04-28 13:23:57 +01:00
Steven Hiscocks 6d2ff47e71 NF: Allow return of list of actions from jail via fail2ban-client 2013-04-28 13:23:06 +01:00
Steven Hiscocks a3e216b0b2 BF: Change name->actname for multi action jails to avoid clash
Primary examples is `name` is used in iptables actions for the chain.
Also changed pop->get so actname can be used as keyword
2013-04-27 20:56:31 +01:00
Steven Hiscocks d07df66370 NF: Allow setting of timeout for execution of action commands
This uses subprocess.Popen, polling until `timeout` seconds has passed
or the command has exit. If the command has not exited, fail2ban then
sends SIGTERM, and if this is unsuccessful, SIGKILL.

The timeout can be changed for an entire action via action [Init]
options, or via jail.conf override, or fail2ban-client. The default
timeout period is 60 seconds.
2013-04-27 20:06:09 +01:00
Steven Hiscocks bec70cbe4b TST: Clean up after jails test for MultipleSameAction 2013-04-27 19:11:58 +01:00
Steven Hiscocks 45c9c45b41 BF+RF: Allow multiple of same action in a single jail 2013-04-25 22:36:08 +01:00
Steven Hiscocks 7a29a952c1 TST: Add test case for jails with multiple of the same action 2013-04-25 22:34:07 +01:00
Yaroslav Halchenko 62602a9ed0 Revert "ENH: by default enable a single jail -- sshd"
This reverts commit 47a62b6072.

Enabling any jail by default should be a prerogative of particular
distributions (thanks Fabian Wenk for the discussion)

Conflicts:
	config/jail.conf
2013-04-23 13:58:58 -04:00
Yaroslav Halchenko 203ddb370a PY3(BF): config reader -- handle __name__ interpolation 2013-04-23 10:10:49 -04:00
Yaroslav Halchenko d05e7a5746 TST: elaborate pass through the default jail.conf with basic checking of shipped filters and actions 2013-04-22 23:47:52 -04:00
Yaroslav Halchenko 47a62b6072 ENH: by default enable a single jail -- sshd 2013-04-22 22:35:01 -04:00
Yaroslav Halchenko 3ba540eca3 ENH+BF: use %(__name__) by default for filter, defined enabled = false by DEFAULT
Now jail.conf is really neat.

BF: tests
2013-04-22 22:23:23 -04:00
Yaroslav Halchenko 8a0ac30bd9 ENH: Throw exception if requested Jail is actually not defined at all 2013-04-22 16:59:00 -04:00
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
Steven Hiscocks dadd6aed2f BF+TST: Correctly reset time in tearDownMyTime 2013-04-21 17:39:56 +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 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
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 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
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 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 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
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 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 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
Steven Hiscocks a3d82e2ab9 ENH: fail2ban logging uses __name__ for logger names 2013-04-10 21:33:55 +01:00
Yaroslav Halchenko 7a385fd442 BF: Move mysqld.log into a new location under fail2ban module 2013-04-09 19:46:24 -04:00
Yaroslav Halchenko e630b77fca Make fail2ban a full blown module. Close gh-26
AKA: Merge remote-tracking branch 'github_kwirk_fail2ban/module' into 0.9

* github_kwirk_fail2ban/module:
  BF: Added test filter.d files to setup.py package data
  TST: Fix up tests from multiline elements broken in previous merge
  TST: clientreader test now use /etc/fail2ban/ if no local config/
  ENH+TST: Move fail2ban-* scripts to bin/
  TST+ENH: Move testcases to part of fail2ban module
  TST: Update Travis CI coverage config for python module structure
  ENH+BF+TST+DOC: Make fail2ban a python module

Conflicts:
	.travis.yml -- the line for PYTHONPATH
	.travis_coveragerc -- now we do cover gamin tests
2013-04-09 19:39:58 -04:00
Steven Hiscocks c4bdc48edb TST: Fix up tests from multiline elements broken in previous merge 2013-04-06 10:15:43 +01:00
Steven Hiscocks 8e0f5f8ea6 Merge branch '0.9' into module
Conflicts:
	fail2ban/tests/clientreadertestcase.py
	fail2ban/tests/filtertestcase.py
2013-04-06 09:57:44 +01:00
Steven Hiscocks 0ce046ec47 TST: clientreader test now use /etc/fail2ban/ if no local config/ 2013-04-01 19:06:58 +01:00
Steven Hiscocks e3bd2042eb TST+ENH: Move testcases to part of fail2ban module
This allows fail2ban-testcases to be run on an installed fail2ban
instance.
TODO: Fix tests requiring config files
2013-04-01 11:22:40 +01:00
Steven Hiscocks dba88e842f ENH+BF+TST+DOC: Make fail2ban a python module 2013-03-31 18:18:21 +01:00
Cyril Jaquier ea1948eff4 - Initial commit of the new development release 0.7
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@249 a942ae1a-1317-0410-a47c-b1dcaea8d605
2006-06-26 20:05:00 +00:00
Yaroslav Halchenko 3eb0ca0ee5 propagated fix for the path bug. Thanks to Nick Craig-Wood
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@225 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-12-27 15:09:50 +00:00
Cyril Jaquier cd38dddd00 - Fixed locale bug. Thanks to Fernando Jos�
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@220 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-12-16 23:44:34 +00:00
Cyril Jaquier 840f6cd052 - Merged FAIL2BAN-0_5 with HEAD
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@216 a942ae1a-1317-0410-a47c-b1dcaea8d605
2005-11-20 17:07:47 +00:00
Cyril Jaquier 5fc0a65163 - removing this file. Replaced by fail2ban.py
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@11 a942ae1a-1317-0410-a47c-b1dcaea8d605
2004-10-10 23:41:07 +00:00
Cyril Jaquier 012301b644 - Complete rewrite to use the log-reader and firewall classes
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@10 a942ae1a-1317-0410-a47c-b1dcaea8d605
2004-10-10 13:35:52 +00:00
Cyril Jaquier f943028449 - Some object-oriented code testing
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@6 a942ae1a-1317-0410-a47c-b1dcaea8d605
2004-10-09 15:33:33 +00:00
Cyril Jaquier 5eb163bc03 Initial revision
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@2 a942ae1a-1317-0410-a47c-b1dcaea8d605
2004-10-07 20:21:14 +00:00