autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 1/5] m4sh: fix some namespace safety issues


From: Eric Blake
Subject: Re: [PATCH 1/5] m4sh: fix some namespace safety issues
Date: Wed, 25 Aug 2010 21:02:26 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 08/25/2010 08:56 PM, Eric Blake wrote:
On 08/25/2010 05:18 PM, Eric Blake wrote:
* lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if
as_myself is inherited from environment.
(AS_TMPDIR): Be namespace clean.

Phooey. I didn't run the whole testsuite, but this patch breaks some of
the tests, starting with 14: autoconf: subdirectories. Once I find a
fix, I'll be pushing something shortly. :(

@@ -1618,12 +1619,13 @@ m4_define([AS_TMPDIR],
[# Create a (secure) tmp directory for tmp files.
m4_if([$2], [], [: ${TMPDIR=/tmp}])
{
- tmp=`(umask 077&& mktemp -d "m4_default([$2], [$TMPDIR])/$1XXXXXX")
2>/dev/null`&&
- test -n "$tmp"&& test -d "$tmp"
+ as_tmp=`(umask 077&& mktemp -d "m4_default([$2],
+ [$TMPDIR])/$1XXXXXX") 2>/dev/null`&&
+ test -d "$as_tmp"

Found it. NEWS documents, and config.status relies, on $tmp being a safe temporary directory. So even though it is not clean by normal namespace rules, it is historical baggage and part of our public API contract. I'm reverting this hunk of the patch, and adding a comment in its place so we don't make this mistake of trying to 'fix' it again.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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