Blame SOURCES/nmap-4.03-mktemp.patch

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