mirror of https://github.com/CISOfy/lynis.git
Use CreateTempFile function for temporary files
This commit is contained in:
parent
20dd3c50d7
commit
d5867762c6
|
@ -36,14 +36,10 @@
|
|||
/usr/local/etc/apache /usr/local/etc/apache2 /usr/local/etc/apache22 \
|
||||
/usr/pkg/etc/httpd /etc/sysconfig/apache2"
|
||||
|
||||
if [ "${OS}" = "AIX" ]; then
|
||||
RANDOMSTRING1=`echo lynis-$(od -N4 -tu /dev/random | awk 'NR==1 {print $2} {}')`; RANDOMSTRING2=`echo lynis2-$(od -N4 -tu /dev/random | awk 'NR==1 {print $2} {}')`
|
||||
TMPFILE="/tmp/${RANDOMSTRING1}"; TMPFILE2="/tmp/${RANDOMSTRING2}"
|
||||
echo "" > ${TMPFILE}; echo "" > ${TMPFILE2}
|
||||
else
|
||||
TMPFILE=`mktemp /tmp/lynis.XXXXXXXXXX` || exit 1
|
||||
TMPFILE2=`mktemp /tmp/lynis2.XXXXXXXXXX` || exit 1
|
||||
fi
|
||||
CreateTempFile
|
||||
TMPFILE="${TEMP_FILE}"
|
||||
CreateTempFile
|
||||
TMPFILE2="${TEMP_FILE}"
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue