From 23e400ea9e322bcafbed181eee7d7438060c8f30 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 31 Jul 2016 13:29:23 +0200 Subject: [PATCH] More style and text changes, and removed warning --- include/tests_authentication | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/include/tests_authentication b/include/tests_authentication index 06a89395..52432352 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -194,29 +194,28 @@ ################################################################################# # # Test : AUTH-9222 - # Description : Check for non unique groups - Register --test-no AUTH-9222 --weight L --network NO --category security --description "Check for non unique groups" + # Description : Check unique group IDs + Register --test-no AUTH-9222 --weight L --network NO --category security --description "Check unique groups (IDs)" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Checking for non unique group ID's in /etc/group" - FIND=`grep -v '^#' /etc/group | grep -v '^$' | awk -F: '{ print $3 }' | sort | uniq -d` + FIND=$(grep -v '^#' /etc/group | grep -v '^$' | awk -F: '{ print $3 }' | sort | uniq -d) if [ "${FIND}" = "" ]; then - Display --indent 2 --text "- Checking non unique group ID's" --result "${STATUS_OK}" --color GREEN + Display --indent 2 --text "- Unique group IDs" --result "${STATUS_OK}" --color GREEN LogText "Result: All group ID's are unique" - else - Display --indent 2 --text "- Checking non unique group ID's" --result "${STATUS_WARNING}" --color RED + else + Display --indent 2 --text "- Unique group IDs" --result "${STATUS_WARNING}" --color RED LogText "Result: Found the same group ID multiple times" LogText "Output: ${FIND}" - ReportWarning ${TEST_NO} "H" "Found multiple groups with same group ID" - #ReportSuggestion ${TEST_NO} "Check your /etc/group file and correct inconsistencies" + ReportSuggestion ${TEST_NO} "Check your /etc/group file and correct any inconsistencies" fi fi # ################################################################################# # # Test : AUTH-9226 - # Description : Check non unique group names + # Description : Check unique group names if [ -f /etc/group ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi - Register --test-no AUTH-9226 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check non unique group names" + Register --test-no AUTH-9226 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check unique group names" if [ ${SKIPTEST} -eq 0 ]; then LogText "Test: Checking for non unique group names in /etc/group" FIND=$(grep -v '^#' /etc/group | grep -v '^$' | awk -F: '{ print $1 }' | sort | uniq -d)