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>2021-01-01 14:12:38 +0300
committerGitHub <noreply@github.com>2021-01-01 14:12:38 +0300
commit075d92e275b1984328b95ea8e5b4b1958cf5befd (patch)
tree85b926b3b0073558b4b6f2a7255ee00f3528f6ef
parent8053165d2fcd3bb94ae3e0a8b7eff85b27dd9982 (diff)
parent7292f0f179d1fce59c9412349161f71a74e53c88 (diff)
Merge pull request #1097 from bginsbach/krnl-5677
Add support for NetBSD to KRNL-5677 test and allow multiple platforms in Register function.
-rw-r--r--include/functions10
-rw-r--r--include/tests_kernel2
2 files changed, 10 insertions, 2 deletions
diff --git a/include/functions b/include/functions
index c88674ba..2bb82eae 100644
--- a/include/functions
+++ b/include/functions
@@ -2670,7 +2670,15 @@
fi
# Check for correct hardware platform
- if [ ${SKIPTEST} -eq 0 -a -n "${TEST_NEED_PLATFORM}" -a ! "${HARDWARE}" = "${TEST_NEED_PLATFORM}" ]; then SKIPTEST=1; SKIPREASON="Incorrect hardware platform"; fi
+ if [ ${SKIPTEST} -eq 0 -a -n "${TEST_NEED_PLATFORM}" ]; then
+ HASMATCH=0
+ for I in ${TEST_NEED_PLATFORM}; do
+ if [ "${I}" = "${HARDWARE}" ]; then HASMATCH=1; fi
+ done
+ if [ ${HASMATCH} -eq 0 ]; then
+ SKIPTEST=1; SKIPREASON="Incorrect hardware platform (${TEST_NEED_PLATFORM} only)"
+ fi
+ fi
# Check for required (and discovered) package manager
if [ ${SKIPTEST} -eq 0 -a ${TEST_NEED_PKG_MGR} -eq 1 -a ${HAS_PACKAGE_MANAGER} -eq 0 ]; then SKIPTEST=1; SKIPREASON="Requires a known package manager to test presence of a particular package"; fi
diff --git a/include/tests_kernel b/include/tests_kernel
index 119b276e..75f7bffc 100644
--- a/include/tests_kernel
+++ b/include/tests_kernel
@@ -103,7 +103,7 @@
# Description : Check CPU options and support (PAE, No eXecute, eXecute Disable)
# More info : pae and nx bit are both visible on AMD and Intel CPU's if supported
- Register --test-no KRNL-5677 --platform x86_64 --os Linux --weight L --network NO --category security --description "Check CPU options and support"
+ Register --test-no KRNL-5677 --platform "x86_64 amd64" --os "Linux NetBSD" --weight L --network NO --category security --description "Check CPU options and support"
if [ ${SKIPTEST} -eq 0 ]; then
Display --indent 2 --text "- Checking CPU support (NX/PAE)"
LogText "Test: Checking /proc/cpuinfo"