From c061d31bdea8ef8cc7e738aeb783c1bcc826c2cb Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 22 Aug 2016 12:12:38 +0200 Subject: Change text of AppArmor test and add more details to report --- include/tests_mac_frameworks | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'include/tests_mac_frameworks') 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 -- cgit v1.2.3