diff options
-rw-r--r-- | include/tests_ports_packages | 10 | ||||
-rw-r--r-- | include/tests_webservers | 9 |
2 files changed, 7 insertions, 12 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 2d8b997e..6b6b2ed9 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -879,8 +879,7 @@ if [ ${DO_TEST} -eq 0 ]; then FileExists ${ROOTDIR}usr/share/yum-cli/cli.py if [ ${FILE_FOUND} -eq 1 ]; then - SearchItem "\-\-security" "${ROOTDIR}usr/share/yum-cli/cli.py" - if [ ${ITEM_FOUND} -eq 1 ]; then + if SearchItem "\-\-security" "${ROOTDIR}usr/share/yum-cli/cli.py"; then DO_TEST=1 LogText "Result: found built-in security in yum" else @@ -892,8 +891,7 @@ if [ ${DO_TEST} -eq 0 ]; then FileExists ${ROOTDIR}etc/yum/pluginconf.d/security.conf if [ ${FILE_FOUND} -eq 1 ]; then - SearchItem "^enabled=1$" "${ROOTDIR}etc/yum/pluginconf.d/security.conf" - if [ ${ITEM_FOUND} -eq 1 ]; then + if SearchItem "^enabled=1$" "${ROOTDIR}etc/yum/pluginconf.d/security.conf"; then DO_TEST=1 LogText "Result: found enabled plugin" else @@ -967,8 +965,8 @@ FOUND=0 FileExists ${ROOTDIR}etc/yum.conf if [ ${FILE_FOUND} -eq 1 ]; then - SearchItem "^gpgenabled\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi - SearchItem "^gpgcheck\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi + if SearchItem "^gpgenabled\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; then FOUND=1; fi + if SearchItem "^gpgcheck\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; then FOUND=1; fi if [ ${FOUND} -eq 1 ]; then LogText "Result: GPG check is enabled" Display --indent 2 --text "- Checking GPG checks (yum.conf)" --result "${STATUS_OK}" --color GREEN diff --git a/include/tests_webservers b/include/tests_webservers index 5d0907b9..dfe8aabc 100644 --- a/include/tests_webservers +++ b/include/tests_webservers @@ -251,8 +251,7 @@ Register --test-no HTTP-6640 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Determining existence of specific Apache modules" if [ ${SKIPTEST} -eq 0 ]; then # Check modules, module - CheckItem "apache_module" "/mod_evasive([0-9][0-9])?.so" - if [ ${ITEM_FOUND} -eq 1 ]; then + if CheckItem "apache_module" "/mod_evasive([0-9][0-9])?.so"; then Display --indent 10 --text "mod_evasive: anti-DoS/brute force" --result "${STATUS_FOUND}" --color GREEN AddHP 3 3 else @@ -271,8 +270,7 @@ Register --test-no HTTP-6641 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Determining existence of specific Apache modules" if [ ${SKIPTEST} -eq 0 ]; then # Check modules, module - CheckItem "apache_module" "/mod_(reqtimeout|qos).so" - if [ ${ITEM_FOUND} -eq 1 ]; then + if CheckItem "apache_module" "/mod_(reqtimeout|qos).so"; then Display --indent 10 --text "mod_reqtimeout/mod_qos" --result "${STATUS_FOUND}" --color GREEN AddHP 3 3 else @@ -290,8 +288,7 @@ Register --test-no HTTP-6643 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Determining existence of specific Apache modules" if [ ${SKIPTEST} -eq 0 ]; then # Check modules, module - CheckItem "apache_module" "/mod_security2.so" - if [ ${ITEM_FOUND} -eq 1 ]; then + if CheckItem "apache_module" "/mod_security2.so"; then Display --indent 10 --text "ModSecurity: web application firewall" --result "${STATUS_FOUND}" --color GREEN AddHP 3 3 else |