From: Mike Frysinger Date: Mon, 26 Sep 2005 21:54:56 +0000 (+0000) Subject: Mr_Bones_ says: i pity the fool who quotes $bin in make_wrapper() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ed0ee88b93751ef3e286d4e4b863b96d609a1daf;p=gentoo.git Mr_Bones_ says: i pity the fool who quotes $bin in make_wrapper() --- diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 7231513bfd14..a272525d0656 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.201 2005/09/25 10:08:23 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.202 2005/09/26 21:54:56 vapier Exp $ # # Author: Martin Schlemmer # @@ -1584,13 +1584,15 @@ newpamd() { make_wrapper() { local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5 local tmpwrapper=$(emktemp) + # We don't want to quote ${bin} so that people can pass complex + # things as $bin ... "./someprog --args" cat << EOF > "${tmpwrapper}" #!/bin/sh cd "${chdir:-.}" if [ "\${LD_LIBRARY_PATH+set}" = "set" ] && [ -n "${libdir}" ] ; then export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}" fi -exec "${bin}" "\$@" +exec ${bin} "\$@" EOF chmod go+rx "${tmpwrapper}" if [[ -n ${path} ]] ; then