rather than running chmod afterwards, preventing a race
condition where the directory could be replaced with a symbolic
link in the time between the two commands.
+2004-02-03 Scott James Remnant <scott@netsplit.com>
+
+ * ltmain.in: Create temporary directory under a strict umask
+ rather than running chmod afterwards, preventing a race
+ condition where the directory could be replaced with a symbolic
+ link in the time between the two commands.
+
2004-02-03 Paul Eggert <eggert@twinsun.com>
Scott James Remnant <scott@netsplit.com>
tmpdir="/tmp"
test -n "$TMPDIR" && tmpdir="$TMPDIR"
tmpdir="$tmpdir/libtool-$$"
- if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
+ save_umask=`umask`
+ umask 0077
+ if $mkdir "$tmpdir"; then
+ umask $save_umask
else
+ umask $save_umask
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
continue
fi