All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Eric Blake <eblake@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] configure: preserve various environment variables in config.status
Date: Wed, 18 Nov 2015 16:52:01 +0100	[thread overview]
Message-ID: <564C9EA1.8000202@weilnetz.de> (raw)
In-Reply-To: <564B7ACF.30701@redhat.com>

Am 17.11.2015 um 20:06 schrieb Eric Blake:
> On 11/17/2015 10:59 AM, Daniel P. Berrange wrote:
[...]
>> +++ b/configure
>> @@ -5925,6 +5925,24 @@ cat <<EOD >config.status
>>  # Compiler output produced by configure, useful for debugging
>>  # configure, is in config.log if it exists.
>>  EOD
>> +
>> +preserve_env() {
>> +    envname=$1
>> +
>> +    if test -n "${!envname}"
> Bashism, but configure is /bin/sh.  This won't work on dash :(
>
> I think you'll have to use eval, and we'll just have to audit that
> preserve_env can never be called with suspicious text where eval would
> open a security hole.

You could also call the function with two arguments ...
preserve_env PATH "$PATH"
... and use the 2nd argument in the test.

      parent reply	other threads:[~2015-11-18 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 17:59 [Qemu-devel] [PATCH] configure: preserve various environment variables in config.status Daniel P. Berrange
2015-11-17 18:37 ` Stefan Weil
2015-11-17 19:06 ` Eric Blake
2015-11-18 10:03   ` Daniel P. Berrange
2015-11-18 15:40     ` Eric Blake
2015-11-18 15:52   ` Stefan Weil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564C9EA1.8000202@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.