rpms/nmap/FC-5 nmap-4.03-mktemp.patch,NONE,1.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed May 10 13:23:27 UTC 2006
Author: karsten
Update of /cvs/dist/rpms/nmap/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv4854
Added Files:
nmap-4.03-mktemp.patch
Log Message:
don't rely on PID when creating a tmpdir (#158996)
nmap-4.03-mktemp.patch:
shtool | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
--- NEW FILE nmap-4.03-mktemp.patch ---
--- 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"
More information about the fedora-cvs-commits
mailing list