mirror of https://github.com/CISOfy/lynis.git
Reinitialize temporary files to prevent possible symlink attack - CVE-2017-8108
This commit is contained in:
parent
67333bb09a
commit
a9b67dc675
|
@ -358,8 +358,9 @@
|
|||
if [ ${NGINX_RUNNING} -eq 1 -a ! -z "${NGINX_CONF_LOCATION}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||
Register --test-no HTTP-6706 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check for additional nginx configuration files"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
# Remove temp file
|
||||
if [ ! -z "${TMPFILE}" ]; then if [ -f ${TMPFILE} ]; then rm -f ${TMPFILE}; fi; fi
|
||||
CreateTempFile || ExitFatal
|
||||
TMPFILE="${TEMP_FILE}"
|
||||
|
||||
COUNT=0
|
||||
${SEDBINARY} -e 's/^[ ]*//' ${NGINX_CONF_LOCATION} | ${GREPBINARY} -v "^#" | ${GREPBINARY} -v "^$" | ${SEDBINARY} 's/[ ]/ /g' | ${SEDBINARY} 's/ / /g' | ${SEDBINARY} 's/ / /g' >> ${TMPFILE}
|
||||
# Search for included configuration files (may include directories and wild cards)
|
||||
|
|
Loading…
Reference in New Issue