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