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/local/etc/apache /usr/local/etc/apache2 /usr/local/etc/apache22 \
|
||||||
/usr/pkg/etc/httpd /etc/sysconfig/apache2"
|
/usr/pkg/etc/httpd /etc/sysconfig/apache2"
|
||||||
|
|
||||||
if [ "${OS}" = "AIX" ]; then
|
CreateTempFile
|
||||||
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="${TEMP_FILE}"
|
||||||
TMPFILE="/tmp/${RANDOMSTRING1}"; TMPFILE2="/tmp/${RANDOMSTRING2}"
|
CreateTempFile
|
||||||
echo "" > ${TMPFILE}; echo "" > ${TMPFILE2}
|
TMPFILE2="${TEMP_FILE}"
|
||||||
else
|
|
||||||
TMPFILE=`mktemp /tmp/lynis.XXXXXXXXXX` || exit 1
|
|
||||||
TMPFILE2=`mktemp /tmp/lynis2.XXXXXXXXXX` || exit 1
|
|
||||||
fi
|
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue