diff --git a/ChangeLog b/ChangeLog index 1edb687..95ed6cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,20 @@ +2002-07-03 Ben Elliston + + * config.guess: Use umask to create temporary directly safely. + Using mkdir and chmod introduces a race. + +2002-07-03 Ben Elliston + + * config.guess: Detect ICL NX version 7 running on ICL/Fujitsu DRS + 6000 machines. Reported by Henrik N. Spuur Hansen . + 2002-07-03 Ben Elliston * config.guess: Execute $dummy, not ./$dummy, throughout. - + * config.guess (set_cc_for_build): Create a chmod 700 directory in /tmp (or $TMPDIR, if set) to store temporary files generated for - use by the C compiler. This should resist the /tmp symbolic link + use by the C compiler. This should resist the /tmp symbolic link race vulnerability reported by Lawrence Teo. 2002-07-03 Ben Elliston diff --git a/config.guess b/config.guess index ac44ecc..d7c7fd7 100755 --- a/config.guess +++ b/config.guess @@ -101,7 +101,8 @@ trap 'exit 1' 1 2 15 # This shell variable is my proudest work .. or something. --bje set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; -(mkdir $tmpdir && chmod 700 $tmpdir) || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; dummy=$tmpdir/dummy ; files="$dummy.c $dummy.o $dummy.rel $dummy" ; trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; @@ -323,6 +324,10 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DSR?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;;