From 3240e0aae2aa095b5855d5bfd9cc51932610fbc7 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sun, 15 Apr 2012 08:06:19 +0000 Subject: Do not use md5sum to produce a temporary filename, but mktemp * patch by Ryan Schmidt --- src/webhttrack | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/webhttrack') diff --git a/src/webhttrack b/src/webhttrack index dfb7dba..bf3cb08 100755 --- a/src/webhttrack +++ b/src/webhttrack @@ -161,8 +161,7 @@ exit $? fi # Create a temporary filename -TMPSRVFILE="/tmp/.webhttrack.$$.`head -c16 /dev/random | md5sum | cut -f1 -d' '`" ->${TMPSRVFILE} || ! log "cound not create the temporary file ${TMPSRVFILE}" || exit 1 +TMPSRVFILE="$(mktemp ${TMPDIR:-/tmp}/.webhttrack.XXXXXXXX)" || ! log "cound not create the temporary file ${TMPSRVFILE}" || exit 1 # Launch htsserver binary and setup the server (${BINPATH}/htsserver "${DISTPATH}/" path "${HOME}/websites" lang "${LANGN}" $@; echo SRVURL=error) > ${TMPSRVFILE}& # Find the generated SRVURL -- cgit v1.2.3