Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/tests_boot_services9
-rw-r--r--include/tests_filesystems4
2 files changed, 9 insertions, 4 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services
index dce27ab4..c3431fbd 100644
--- a/include/tests_boot_services
+++ b/include/tests_boot_services
@@ -1068,23 +1068,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 3fdb91d6..34f128d0 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