mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-06 10:25:53 +08:00
m4sh: fix some namespace safety issues
* lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if as_myself is inherited from environment. (AS_TMPDIR): Be namespace clean. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
9b7d0212e7
commit
e0ac12089e
@ -1,3 +1,10 @@
|
||||
2010-08-25 Eric Blake <eblake@redhat.com>
|
||||
|
||||
m4sh: fix some namespace safety issues
|
||||
* lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if
|
||||
as_myself is inherited from environment.
|
||||
(AS_TMPDIR): Be namespace clean.
|
||||
|
||||
2010-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
tests: fix AC_CACHE_CHECK to skip with bad shells.
|
||||
|
@ -425,6 +425,7 @@ _AS_PATH_SEPARATOR_PREPARE
|
||||
IFS=" "" $as_nl"
|
||||
|
||||
# Find who we are. Look in the path if we contain no directory separator.
|
||||
as_myself=
|
||||
case $[0] in @%:@((
|
||||
*[[\\/]]* ) as_myself=$[0] ;;
|
||||
*) _AS_PATH_WALK([],
|
||||
@ -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"
|
||||
} ||
|
||||
{
|
||||
tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
|
||||
(umask 077 && mkdir "$tmp")
|
||||
as_tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
|
||||
(umask 077 && mkdir "$as_tmp")
|
||||
} || AS_ERROR([cannot create a temporary directory in m4_default([$2],
|
||||
[$TMPDIR])])])# AS_TMPDIR
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user