Commit Graph

70 Commits (abb2feafe7e186833221e27fe2ddeb87d7080ef0)

Author SHA1 Message Date
sebres db30b7ce06 BF: prefer sys.argv[0] by retrieving of root resp. bin path: __file__ seems to be overwritten sometimes on some python versions (e.g. bug of 2.6 by running under cProfile, etc.) 2016-08-12 17:59:27 +02:00
sebres 6cdc1ce685 compatibility fix (virtualenv, running test cases in py3)
# Conflicts:
#	MANIFEST
2016-08-12 17:59:24 +02:00
sebres 38d53a72fd introduces new command "fail2ban-python", as automatically created symlink to python executable, where fail2ban currently installed (resp. its modules are located);
fixed pythonic filters and test scripts (running via "fail2ban-python" now);
fixed test case "testSetupInstallRoot" not for default python (also using direct call, out of virtualenv);

# Conflicts:
#	config/filter.d/ignorecommands/apache-fakegooglebot
#	fail2ban/tests/files/config/apache-auth/digest.py
#	fail2ban/tests/files/ignorecommand.py
#	fail2ban/tests/misctestcase.py
2016-08-12 17:58:37 +02:00
Yaroslav Halchenko 9d70c49ea8 BF: install doc files only under Linuxes and other GNU systems (Closes #1233) (#1503) 2016-08-09 12:49:40 +02:00
Yaroslav Halchenko 776322cea3 BF: realpath for /var/run/fail2ban Closes #1142 2015-07-31 10:12:14 -04:00
Lee Clemens 1ebea39ec5 Merge pull request #1068 from yarikoptic/enh/var-run-fail2ban
BF: 'create' /var/run/fail2ban on systems with /var/run
2015-07-07 21:55:49 -04:00
Lee Clemens 7667712909 Fix pep8 E401 multiple imports on one line 2015-06-26 12:51:19 -04:00
Yaroslav Halchenko 2d9ece2d04 BF: 'create' /var/run/fail2ban on systems with /var/run
Should overcome problems of some users installing using setup.py install
2015-06-11 19:43:42 -10:00
Lee Clemens 38415d2cf1 Add trailing comma back to list 2015-02-02 11:29:27 -05:00
Lee Clemens af078532ac New jail: apache-fakegooglebot
Detects fake googlebot user agents in apache access log
2015-02-02 00:42:01 -05:00
Deyuan Deng 5e9619d4a4 Clean up setup.py 2014-04-04 02:54:53 +00:00
Steven Hiscocks 41cbbbc248 BF: Remove unused imports and variables.
All highlighted by using pyflakes.
2014-03-16 14:31:34 +00:00
Steven Hiscocks 3990a19fc7 BF: Remove "/var/run/fail2ban" from setup.py
As the contents of /var/run are lost on reboot, it doesn't make sense to
install it. This is already patched out in some distros (gentoo, arch,
debian, gentoo, …) as causes a headache with package managment tracking
installed files.
2014-03-16 10:47:40 +00:00
Daniel Black 4b2d8a8e51 BF: include test data 2014-03-15 10:28:04 +11:00
Daniel Black ce586b6e16 PKG: Documentation files 2014-03-14 23:58:55 +11:00
Steven Hiscocks 5630c56c75 ENH: Change logging levels and make info more verbose 2014-02-20 23:01:40 +00:00
Steven Hiscocks 8221c7ca71 TST+BF: Add tests for python actions, including test for smtp.py
Also fix bug when specifying multiple recipients for smtp.py action
2014-01-20 23:10:43 +00:00
Steven Hiscocks 80d6f74ee8 RF: Refactor actions further, include removing server proxy interface
This allows direct setting of action properties and calling of methods
from the fail2ban-client if so required.
2014-01-03 17:04:49 +00:00
Steven Hiscocks f37c90cdba ENH: Python based actions
Python actions are imported from action.d config folder, which have .py
file extension. This imports and creates an instance of the Action class
(Action can be a variable that points to a class of another name).
fail2ban.server.action.ActionBase is a base class which can be inherited
from or as a minimum has a subclass hook which is used to ensure any
imported actions implements the methods required.
All calls to the execAction are also wrapped in a try except such that
any errors won't cripple the jail.
Action is renamed CommandAction, to clearly distinguish it from other
actions.

Include is an example smtp.py python action for sending emails via smtp.
This is work in progress, as looking to add the <matches> and whois
elements, and also SSL/TLS support.
2013-12-31 18:54:34 +00:00
Steven Hiscocks bbadef847b ENH: Add fail2ban persistent data storage 2013-12-07 23:23:28 +00:00
Daniel Black 1f1a56174f MRG: merge from master 2013-09-08 21:02:35 +10:00
Orion Poplawski 71317332ec Install empty /etc/fail2ban/fail2ban.d directory 2013-08-28 11:33:05 -06:00
Orion Poplawski d3ce9e860f Install empty /etc/fail2ban/jail.d directory 2013-08-09 14:39:06 -06:00
Daniel Black 04ff9450b5 BF: testcases is a package that needs to be installed. Thanks to Michael Danko on irc 2013-07-29 10:45:15 +10:00
Steven Hiscocks 774c9ce4fd BF: setup.py build now includes sample log files for tests 2013-07-16 23:37:44 +01: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
Yaroslav Halchenko c5287e3d9c BF: Rename mentioning of README to README.md (Fixes #187) 2013-04-26 22:51:59 -04:00
Steven Hiscocks 6f3c66f466 ENH: Reimplement warning suppression of setup.py test --quiet 2013-04-21 13:23:08 +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
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 36097ffc3e DOC: Revert setup.py messages to use print statement 2013-04-14 10:18: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
Steven Hiscocks a33bf5baca ENH: setup.py now automatically runs 2to3 for python3.x 2013-04-09 19:40:54 +01:00
Steven Hiscocks 3a16ceed0a BF: Added test filter.d files to setup.py package data 2013-04-06 10:20:53 +01:00
Steven Hiscocks a153653a27 ENH+TST: Move fail2ban-* scripts to bin/ 2013-04-01 19:06:13 +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
Daniel Black 10d4aa1682 BF: remove non-existant files from setup.py. ENH: add documentation 2013-03-16 13:53:12 +11:00
Yaroslav Halchenko 6004fe7a94 just trailing spaces in setup.py 2013-02-11 16:17:52 -05:00
Yaroslav Halchenko 03b31398aa ENH: BF (forgotten import) for prev commit + removed duplicate Author, adjusted __ fields for that in fail2ban-* scripts 2012-11-09 08:58:19 -05:00
Leonardo Chiquitto a7d47e8b36 Update Free Software Foundation's address
The address has changed from "59 Temple Place, Suite 330, Boston,
MA  02111-1307  USA" to "51 Franklin Street, Fifth Floor, Boston,
MA  02110-1301, USA" some time ago.
2011-12-30 12:41:46 -05:00
Yaroslav Halchenko ed6daa70bf ENH: modelines for emacs and vim to assure consistent indentation scheme (tabs) 2011-10-07 15:49:38 -04:00
Cyril Jaquier c1bc33b3cc - Create /var/run/fail2ban during install.
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@678 a942ae1a-1317-0410-a47c-b1dcaea8d605
2008-03-10 22:34:46 +00:00
Cyril Jaquier 56fa32afe7 - Changed homepage and e-mail
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@671 a942ae1a-1317-0410-a47c-b1dcaea8d605
2008-03-05 23:12:41 +00:00
Cyril Jaquier a257fdc87d - Call Python interpreter directly (instead of using "env")
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@522 a942ae1a-1317-0410-a47c-b1dcaea8d605
2007-01-21 22:19:57 +00:00
Cyril Jaquier ab3d2d1b9a - Now Fail2ban goes in /usr/share/fail2ban instead of /usr/lib/fail2ban. This is more compliant with FHS. Thanks to Axel Thimm and Yaroslav Halchenko
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@511 a942ae1a-1317-0410-a47c-b1dcaea8d605
2007-01-04 12:58:21 +00:00
Cyril Jaquier d342d847f2 - Check for deprecated version.py and protocol.py
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@473 a942ae1a-1317-0410-a47c-b1dcaea8d605
2006-11-19 21:35:54 +00:00
Cyril Jaquier 58acd9fb9f - Moved version.py and protocol.py to common/
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@467 a942ae1a-1317-0410-a47c-b1dcaea8d605
2006-11-16 21:07:42 +00:00