You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fail2ban/fail2ban-hostsdeny.patch

20 lines
701 B

commit aebd24ec5485dacc5146728fa22387340b51099e
Author: Daniel Black <grooverdan@users.sourceforge.net>
Date: Tue Jul 2 20:09:27 2013 +1000
BF: replace with ed so its cross platform, fixes permission problem gh-266, and Yaroslav doesn't revert to perl
diff --git a/config/action.d/hostsdeny.conf b/config/action.d/hostsdeny.conf
index 50a4545..36e3494 100644
--- a/config/action.d/hostsdeny.conf
+++ b/config/action.d/hostsdeny.conf
@@ -39,7 +39,7 @@ actionban = IP=<ip> &&
# Tags: See jail.conf(5) man page
# Values: CMD
#
-actionunban = IP=<ip> && sed /ALL:\ $IP/d <file> > <file>.new && mv <file>.new <file>
+actionunban = echo "/ALL: <ip>$/<br>d<br>w<br>q" | ed <file>
[Init]