Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2018 19:09:50 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475327 - in head/security/py-fail2ban: . files
Message-ID:  <201807251909.w6PJ9ogj056392@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Wed Jul 25 19:09:50 2018
New Revision: 475327
URL: https://svnweb.freebsd.org/changeset/ports/475327

Log:
  security/py-fail2ban: Fix writing /etc/hosts.deny entries
  
  PR:		227577
  Submitted by:	theis@gmx.at (maintainer)
  Reported by:	Niels Bakker <niels=freebsd@bakker.net>

Added:
  head/security/py-fail2ban/files/patch-config_action.d_hostsdeny.conf   (contents, props changed)
Modified:
  head/security/py-fail2ban/Makefile   (contents, props changed)

Modified: head/security/py-fail2ban/Makefile
==============================================================================
--- head/security/py-fail2ban/Makefile	Wed Jul 25 18:30:45 2018	(r475326)
+++ head/security/py-fail2ban/Makefile	Wed Jul 25 19:09:50 2018	(r475327)
@@ -2,6 +2,7 @@
 
 PORTNAME=	fail2ban
 PORTVERSION=	0.10.3.1
+PORTREVISION=   1
 CATEGORIES=	security python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 

Added: head/security/py-fail2ban/files/patch-config_action.d_hostsdeny.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/py-fail2ban/files/patch-config_action.d_hostsdeny.conf	Wed Jul 25 19:09:50 2018	(r475327)
@@ -0,0 +1,30 @@
+--- 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>]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807251909.w6PJ9ogj056392>