qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure: preserve various environment variabl


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] configure: preserve various environment variables in config.status
Date: Wed, 18 Nov 2015 16:52:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]