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-05-03 11:58:05 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-05-03 11:58:05 +0300
commit924e53ed76050bae9d66bcc76f6c53c917bfade0 (patch)
treeb6edaf78200b8bb2c993460d94b64a2088042637 /include/tests_mac_frameworks
parent89e16443a932bf35c78713b3700e0b8a73fa4a72 (diff)
Do an earlier detection of grsecurity and store result, so tests can be simplified
Diffstat (limited to 'include/tests_mac_frameworks')
-rw-r--r--include/tests_mac_frameworks19
1 files changed, 5 insertions, 14 deletions
diff --git a/include/tests_mac_frameworks b/include/tests_mac_frameworks
index 74d662f7..6ee373de 100644
--- a/include/tests_mac_frameworks
+++ b/include/tests_mac_frameworks
@@ -19,7 +19,6 @@
#################################################################################
#
APPARMORFOUND=0 # Set default for test MACF-6208
- GRSECFOUND=0 # grsecurity
MAC_FRAMEWORK_ACTIVE=0 # Default no MAC framework active
RBAC_FRAMEWORK_ACTIVE=0 # Default no RBAC framework active
SELINUXFOUND=0
@@ -137,28 +136,20 @@
#
# Test : RBAC-6272
# Description : Check if grsecurity is installed
- # Notes : Solaris doesn't support test -e
- if [ ! "${OS}" = "Solaris" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
- Register --test-no RBAC-6272 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check grsecurity presence"
+ # Notes : We already checked grsecurity in osdetection
+ Register --test-no RBAC-6272 --weight L --network NO --description "Check grsecurity presence"
if [ ${SKIPTEST} -eq 0 ]; then
- if [ -e /dev/grsec ]; then
- GRSECFOUND=1
- LogText "Result: grsecurity available (/dev/grsec found)"
- else
- LogText "Result: grsecurity not present (/dev/grsec not found)"
- fi
# Check Linux kernel configuration
if [ ! "${LINUXCONFIGFILE}" = "" -a -f "${LINUXCONFIGFILE}" ]; then
FIND=`${GREPBINARY} ^CONFIG_GRKERNSEC=y ${LINUXCONFIGFILE}`
if [ ! "${FIND}" = "" ]; then
LogText "Result: grsecurity available (in kernel config)"
- GRSECFOUND=1
+ GRSEC_FOUND=1
else
LogText "Result: no grsecurity found in kernel config"
fi
fi
- # Found grsecurity?
- if [ ${GRSECFOUND} -eq 1 ]; then
+ if [ ${GRSEC_FOUND} -eq 1 ]; then
Display --indent 2 --text "- Checking presence grsecurity" --result FOUND --color GREEN
AddHP 3 3
else
@@ -186,7 +177,7 @@
#################################################################################
#
-Report "framework_grsecurity=${GRSECFOUND}"
+Report "framework_grsecurity=${GRSEC_FOUND}"
Report "framework_selinux=${SELINUXFOUND}"
WaitForKeyPress