security/py-fail2ban: Update to 0.10.4

PR:		231947
Submitted by:	theis@gmx.at (maintainer)
This commit is contained in:
Steve Wills 2018-10-07 05:02:36 +00:00
parent d4e2ac7d9a
commit bd35d21530
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481422
4 changed files with 6 additions and 69 deletions

View File

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= fail2ban
PORTVERSION= 0.10.3.1
PORTREVISION= 1
PORTVERSION= 0.10.4
CATEGORIES= security python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -61,6 +60,8 @@ post-patch:
${WRKSRC}/config/fail2ban.conf
@${REINPLACE_CMD} -e 's,jail.conf(5),fail2ban-jail.conf(5),g' \
${MAN_FILES}
@${REINPLACE_CMD} -e 's, sed , ${SED} ,g' \
${WRKSRC}/config/action.d/hostsdeny.conf
. if ${PYTHON_MAJOR_VER} >= 3
(cd ${WRKSRC}/ && ${PY2TO3_CMD} ${PY2TO3_ARG} bin/* fail2ban)

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1523508414
SHA256 (fail2ban-fail2ban-0.10.3.1_GH0.tar.gz) = 7ee3fd0e94d58c94298718b25e6bcfa96932712b7aa683580e162403f68d40c8
SIZE (fail2ban-fail2ban-0.10.3.1_GH0.tar.gz) = 485803
TIMESTAMP = 1538666739
SHA256 (fail2ban-fail2ban-0.10.4_GH0.tar.gz) = d6ca1bbc7e7944f7acb2ba7c1065953cd9837680bc4d175f30ed155c6a372449
SIZE (fail2ban-fail2ban-0.10.4_GH0.tar.gz) = 493064

View File

@ -1,30 +0,0 @@
--- config/action.d/hostsdeny.conf.orig 2018-04-18 16:05:22.844045000 +0200
+++ config/action.d/hostsdeny.conf 2018-04-18 16:06:30.930069000 +0200
@@ -31,7 +31,7 @@
# Tags: See jail.conf(5) man page
# Values: CMD
#
-actionban = printf %%b "<daemon_list>: <_ip_value>\n" >> <file>
+actionban = printf %%b "<daemon_list>: <ip_value>\n" >> <file>
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
@@ -39,7 +39,7 @@
# Tags: See jail.conf(5) man page
# Values: CMD
#
-actionunban = IP=$(echo "<_ip_value>" | sed 's/[][\.]/\\\0/g') && sed -i "/^<daemon_list>: $IP$/d" <file>
+actionunban = IP=$(echo "<ip_value>" | /usr/bin/sed 's/\([][\.]\)/\\\1/g') && /usr/bin/sed -i "" "/^<daemon_list>: $IP$/d" <file>
[Init]
@@ -56,7 +56,7 @@
daemon_list = ALL
# internal variable IP (to differentiate the IPv4 and IPv6 syntax, where it is enclosed in brackets):
-_ip_value = <ip>
+ip_value = <ip>
[Init?family=inet6]
-_ip_value = [<ip>]
+ip_value = [<ip>]

View File

@ -1,34 +0,0 @@
--- fail2ban/client/csocket.py.orig 2018-04-08 10:28:39.135695000 +0200
+++ fail2ban/client/csocket.py 2018-04-08 10:35:39.403548000 +0200
@@ -43,7 +43,7 @@
self.__csock.connect(sock)
def __del__(self):
- self.close(False)
+ self.close()
def send(self, msg, nonblocking=False, timeout=None):
# Convert every list member to string
@@ -56,13 +56,18 @@
def settimeout(self, timeout):
self.__csock.settimeout(timeout if timeout != -1 else self.__deftout)
- def close(self, sendEnd=True):
+ def close(self):
if not self.__csock:
return
- if sendEnd:
+ try:
self.__csock.sendall(CSPROTO.CLOSE + CSPROTO.END)
- self.__csock.shutdown(socket.SHUT_RDWR)
- self.__csock.close()
+ self.__csock.shutdown(socket.SHUT_RDWR)
+ except socket.error: # pragma: no cover - normally unreachable
+ pass
+ try:
+ self.__csock.close()
+ except socket.error: # pragma: no cover - normally unreachable
+ pass
self.__csock = None
@staticmethod