diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-01-21 07:58:09 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-01-21 07:58:09 +0000 |
commit | f5a60f8e7dc94e719d7a14ed18e6290429f3b10a (patch) | |
tree | 5cd7bbd8b22805a3817cfc87183c972ff2b7a8a2 /usr.sbin/sysmerge | |
parent | 201963e11a54a3c6729b10c745121617813fbd83 (diff) |
Protect variable names.
Diffstat (limited to 'usr.sbin/sysmerge')
-rw-r--r-- | usr.sbin/sysmerge/sysmerge.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh index 339025cc175..17b17708381 100644 --- a/usr.sbin/sysmerge/sysmerge.sh +++ b/usr.sbin/sysmerge/sysmerge.sh @@ -1,8 +1,8 @@ #!/bin/ksh - # -# $OpenBSD: sysmerge.sh,v 1.106 2014/01/21 07:39:14 rpe Exp $ +# $OpenBSD: sysmerge.sh,v 1.107 2014/01/21 07:58:08 ajacoutot Exp $ # -# Copyright (c) 2008-2013 Antoine Jacoutot <ajacoutot@openbsd.org> +# Copyright (c) 2008-2014 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org> # # Permission to use, copy, modify, and distribute this software for any @@ -107,7 +107,7 @@ extract_set() { # stores local path to tgz in TGZ or XTGZ get_set() { local _tgz=${WRKDIR}/${1##*/} _url=$1 _set=$2 - [ -f "${_url}" ] && _url="file://$_url" + [ -f "${_url}" ] && _url="file://${_url}" if [[ ${_url} == @(file|ftp|http|https)://*/*[!/] ]]; then ${FETCH_CMD} -o ${_tgz} "${_url}" || \ error_rm_wrkdir "could not retrieve ${_url}" @@ -125,8 +125,8 @@ get_sig() { local _cfile=${WRKDIR}/SHA256 _src=${SETSRC:-$SM_PATH} local _key="/etc/signify/$(uname -r | tr -d '.')base.pub" [ -d "${_src}" ] && _src="file://${_src}" - ${FETCH_CMD} -o "$_cfile.sig" "$_src/SHA256.sig" >/dev/null 2>&1 && \ - signify -Vep ${_key} -x "$_cfile.sig" -m "$_cfile" || \ + ${FETCH_CMD} -o "${_cfile}.sig" "${_src}/SHA256.sig" >/dev/null 2>&1 && \ + signify -Vep ${_key} -x "${_cfile}.sig" -m "${_cfile}" || \ error_rm_wrkdir "Signature check failed" } |