mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 23:34:25 +02:00
Use a POSIX implementation to check for substring
This works with all shells, even busybox.
This commit is contained in:
parent
0593c69f2f
commit
600cb84310
@ -292,7 +292,11 @@
|
|||||||
FOUND=0
|
FOUND=0
|
||||||
for FILE in ${PHPINI_ALLFILES}; do
|
for FILE in ${PHPINI_ALLFILES}; do
|
||||||
# Don't look at this setting in cli configuration
|
# Don't look at this setting in cli configuration
|
||||||
if [[ ${FILE} == *"/cli/"* ]]; then continue; fi
|
case "${FILE}" in
|
||||||
|
*/cli/*)
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
LogText "Test: Checking file ${FILE}"
|
LogText "Test: Checking file ${FILE}"
|
||||||
FIND=$(${EGREPBINARY} -i 'expose_php.*(on|yes|1)' ${FILE} | ${GREPBINARY} -v '^;')
|
FIND=$(${EGREPBINARY} -i 'expose_php.*(on|yes|1)' ${FILE} | ${GREPBINARY} -v '^;')
|
||||||
if HasData "${FIND}"; then
|
if HasData "${FIND}"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user