diff options
author | Stéphane <steph78630@gmail.com> | 2021-03-03 01:31:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 01:31:41 +0300 |
commit | 3683ffd3c44ea00119179c30477fd1b21078a8f3 (patch) | |
tree | 9dfc80b885f8b82932d116aa695bc4c5a1a94925 /include | |
parent | f1604c2e554eaa42ecc23dd16fa6be9333273c6e (diff) |
Add translated status
Diffstat (limited to 'include')
-rw-r--r-- | include/tests_boot_services | 9 | ||||
-rw-r--r-- | include/tests_filesystems | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services index 7d6feeec..2b30a11a 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -1062,23 +1062,28 @@ if [ "${UNIT}" = "UNIT" ]; then continue fi + STATUS="UNKNOWN" COLOR="BLACK" case ${PREDICATE} in PERFECT | SAFE | OK) + STATUS="${STATUS_PROTECTED}" COLOR=GREEN ;; MEDIUM) + STATUS="${STATUS_MEDIUM}" COLOR=WHITE ;; EXPOSED) + STATUS="${STATUS_EXPOSED}" COLOR=YELLOW ;; UNSAFE | DANGEROUS) + STATUS="${STATUS_UNSAFE}" COLOR=RED ;; esac - Display --indent 8 --text "- ${UNIT}:" --result "${PREDICATE}" --color "${COLOR}" - LogText "Result: ${UNIT}: ${EXPOSURE} ${PREDICATE}" + Display --indent 8 --text "- ${UNIT}:" --result "${STATUS}" --color "${COLOR}" + LogText "Result: ${UNIT}: ${EXPOSURE} ${STATUS}" done ReportSuggestion "${TEST_NO}" "Consider hardening system services" "Run '${SYSTEMDANALYZEBINARY} security SERVICE' for each service" fi diff --git a/include/tests_filesystems b/include/tests_filesystems index a2ae58cd..3c1bc7a4 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -606,11 +606,11 @@ done if [ ${FULLY_HARDENED} -eq 1 ]; then LogText "Result: marked ${FILESYSTEM} as fully hardened" - Display --indent 2 --text "- Mount options of ${FILESYSTEM}" --result HARDENED --color GREEN + Display --indent 2 --text "- Mount options of ${FILESYSTEM}" --result "${STATUS_HARDENED}" --color GREEN AddHP 5 5 elif [ ${PARTIALLY_HARDENED} -eq 1 ]; then LogText "Result: marked ${FILESYSTEM} as partially hardened" - Display --indent 2 --text "- Mount options of ${FILESYSTEM}" --result "PARTIALLY HARDENED" --color YELLOW + Display --indent 2 --text "- Mount options of ${FILESYSTEM}" --result "${STATUS_PARTIALLY_HARDENED}" --color YELLOW AddHP 4 5 else # if |