nmap/nmap-4.03-mktemp.patch
Petr Šabata 4e5dfae237 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/nmap#b0d2e8add17e7c21b40790e528522977b3a0b5ed
2020-10-15 21:08:37 +02:00

24 lines
733 B
Diff

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