Commit Graph

3695 Commits

Author SHA1 Message Date
Serg G. Brester
e3f4ea7284 Update README.md
fixed coveralls url to the default branch
2016-08-16 10:43:01 +02:00
Serg G. Brester
9a30cfa77d Merge pull request #1510 from sebres/_0.10/optimize-setup-test-case
0.10/optimize setup test case
2016-08-16 10:16:42 +02:00
sebres
2b5c5103f4 safer multi-threaded execution inside (logging with lock inside LogCaptureTestCase logging handler);
additionally developer option `--log-direct` for fail2ban-testcases: disable lazy logging inside LogCaptureTestCase (default log-lazy is on)
2016-08-15 21:54:33 +02:00
sebres
5509ba37a2 Merge pull request #1512 from 'remotes/gh-upstream/0.9' into 0.10 2016-08-15 20:08:42 +02:00
Serg G. Brester
f61aa3225c Merge pull request #1512 from sebres/_fix/datepattern-right-word-boundary
Fix ambiguous wrong recognized date pattern resp. its optional parts
2016-08-15 20:04:33 +02:00
sebres
9935cf19c1 description provided, ChangeLog entries added 2016-08-15 19:54:11 +02:00
sebres
0bdee2556f testAmbiguousDatePattern rewritten with DateDetector/DatePatternRegex directly (moved to misctestcase.py) 2016-08-15 19:35:11 +02:00
sebres
8e09be5fc8 test cases for boundaries for date-pattern extended (negative/positive, left/right) 2016-08-15 18:53:35 +02:00
sebres
7f55be3fad amend to b6bb2f88c1: datepattern right word boundary - prevents confusions if end of date-pattern (e.g. optional year part) misleadingly match not date values (see gh-1507)
test cases extended to check ambiguous "unbound" patterns in log lines (match/miss resp. positive/negative cases)
2016-08-15 16:51:55 +02:00
sebres
861fb8d463 Merge remote-tracking branch 'remotes/gh-upstream/0.10' into _0.10/optimize-setup-test-case 2016-08-15 13:53:44 +02:00
Serg G. Brester
d75af2f900 travis: coverage python 3.5 (#1511) 2016-08-15 13:52:32 +02:00
sebres
6fcf8192f3 code review 2016-08-15 13:51:50 +02:00
sebres
c3d1d51daf Merge remote-tracking branch 'remotes/gh-upstream/0.9' into 0.10 2016-08-15 13:00:20 +02:00
sebres
c49fe12f70 fix fail2banregextestcase using setUpMyTime/tearDownMyTime: always use correct static time as base-time (using mock up MyTime), correct datetimes inside test 2016-08-15 12:57:39 +02:00
sebres
83029b89b9 amend to 2e530fcf72: setuptools compatibility fix - just to be sure if install_scripts will be incompatible tomorrow 2016-08-12 21:48:40 +02:00
sebres
eb72660eee easy-fix: reset fail2ban link to python, if it targeted unavailable file 2016-08-12 21:32:18 +02:00
sebres
2e530fcf72 setuptools compatibility fix 2016-08-12 21:26:57 +02:00
sebres
fcae05190f move common initializing functionality from fail2ban-testcases to tests/utils.py, to afford setting of default options by test execution from setup process. 2016-08-12 21:26:55 +02:00
sebres
b2ee3b120e optimized logging using LogCaptureTestCase (new faster handler _MemHandler);
backwards compatibility for python 2.6 (SkipTest implemented), so options --fast and --no-network may be used now within python2.6 also;
2016-08-12 21:26:53 +02:00
sebres
461e9bab56 better handling of setup in test-cases (prevent execution of 2to3 twice, full logging in heavydebug, etc.) 2016-08-12 21:26:51 +02:00
sebres
d71a525a85 Merge branch 'master' into 0.10 (resolve conflicts and cleaning tree points after back-porting gh-1508 0.10 -> 0.9) 2016-08-12 18:51:56 +02:00
sebres
42b5a10f5d Back-port pull request #1508 from sebres/_fix/python-executable-gh-1506 to master (0.10 -> 0.9) 2016-08-12 18:42:54 +02:00
sebres
cb340db220 ChangeLog entry for gh-1508 2016-08-12 18:37:46 +02:00
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
sebres
a4cef8a893 Merge branch '_fix/python-executable-gh-1506' into 0.10 2016-08-12 17:50:54 +02:00
Serg G. Brester
db24edba81 Update README.md
show status of builds (travis and coverage) from default branch (0.10)
2016-08-12 17:29:42 +02:00
sebres
c8e7c1f7f4 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 16:48:11 +02:00
sebres
f390a82b59 python 2.6 compatibility minor fix - no skip + BaseException.message seems to be deprecated 2016-08-11 21:37:16 +02:00
sebres
08af8de981 compatibility fix (virtualenv, running test cases in py3) 2016-08-11 21:35:13 +02:00
sebres
77f451c4a3 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);
2016-08-11 18:34:18 +02:00
sebres
ad19c8401b minor fix: modules are not intended to be executed directly (amend to #1426) 2016-08-10 15:00:54 +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
123f4ceaee Changelog for postfix-sasl fix 2016-08-08 17:11:07 -04:00
maksyms
9ddbd642f7 Accept no space after "failed:" (#1501)
yoh: Squashed to ease cherry-picking into 0.9

* accept no space after "failed:"

fix issue #1497

* accept no space after "failed:"

* Update postfix-sasl

* Update postfix-sasl

* Update postfix-sasl
2016-08-08 17:09:47 -04:00
maksyms
04427adb95 Accept no space after "failed:" (#1501)
yoh: Squashed to ease cherry-picking into 0.9

* accept no space after "failed:"

fix issue #1497

* accept no space after "failed:"

* Update postfix-sasl

* Update postfix-sasl

* Update postfix-sasl
2016-08-08 17:07:55 -04:00
sebres
c52aaa8b78 ASSP failregex minor fixes 2016-08-08 19:06:28 +02:00
sebres
70658d7a19 Merge pull request #1494 from rhardy613/master (branch 'sebres:pr-1494') 2016-08-08 18:49:32 +02:00
rhardy613
89f8999fe5 Add changelog entry for ASSP filter changes
Add changelog entry for ASSP filter changes
2016-08-06 01:07:04 -04:00
rhardy613
8265e3f0f9 Fix comments
For some reasons the comment changes weren't pickup in the last commit.
This fixes it.
2016-08-05 23:25:15 -04:00
rhardy613
66fe5a77ce Fix ASSP filter to work with both ASSP V1 and V2
ASSP V1 development stopped at the end of 2014 and it is now deprecated.
All users were urged to upgrade to ASSP V2 which is still actively
developed.
fail2ban 0.9.5 (and trunk) still have code which only understands ASSP
V1 logs.
This means the filter ignores brute force attacks against ASSP. This fix
adds V2 support.
2016-08-05 23:18:51 -04:00
rhardy613
890a3dcbb9 Fix ASSP filter to work with current release of ASSP
ASSP V1 development stopped at the end of 2014 and it is now deprecated.
All users were urged to upgrade to ASSP V2 which is still actively
developed. For some reason fail2ban 0.9.5 (and trunk) still have code
which only understands ASSP V1 logs. This means the filter ignores brute
force attacks against ASSP.
Now updated with anchored patterns tested against 6 months of log data.
2016-08-05 17:26:47 -04:00
Yaroslav Halchenko
c0994b0c6c DOC: minor typo (thanks John Bernard) Closes #1496 2016-08-04 10:23:05 -04:00
sebres
eb6e3c52ae ChangeLog entries for the last fix (cherry pick from 0.10) 2016-08-01 18:04:00 +02:00
sebres
f5b7ffeb4b DOC: Reformatted ChangeLog into legit Markdown (after merge of master to 0.10) 2016-08-01 15:18:59 +02:00
sebres
0eea362aa0 Merge branch 'master' into 0.10 2016-08-01 15:10:52 +02:00
sebres
0083036b5f Merge branch '0.9/gh-1492' 2016-08-01 14:45:05 +02:00
sebres
8b1225f177 several amend fixes after cherry pick from 10th branch 2016-08-01 14:07:37 +02:00
sebres
3e330604c7 several test cases rewritten using new assertIn, assertNotIn (better as own from unittest, because support generators beautifying, etc.)
+ new forward compatibility method assertRaisesRegexp;
+ methods assertIn, assertNotIn, assertRaisesRegexp are test covered now;
+ easy-fix for distributions compatible test cases (e.g. fedora default backend is 'systemd'), (closes gh-1353, closes gh-1490)

cherry picked from 9d56079756 (0.10 branch)
2016-08-01 13:52:05 +02:00