Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2019 13:15:14 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r514225 - in head/security/ipsec-tools: . files
Message-ID:  <201910101315.x9ADFEbt012101@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Thu Oct 10 13:15:13 2019
New Revision: 514225
URL: https://svnweb.freebsd.org/changeset/ports/514225

Log:
  security/ipsec-tools: unbreak racoon_create_dirs
  
  Specifying required_dirs and creating it at prestart stage does not work
  because required_dirs is checked before running prestart these days.
  So it fails to start for mfs-based /var even if racoon_create_dirs=YES
  
  Unbreak this by replacing "required_dirs" and "mkdir -p"
  in the racoon_prestart with "install -d" that returns error in case
  of failure and does nothing if the directory already exists.
  
  Reported by:	Cybil Courraud <freebsd@cyb.fr>

Modified:
  head/security/ipsec-tools/Makefile
  head/security/ipsec-tools/files/racoon.in

Modified: head/security/ipsec-tools/Makefile
==============================================================================
--- head/security/ipsec-tools/Makefile	Thu Oct 10 12:56:12 2019	(r514224)
+++ head/security/ipsec-tools/Makefile	Thu Oct 10 13:15:13 2019	(r514225)
@@ -8,7 +8,7 @@
 
 PORTNAME=	ipsec-tools
 PORTVERSION=	0.8.2
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	security
 MASTER_SITES=	SF
 

Modified: head/security/ipsec-tools/files/racoon.in
==============================================================================
--- head/security/ipsec-tools/files/racoon.in	Thu Oct 10 12:56:12 2019	(r514224)
+++ head/security/ipsec-tools/files/racoon.in	Thu Oct 10 13:15:13 2019	(r514225)
@@ -21,7 +21,8 @@ rcvar=racoon_enable
 load_rc_config $name
 
 racoon_enable=${racoon_enable:-"NO"}		# Disable by default
-racoon_create_dirs=${racoon_create_dirs:-"NO"}	# Create $required_dirs
+racoon_dirs=${racoon_dirs:-"%%STATEDIR%%"}	# For controlling socket
+racoon_create_dirs=${racoon_create_dirs:-"NO"}	# Create $racoon_dirs
 #racoon_flags=""				# Flags to racoon program
 
 command="%%PREFIX%%/sbin/${name}"
@@ -32,7 +33,6 @@ stop_postcmd="${name}_cleanup"
 
 socketfile="%%STATEDIR%%/${name}.sock"
 required_files="%%PREFIX%%/etc/${name}/${name}.conf"
-required_dirs="%%STATEDIR%%"
 required_modules="%%REQUIREMOD%%"
 
 racoon_cleanup()
@@ -46,7 +46,7 @@ racoon_prestart()
 	racoon_cleanup
 
 	if checkyesno "${name}_create_dirs"; then
-		/bin/mkdir -p $required_dirs
+		install -m 0755 -d $racoon_dirs
 	fi
 }
 



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