mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
Test for presence php.ini file
This commit is contained in:
parent
d56d33a63d
commit
209e1991d2
@ -128,12 +128,16 @@
|
|||||||
# Description : Check php register_globals option
|
# Description : Check php register_globals option
|
||||||
# Notes : Don't test for it if PHP version is 5.4.0 or later (it has been removed)
|
# Notes : Don't test for it if PHP version is 5.4.0 or later (it has been removed)
|
||||||
if [ ! "${PHPINIFILE}" = "" -a ! "${PHPVERSION}" = "" -a ! "${EGREPBINARY}" = "" ]; then
|
if [ ! "${PHPINIFILE}" = "" -a ! "${PHPVERSION}" = "" -a ! "${EGREPBINARY}" = "" ]; then
|
||||||
|
if [ -f "${PHPINIFILE}" ]; then
|
||||||
FIND=`echo ${PHPVERSION} | ${EGREPBINARY} "^(4.|5.[0-3])"`
|
FIND=`echo ${PHPVERSION} | ${EGREPBINARY} "^(4.|5.[0-3])"`
|
||||||
if [ "${FIND}" = "" ]; then
|
if [ "${FIND}" = "" ]; then
|
||||||
PREQS_MET="NO"; Debug "Found most likely PHP version 5.4.0 or higher (${PHPVERSION}) which does not use register_globals"
|
PREQS_MET="NO"; Debug "Found most likely PHP version 5.4.0 or higher (${PHPVERSION}) which does not use register_globals"
|
||||||
else
|
else
|
||||||
PREQS_MET="YES"; Debug "Found PHP version 4 or up to 5.3 (${FIND}) which we are going to scan"
|
PREQS_MET="YES"; Debug "Found PHP version 4 or up to 5.3 (${FIND}) which we are going to scan"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
Debug "File php.ini (${PHPINIFILE}) not found"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
PREQS_MET="NO"
|
PREQS_MET="NO"
|
||||||
Debug "Skipping test: php.ini not found, or PHP version empty"
|
Debug "Skipping test: php.ini not found, or PHP version empty"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user