mirror of https://github.com/CISOfy/lynis.git
Do not run Apache test on OpenBSD and strip control chars [HTTP-6624]
This commit is contained in:
parent
dcef76d250
commit
6eedbdd176
|
@ -73,9 +73,9 @@
|
|||
#
|
||||
# Test : HTTP-6624
|
||||
# Description : Testing main Apache configuration file
|
||||
# Notes : Do not run on NetBSD, -V is unknown option for httpd binary
|
||||
# Notes : Do not run on OpenBSD/NetBSD, as -V is an unknown option for httpd binary
|
||||
if [ ${APACHE_INSTALLED} -eq 1 ]; then
|
||||
if [ ! "${OS}" = "NetBSD" ]; then
|
||||
if [ ! "${OS}" = "NetBSD" -a ! "${OS}" = "OpenBSD" ]; then
|
||||
PREQS_MET="YES"
|
||||
else
|
||||
PREQS_MET="NO"
|
||||
|
@ -86,10 +86,10 @@
|
|||
Register --test-no HTTP-6624 --preqs-met ${PREQS_MET} --weight L --network NO --description "Testing main Apache configuration file"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
APACHE_CONFIGFILE=""
|
||||
APACHE_TEST=`${HTTPDBINARY} -V 2> /dev/null | grep "\-D SERVER_CONFIG_FILE=" | sed 's/[ ]-D SERVER_CONFIG_FILE=//' | tr -d '"' | tr -d ' '`
|
||||
APACHE_TEST=`${HTTPDBINARY} -V 2> /dev/null | grep "\-D SERVER_CONFIG_FILE=" | sed 's/[ ]-D SERVER_CONFIG_FILE=//' | tr -d '"' | tr -d ' ' | tr -d '[:cntrl:]'`
|
||||
|
||||
if [ "${APACHE_TEST}" = "" ]; then
|
||||
Display --indent 6 --text "Result: Can't find the configuration file, so skipping some Apache related tests"
|
||||
logtext "Result: Can't find the configuration file, so skipping some Apache related tests"
|
||||
else
|
||||
# We found a possible match. Checking if it's valid filename. If not, we need to add a prefix
|
||||
if [ -f ${APACHE_TEST} ]; then
|
||||
|
|
Loading…
Reference in New Issue