svn commit: r509995 - head/Mk/Scripts

Baptiste Daroussin bapt at FreeBSD.org
Tue Aug 27 08:52:28 UTC 2019


Author: bapt
Date: Tue Aug 27 08:52:28 2019
New Revision: 509995
URL: https://svnweb.freebsd.org/changeset/ports/509995

Log:
  Prevent globbing before validating env vars.
  
  Submitted by:	dillon
  Obtained from:	dports (dragonfly)

Modified:
  head/Mk/Scripts/functions.sh

Modified: head/Mk/Scripts/functions.sh
==============================================================================
--- head/Mk/Scripts/functions.sh	Tue Aug 27 07:48:54 2019	(r509994)
+++ head/Mk/Scripts/functions.sh	Tue Aug 27 08:52:28 2019	(r509995)
@@ -153,9 +153,11 @@ parse_plist() {
 validate_env() {
 	local envfault
 	for i ; do
+		set -f
 		if ! (eval ": \${${i}?}" ) >/dev/null; then
 			envfault="${envfault}${envfault:+" "}${i}"
 		fi
+		set +f
 	done
 	if [ -n "${envfault}" ]; then
 		echo "Environment variable ${envfault} undefined. Aborting." \


More information about the svn-ports-all mailing list