]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - nmap/patches/nmap-5.00-mktemp.patch
Merge remote-tracking branch 'stevee/libatasmart'
[people/arne_f/ipfire-3.x.git] / nmap / patches / nmap-5.00-mktemp.patch
CommitLineData
66ded0eb
SS
1--- nmap-4.03/shtool.mktemp 2006-05-10 13:09:34.000000000 +0200
2+++ nmap-4.03/shtool 2006-05-10 13:13:58.000000000 +0200
3@@ -579,15 +579,11 @@
4 else
5 tmpdir="/tmp"
6 fi
7- tmpdir="$tmpdir/.shtool.$$"
8- ( umask 077
9- rm -rf "$tmpdir" >/dev/null 2>&1 || true
10- mkdir "$tmpdir" >/dev/null 2>&1
11- if [ $? -ne 0 ]; then
12- echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
13- exit 1
14- fi
15- )
16+ tmpdir=`mktemp -p $tmpdir -d`
17+ if [ $? -ne 0 ]; then
18+ echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
19+ exit 1
20+ fi
21
22 # create (implicitly) secure temporary file
23 tmpfile="$tmpdir/shtool.tmp"