mirror of https://github.com/CISOfy/lynis.git
[PHP-2374] Changed text and cleanups
This commit is contained in:
parent
1852095bb0
commit
ccb39d5e52
|
@ -195,23 +195,22 @@
|
||||||
#
|
#
|
||||||
# Test : PHP-2374
|
# Test : PHP-2374
|
||||||
# Description : Check PHP enable_dl option
|
# Description : Check PHP enable_dl option
|
||||||
# Notes : Extend test to check all PHP files YYY
|
# Notes : Extend test to check all PHP files
|
||||||
if [ ! "${PHPINIFILE}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
if [ ! "${PHPINIFILE}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||||||
Register --test-no PHP-2374 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check PHP enable_dl option"
|
Register --test-no PHP-2374 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check PHP enable_dl option"
|
||||||
if [ ${SKIPTEST} -eq 0 ]; then
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||||||
LogText "Test: Checking PHP enable_dl option"
|
LogText "Test: Checking PHP enable_dl option"
|
||||||
FIND=`egrep -i 'enable_dl.*(off|no|0)' ${PHPINIFILE} | grep -v '^;'`
|
FIND=$(egrep -i 'enable_dl.*(on|yes|1)' ${PHPINIFILE} | grep -v '^;')
|
||||||
if [ "${FIND}" = "" ]; then
|
if [ ! -z "${FIND}" ]; then
|
||||||
Display --indent 4 --text "- Checking enable_dl option" --result "${STATUS_ON}" --color YELLOW
|
Display --indent 4 --text "- Checking enable_dl option" --result "${STATUS_ON}" --color YELLOW
|
||||||
Report "Result: enable_dl option is turned on, which can be used for riskful downloads via PHP"
|
Report "Result: enable_dl option is turned on, which can be used to enable more modules dynamically and circumventing security controls"
|
||||||
ReportSuggestion ${TEST_NO} "Change the enable_dl line to: enable_dl = Off, to disable downloads via PHP"
|
ReportSuggestion ${TEST_NO} "Change the enable_dl line to: enable_dl = Off, to disable dynamically loading new modules"
|
||||||
AddHP 0 1
|
AddHP 0 1
|
||||||
else
|
else
|
||||||
Display --indent 4 --text "- Checking enable_dl option" --result "${STATUS_OFF}" --color GREEN
|
Display --indent 4 --text "- Checking enable_dl option" --result "${STATUS_OFF}" --color GREEN
|
||||||
LogText "Result: Found 'enable_dl' in disabled state (0, no, or off)"
|
LogText "Result: Found 'enable_dl' in disabled state (not present, 0, no, or off)"
|
||||||
AddHP 2 2
|
AddHP 2 2
|
||||||
fi
|
fi
|
||||||
#YYY Check through all files
|
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
Loading…
Reference in New Issue