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/tests_mac_frameworks')
-rw-r--r--include/tests_mac_frameworks50
1 files changed, 25 insertions, 25 deletions
diff --git a/include/tests_mac_frameworks b/include/tests_mac_frameworks
index b1b9b861..7d4cc2ad 100644
--- a/include/tests_mac_frameworks
+++ b/include/tests_mac_frameworks
@@ -132,28 +132,28 @@
# Status: Enabled/Disabled
FIND=$(${SESTATUSBINARY} | ${GREPBINARY} "^SELinux status" | ${AWKBINARY} '{ print $3 }')
if [ "${FIND}" = "enabled" ]; then
- MAC_FRAMEWORK_ACTIVE=1
- LogText "Result: SELinux framework is enabled"
- Report "selinux_status=1"
- SELINUXFOUND=1
- Display --indent 4 --text "- Checking SELinux status" --result "${STATUS_ENABLED}" --color GREEN
- FIND=$(${SESTATUSBINARY} | ${GREPBINARY} "^Current mode" | ${AWKBINARY} '{ print $3 }')
- Report "selinux_mode=${FIND}"
- FIND2=$(${SESTATUSBINARY} | ${GREPBINARY} "^Mode from config file" | ${AWKBINARY} '{ print $5 }')
- LogText "Result: current SELinux mode is ${FIND}"
- LogText "Result: mode configured in config file is ${FIND2}"
- if [ "${FIND}" = "${FIND2}" ]; then
- LogText "Result: Current SELinux mode is the same as in config file."
- Display --indent 6 --text "- Checking current mode and config file" --result "${STATUS_OK}" --color GREEN
- else
- LogText "Result: Current SELinux mode (${FIND}) is NOT the same as in config file (${FIND2})."
- ReportWarning ${TEST_NO} "Current SELinux mode is different from config file (current: ${FIND}, config file: ${FIND2})"
- Display --indent 6 --text "- Checking current mode and config file" --result "${STATUS_WARNING}" --color RED
- fi
- Display --indent 8 --text "Current SELinux mode: ${FIND}"
+ MAC_FRAMEWORK_ACTIVE=1
+ LogText "Result: SELinux framework is enabled"
+ Report "selinux_status=1"
+ SELINUXFOUND=1
+ Display --indent 4 --text "- Checking SELinux status" --result "${STATUS_ENABLED}" --color GREEN
+ FIND=$(${SESTATUSBINARY} | ${GREPBINARY} "^Current mode" | ${AWKBINARY} '{ print $3 }')
+ Report "selinux_mode=${FIND}"
+ FIND2=$(${SESTATUSBINARY} | ${GREPBINARY} "^Mode from config file" | ${AWKBINARY} '{ print $5 }')
+ LogText "Result: current SELinux mode is ${FIND}"
+ LogText "Result: mode configured in config file is ${FIND2}"
+ if [ "${FIND}" = "${FIND2}" ]; then
+ LogText "Result: Current SELinux mode is the same as in config file."
+ Display --indent 6 --text "- Checking current mode and config file" --result "${STATUS_OK}" --color GREEN
+ else
+ LogText "Result: Current SELinux mode (${FIND}) is NOT the same as in config file (${FIND2})."
+ ReportWarning ${TEST_NO} "Current SELinux mode is different from config file (current: ${FIND}, config file: ${FIND2})"
+ Display --indent 6 --text "- Checking current mode and config file" --result "${STATUS_WARNING}" --color RED
+ fi
+ Display --indent 8 --text "Current SELinux mode: ${FIND}"
else
- LogText "Result: SELinux framework is disabled"
- Display --indent 4 --text "- Checking SELinux status" --result "${STATUS_DISABLED}" --color YELLOW
+ LogText "Result: SELinux framework is disabled"
+ Display --indent 4 --text "- Checking SELinux status" --result "${STATUS_DISABLED}" --color YELLOW
fi
fi
#
@@ -181,10 +181,10 @@
Display --indent 2 --text "- Checking presence grsecurity" --result "${STATUS_NOT_FOUND}" --color WHITE
fi
if [ ! -z "${GRADMBINARY}" ]; then
- FIND=$(${GRADMBINARY} --status)
- if [ "${FIND}" = "The RBAC system is currently enabled." ]; then
- MAC_FRAMEWORK_ACTIVE=1
- fi
+ FIND=$(${GRADMBINARY} --status)
+ if [ "${FIND}" = "The RBAC system is currently enabled." ]; then
+ MAC_FRAMEWORK_ACTIVE=1
+ fi
fi
fi
#