Blame SOURCES/nmap-4.03-mktemp.patch

5e8114
--- nmap-4.03/shtool.mktemp	2006-05-10 13:09:34.000000000 +0200
5e8114
+++ nmap-4.03/shtool	2006-05-10 13:13:58.000000000 +0200
5e8114
@@ -579,15 +579,11 @@
5e8114
     else
5e8114
         tmpdir="/tmp"
5e8114
     fi
5e8114
-    tmpdir="$tmpdir/.shtool.$$"
5e8114
-    ( umask 077
5e8114
-      rm -rf "$tmpdir" >/dev/null 2>&1 || true
5e8114
-      mkdir  "$tmpdir" >/dev/null 2>&1
5e8114
-      if [ $? -ne 0 ]; then
5e8114
-          echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
5e8114
-          exit 1
5e8114
-      fi
5e8114
-    )
5e8114
+    tmpdir=`mktemp -p $tmpdir -d`
5e8114
+    if [ $? -ne 0 ]; then
5e8114
+       echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
5e8114
+       exit 1
5e8114
+    fi
5e8114
 
5e8114
     #   create (implicitly) secure temporary file
5e8114
     tmpfile="$tmpdir/shtool.tmp"