fail2ban/fail2ban — pull request #692 by yarikoptic (2014-04-16 05:03:48+00:00)
Title: Bf/do not merge  wrong fix for 7260403fdd41b74335a0a71579df3df5cae6c6ba for discussion

My fix is simply ugly and incorrect ;-) but while troubleshooting it ran into some other issues on that elderly squeeze sparc box with python 2.6 which are also "fixed" in this PR (would need to be CP'ed I guess).

So the original issue why currently tests fail:
in the ```_test_move_into_file``` we operate on the same entries from GetFailures.FILENAME_01 so whenever we create a "new" file -- first line checksum matches the old one, and if inode of new file matches old one (which it can... but seems even more often on some systems) -- then fail2ban fails to detect 'log rotation'. I have looked either we could use some other signs for log rotation but didn't come with any good one... in this "fix" I have tried to delay the closing of the file, but that just obliterates the point... proper "fix" should be to not reuse GetFailures.FILENAME_01 in its entirety, or use even some other file so we do trigger logrotation detection reliably ;-)