diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-31 14:25:35 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-31 14:25:35 +0300 |
commit | 1b3cdb98838695b0b210e64477ebfe9a1f97e233 (patch) | |
tree | 7793b43973f2b815ebb743f8ca4df53dead27526 | |
parent | aad8d89bf859c299d93b6d138c1c5f1ed5f88337 (diff) |
[AUTH-9226] Style, text, and removed warning
-rw-r--r-- | include/tests_authentication | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/tests_authentication b/include/tests_authentication index 04182d8c..06a89395 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -219,16 +219,15 @@ Register --test-no AUTH-9226 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check non 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` - if [ "${FIND}" = "" ]; then - Display --indent 2 --text "- Checking non unique group names" --result "${STATUS_OK}" --color GREEN + FIND=$(grep -v '^#' /etc/group | grep -v '^$' | awk -F: '{ print $1 }' | sort | uniq -d) + if [ -z "${FIND}" ]; then + Display --indent 2 --text "- Unique group names" --result "${STATUS_OK}" --color GREEN LogText "Result: All group names are unique" - else - Display --indent 2 --text "- Checking non unique group names" --result "${STATUS_WARNING}" --color WARNING + else + Display --indent 2 --text "- Unique group names" --result "${STATUS_WARNING}" --color WARNING LogText "Result: Found the same group name multiple times" LogText "Output: ${FIND}" - ReportWarning ${TEST_NO} "M" "Found inconsistencies in group file (multiple occurences of a single group)" - 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 # @@ -258,11 +257,11 @@ esac # Only display if this test has been executed if [ ${TESTED} -eq 1 -a "${FIND}" = "0" ]; then - Display --indent 2 --text "- Checking password file consistency" --result "${STATUS_OK}" --color GREEN + Display --indent 2 --text "- Password file consistency" --result "${STATUS_OK}" --color GREEN LogText "Result: pwck check didn't find any problems" AddHP 2 2 else - Display --indent 2 --text "- Checking password file consistency" --result "${STATUS_SUGGESTION}" --color YELLOW + Display --indent 2 --text "- Password file consistency" --result "${STATUS_SUGGESTION}" --color YELLOW LogText "Result: pwck found one or more errors/warnings in the password file." ReportSuggestion ${TEST_NO} "Run pwck manually and correct any errors in the password file" AddHP 0 2 |