From c68b70ff2e305335d5bf8252141e6f7599f49491 Mon Sep 17 00:00:00 2001 From: mboelen Date: Wed, 18 Nov 2015 15:55:49 +0100 Subject: [PATCH] Extended YUM test for security plugin testing --- include/tests_ports_packages | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 8d89c5e1..b21020db 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -643,6 +643,8 @@ if [ ${ITEM_FOUND} -eq 1 ]; then DO_TEST=1 logtext "Result: found built-in security in yum" + else + logtext "Result: did not find --security in /usr/share/yum-cli/cli.py" fi fi fi @@ -653,7 +655,9 @@ SearchItem "^enabled=1$" "/etc/yum/pluginconf.d/security.conf" if [ ${ITEM_FOUND} -eq 1 ]; then DO_TEST=1 - logtext "Result: Found enabled plugin" + logtext "Result: found enabled plugin" + else + logtext "Result: plugin NOT enabled in /etc/yum/pluginconf.d/security.conf" fi fi fi @@ -672,7 +676,7 @@ PACKAGE_AUDIT_TOOL_FOUND=1 PACKAGE_AUDIT_TOOL="yum-security" logtext "Test: Checking for vulnerable packages" - FIND2=`/usr/bin/yum list-sec security | awk '{ if($2=="security") print $3","$5 }'` + FIND2=`/usr/bin/yum list-sec security | awk '{ if($2=="security" || $2~"Sec") print $3","$5 }'` if [ "${FIND2}" = "" ]; then logtext "Result: no vulnerable packages found" Display --indent 2 --text "- Checking missing security packages" --result OK --color GREEN