Merge pull request #29 from leeclemens/enh/pyinotify

BF: Fixed and added error message if no backends initialized...
ENH: Add usedns parameter for the jails

following commits were squashed from feature branch use_dns

commit 068c105eb58b85aaf5ad9df02e7f4122a4efea81
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 22:19:04 2012 -0500

    Prevent warning when IP is read from log

commit 635ed36a8c7280658d501318d882f6e9dd426343
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 22:17:08 2012 -0500

    Removed logDebug

commit 24656d2812c18e0f9312ce36d42ef51ecb68b354
Merge: 7957fbe c429f5c
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 21:13:11 2012 -0500

    Merge branch 'enh/use_dns' of github:leeclemens/fail2ban into enh/use_dns

    Conflicts:
    	testcases/filtertestcase.py

commit 7957fbe821b0cebf162f64b4627a345db551c2d0
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 21:09:58 2012 -0500

    filtertestcase fixes from yarikoptic

commit 6ce9d04640789c1eb587454d2ec95d61f7b67ce8
Author: Yaroslav Halchenko <debian@onerussian.com>
Date:   Tue Jan 10 19:26:05 2012 -0500

    RF: for consistency use_dns -> usedns

    I guess it was might fault of inconsistency suggesting that name.
    Other options/commands do not have _ in the names, so let it be
    consistent with the rest for now

commit cfb2c75b49942b127fff6da4e4e349c667606b5d
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 19:18:41 2012 -0500

    Updated DNSUtilsTests to test use_dns and added positive test to testTextToIp

commit f6186eff14ff1ff9da42f30c7f6268fd792104e6
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 19:02:04 2012 -0500

    Changed wording of 'DNS Reverse lookup used' message

commit 82c62d29dc49582594ff86fb24dc710654ea6269
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 18:53:17 2012 -0500

    Removed extraneous "n"

commit dc0ae2193227cbf8e837bdd173403edbd68afd9a
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 23:07:59 2012 -0500

    ENH: use_dns - removed debugging statements

commit 594e25818cd6b5dd366194d7e74af99294c5a394
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 22:53:39 2012 -0500

    Added use_dns protocol to set and get per jail during runtime

commit 48ff80ffac25d8c3d538e5c05678514f6c9628f6
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 22:41:18 2012 -0500

    Completed use_dns for initial startup - with debugging statements

commit 0bdab4c2d7f0d0c29d4999e70db5f748b51fe1b5
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 20:05:35 2012 -0500

    ENH: Added use_dns option

commit 6d6b734ea51a2f2792ed34d9a4227bb7a3361adb
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 20:01:34 2012 -0500

    ENH: Added use_dns option

commit 11ad2b61254ee03fa761e0c3a7e4905dd89bc54a
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 19:17:30 2012 -0500

    Added useDns flag to testcase

commit b48fa9b6af242fc04c1d1fe1ddf8f7bc1c8fdeed
Author: Lee Clemens <java@leeclemens.net>
Date:   Sun Jan 8 15:13:27 2012 -0500

    Added use_dns option in jail.conf

commit c429f5c91ae935b359e28376b2120eb3d6ea0ad7
Merge: 4b18afb 0021906
Author: leeclemens <java@leeclemens.net>
Date:   Tue Jan 10 16:32:22 2012 -0800

    Merge pull request #3 from yarikoptic/enh/use_dns

    let's be consistent ;-)

commit 0021906358e50c9f53d2fa98ba853a16f6388078
Author: Yaroslav Halchenko <debian@onerussian.com>
Date:   Tue Jan 10 19:26:05 2012 -0500

    RF: for consistency use_dns -> usedns

    I guess it was might fault of inconsistency suggesting that name.
    Other options/commands do not have _ in the names, so let it be
    consistent with the rest for now

commit 4b18afb28a5be525913ad552459bfb3287ccfda5
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 19:18:41 2012 -0500

    Updated DNSUtilsTests to test use_dns and added positive test to testTextToIp

commit 4fae37e46fef62058738040325a3c9cd2be11d45
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 19:02:04 2012 -0500

    Changed wording of 'DNS Reverse lookup used' message

commit e94806ce4804ff3bdc124a0f5265602987245525
Author: Lee Clemens <java@leeclemens.net>
Date:   Tue Jan 10 18:53:17 2012 -0500

    Removed extraneous "n"

commit 4d30c5290725b7d92b0a8f49c1eb5a6a2d12b32e
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 23:07:59 2012 -0500

    ENH: use_dns - removed debugging statements

commit 76696d452ae59e0fa161e1f85e31c6411352f966
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 22:53:39 2012 -0500

    Added use_dns protocol to set and get per jail during runtime

commit 06316180870a0349630e27f7ef078624c6f006cd
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 22:41:18 2012 -0500

    Completed use_dns for initial startup - with debugging statements

commit d23d495547fe382ea6669c30eeac5033284b4c5f
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 20:05:35 2012 -0500

    ENH: Added use_dns option

commit 9538553bc5a71faf23b5b810b83d7acb133c8d56
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 20:01:34 2012 -0500

    ENH: Added use_dns option

commit ae1e857e53e0c014da5b717976536be172a37dc1
Author: Lee Clemens <java@leeclemens.net>
Date:   Mon Jan 9 19:17:30 2012 -0500

    Added useDns flag to testcase

commit ace43eb94128f32538182472fd35e97c220bbf34
Author: Lee Clemens <java@leeclemens.net>
Date:   Sun Jan 8 15:13:27 2012 -0500

    Added use_dns option in jail.conf
Enforce "ip" field returned as str, not unicode so that log message stays non-unicode

Should address #32
Merge branch '_tent/bf-unicode-syslog'

* _tent/bf-unicode-syslog:
  Enforce "ip" field returned as str, not unicode so that log message stays non-unicode
Fix for https://github.com/fail2ban/fail2ban/issues/19

Based on previous work as documented in the bug by Amir and myself,
plus some enhancements and documentation added to the file itself rather
than a URL (they rot).
gentoo init scipt: $opts variable is deprecated
See http://forums.gentoo.org/viewtopic-t-899018.html
ENH: moved jail definition for recidive into jail.conf + swapped/commented durations + non-groupping ?:

thanks @cepheid666 for the useful comments
Merge branch '_tent/gentoo+recidive'

* _tent/gentoo+recidive:
  ENH: moved jail definition for recidive into jail.conf + swapped/commented durations + non-groupping ?:
  gentoo init scipt: $opts variable is deprecated See http://forums.gentoo.org/viewtopic-t-899018.html
  Fix for https://github.com/fail2ban/fail2ban/issues/19
minor comment into TODO
BF+ENH: added %m-%d-%Y pattern + do not add %Y for Feb 29 fix if already present in the pattern

although %m-%d-%Y is ambioius with %d-%m-%Y it comes after so it should not
be too dangerous (i.e. in upcoming days having smth like 02-01 should work as before matching
first one first) and proper fix to select between the two should follow some time
soon
BF: allow trailing whitespace in few missing it regexes for sshd.conf
ENH: rudimentary __repr__ for Filter and Jail + moved usedns into set method

otherwise usedns is way too noisy, especially within fail2ban-regex
ENH: minor, just pythonized some parts of fail2ban-regex summary