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:
authorMichael Boelen <michael.boelen@cisofy.com>2016-08-22 13:12:38 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-08-22 13:12:38 +0300
commitc061d31bdea8ef8cc7e738aeb783c1bcc826c2cb (patch)
tree9c25b3c836418aa386bf009893682adc4af97326 /include/tests_mac_frameworks
parent5debe001f18d8620aeb6d23e7114ee94c3cf568f (diff)
Change text of AppArmor test and add more details to report
Diffstat (limited to 'include/tests_mac_frameworks')
-rw-r--r--include/tests_mac_frameworks17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/tests_mac_frameworks b/include/tests_mac_frameworks
index 2f7fb04e..f955984a 100644
--- a/include/tests_mac_frameworks
+++ b/include/tests_mac_frameworks
@@ -61,20 +61,25 @@
MAC_FRAMEWORK_ACTIVE=1
LogText "Result: AppArmor is enabled and a policy is loaded"
Display --indent 4 --text "- Checking AppArmor status" --result "${STATUS_ENABLED}" --color GREEN
- elif [ ${FIND} -eq 4 ]; then
+ Report "apparmor_enabled=1"
+ Report "apparmor_policy_loaded=1"
+ elif [ ${FIND} -eq 4 ]; then
LogText "Result: Can not determine status, most likely due to lacking permissions"
Display --indent 4 --text "- Checking AppArmor status" --result "${STATUS_UNKNOWN}" --color RED
- elif [ ${FIND} -eq 3 ]; then
+ elif [ ${FIND} -eq 3 ]; then
LogText "Result: Can not check control files"
Display --indent 4 --text "- Checking AppArmor status" --result "${STATUS_UNKNOWN}" --color RED
- elif [ ${FIND} -eq 2 ]; then
+ elif [ ${FIND} -eq 2 ]; then
LogText "Result: AppArmor is enabled, but no policy is loaded"
- ReportSuggestion ${TEST_NO} "Disable AppArmor or load a policy"
+ ReportSuggestion ${TEST_NO} "Load AppArmor policies"
Display --indent 4 --text "- Checking AppArmor status" --result "NON-ACTIVE" --color GREEN
- elif [ ${FIND} -eq 1 ]; then
+ Report "apparmor_enabled=1"
+ Report "apparmor_policy_loaded=0"
+ elif [ ${FIND} -eq 1 ]; then
LogText "Result: AppArmor is disabled"
Display --indent 4 --text "- Checking AppArmor status" --result "${STATUS_DISABLED}" --color YELLOW
- else
+ Report "apparmor_enabled=0"
+ else
Display --indent 4 --text "- Checking AppArmor status" --result "${STATUS_UNKNOWN}" --color RED
ReportException "${TEST_NO}:1" "Invalid or unknown AppArmor status detected"
fi