Commit Graph

238 Commits (a6cf3246d04d77940c2b8adc43c8f346f08feb6b)

Author SHA1 Message Date
Daniel Black 3665e6dc44 Add development documentation and framework for code coverage measurement
12 years ago
Yaroslav Halchenko 59c35bc44a Downgrade log rotation detection message to DEBUG level from INFO. Closes: gh-129
12 years ago
Yaroslav Halchenko 154aa38e3f BF: do not shutdown logging until all jails stop -- so move into Server.quit()
12 years ago
Yaroslav Halchenko 012264dce1 BF: safeguard closing of log handlers + close in reverse order
12 years ago
Steven Hiscocks b36835f6f0 Added transmitter get cinfo option for action
12 years ago
Steven Hiscocks b6a68f5138 Fix for missing value in transmitter delaction
12 years ago
Steven Hiscocks ce3ab34dd8 Added ability to specify PID file
12 years ago
Yaroslav Halchenko f8983872ad BF: return str(host) to avoid spurious characters in the logs (Close gh-113)
12 years ago
Yaroslav Halchenko acab23bdfe RF: move exceptions used by both client and server into common/exceptions.py
12 years ago
Yaroslav Halchenko 6b2e76ba7f BF: pyinotify - use bitwise op on masks and do not try tracking newly created directories
12 years ago
blotus 96eb8986cc Escape ' and " in matches tag
12 years ago
Daniel Black fd7929863b name -> IP is a normal DNS lookup not a reverse
12 years ago
Yaroslav Halchenko 67145d8b78 ENH: assure that all date templates have unique names
12 years ago
Yaroslav Halchenko d1625253eb ENH: debug msgs on which template was taken (+ use "is" for None comparisons)
12 years ago
Yaroslav Halchenko 2b6366656f BF: make sorting of date templates stable
12 years ago
Yaroslav Halchenko 37a2e59d69 BF: guarantee that IP is stored as a base, non-unicode str (Closes gh-91)
12 years ago
Yaroslav Halchenko f10537941b ENH: To help with gh-87 added hints into the log on some failure return codes (e.g. 0x7f00 for this one)
12 years ago
Yaroslav Halchenko b159eabb51 BF: do not enable pyinotify backend if pyinotify is too old (Closes gh-80)
12 years ago
Yaroslav Halchenko f52ba9923a ENH: downgrade "already banned" from WARN to INFO level (Closes gh-79)
12 years ago
David Engeset 2d672d1c81 Added in while loop to process the Fail Manager after the requested banned IP was added to its queue. This solves the issue of needing to touch the log file that is being monitored to get the IP to be banned accordingly. Added in import of FailManagerEmpty exception class.
12 years ago
Yaroslav Halchenko f14c7ae401 ENH: refactored previous commit to make it more Pythonic (With prev commit closes gh-86, gh-81)
12 years ago
David Engeset 6288ec2757 Added in command option to unban and IP, just like using 'banip'. Command looks like: fail2ban-client set <jail name> unbanip <ip>
12 years ago
Yaroslav Halchenko 8e64c281dd BF: in code we should use MyTime wrapper instead of time module directly
12 years ago
Yaroslav Halchenko 09355663f7 BF: (python 2.4) -- access to staticmethod should go via Class
12 years ago
Yaroslav Halchenko 5becaf8ef2 BF: (python 2.[45]) store backends names in a list to use .index later on (Closes gh-83)
12 years ago
Yaroslav Halchenko 83109bce14 BF: escape the content of <matches> since its value could contain arbitrary symbols
12 years ago
Yaroslav Halchenko 2d66f31ef5 ENH: instead of "Invalid command" warning log exception why command failed
12 years ago
Yaroslav Halchenko c6f5d854d3 ENH+BF: filtergamin -- to be more inline with current design of filterinotify
13 years ago
Yaroslav Halchenko d9248a6cf8 BF+RF: pyinotify refreshes watcher upon CREATE, unified/simplified *(add|del)LogPath among *Filters
13 years ago
Yaroslav Halchenko 3c95121a8b BF: pyinotify -- monitor the parent directory for IN_CREATE + process freshly added file (Closes gh-44)
13 years ago
Yaroslav Halchenko baa09098f0 RF/BF: just use pyinotify.ThreadedNotifier thread in filterpyinotify
13 years ago
Yaroslav Halchenko 25674a95f8 RF: filter.py -- single readline in a loop
13 years ago
Yaroslav Halchenko b3614d4ea2 ENH: FilterPoll -- adjusted some msgs + allowed to operate without jail (for testing)
13 years ago
Yaroslav Halchenko 9b360bb12d ENH: minor, just trailing spaces/tabs + reformated a string
13 years ago
Yaroslav Halchenko 3989d24967 BF: usedns=no was not working at all
13 years ago
Chris Reffett a018a26133 Fixed addBannedIP to add enough failures to trigger a ban, rather than
13 years ago
Yaroslav Halchenko 2245ff5b41 ENH: rudimentary __repr__ for Filter and Jail + moved usedns into set method
13 years ago
Yaroslav Halchenko b257be4cd1 BF+ENH: added %m-%d-%Y pattern + do not add %Y for Feb 29 fix if already present in the pattern
13 years ago
Yaroslav Halchenko ed16ecc50a Enforce "ip" field returned as str, not unicode so that log message stays non-unicode
13 years ago
Lee Clemens d73a71f5cf ENH: Add usedns parameter for the jails
13 years ago
Lee Clemens e7dce7cc5a BF: Added logging above ValueError, since only INVALID COMMAND is printed by calling method
13 years ago
Lee Clemens 3282f86651 capitalized Jail
13 years ago
Lee Clemens 642d9afb9a Reformated printing of jail's name to be consistent with init's info messages
13 years ago
Lee Clemens a1898b1840 Fixed and added error message if no backends initialized. INVALID COMMAND is printed when RuntimeError is raised, so we don't get to see the error's message
13 years ago
Yaroslav Halchenko 29c8e43354 BF: must be named _initPolling to be consistent with the 'polling' value
13 years ago
Lee Clemens b7adb29088 Spelling, Changed docstring to comment
13 years ago
Yaroslav Halchenko f90d53fc26 RF: traverse known backends in a loop
13 years ago
Yaroslav Halchenko 7413817f9a RF: for pyinotify's filter -- adjusted authors/copyright and avoided super() for old-style class
13 years ago
Lee Clemens 02894623cf Moved dict() above debug statement
13 years ago
Lee Clemens aa4514bffa Removed PYINOTIFY prefix to debug statement for Callback for Event
13 years ago