diff options
author | Nicolas CARPi <nicolas.carpi@curie.fr> | 2020-03-05 02:53:27 +0300 |
---|---|---|
committer | Nicolas CARPi <nicolas.carpi@curie.fr> | 2020-03-05 02:53:27 +0300 |
commit | 0593c69f2f434e79c5e3af1cdd1e5e0ffd714543 (patch) | |
tree | 58b344d4e2f23092296845f764592eab1c7d54a0 /include/tests_php | |
parent | 24ca3c20459c93385994d9b8e2d2b6b24a32ec1b (diff) |
Skip the PHP cli configuration file when looking for expose_php
The expose_php configuration option is only relevant for non-cli PHP and
thus lynis should not look for it in config files that are for cli
Fix #849
Diffstat (limited to 'include/tests_php')
-rw-r--r-- | include/tests_php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/tests_php b/include/tests_php index d84b181a..6e4d44f9 100644 --- a/include/tests_php +++ b/include/tests_php @@ -291,6 +291,8 @@ if [ ${SKIPTEST} -eq 0 ]; then FOUND=0 for FILE in ${PHPINI_ALLFILES}; do + # Don't look at this setting in cli configuration + if [[ ${FILE} == *"/cli/"* ]]; then continue; fi LogText "Test: Checking file ${FILE}" FIND=$(${EGREPBINARY} -i 'expose_php.*(on|yes|1)' ${FILE} | ${GREPBINARY} -v '^;') if HasData "${FIND}"; then |