mirror of https://github.com/CISOfy/lynis.git
Only show non-privileged tests that were skipped if they are applicable to our platform
This commit is contained in:
parent
fcb1b2df87
commit
f16325ff55
|
@ -1973,13 +1973,6 @@
|
|||
shift
|
||||
done
|
||||
|
||||
# Skip if a test is root only and we are running a non-privileged test
|
||||
if [ ${ROOT_ONLY} -eq 1 -a ! ${MYID} = "0" ]; then
|
||||
SKIPTEST=1; SKIPREASON="This test needs root permissions"
|
||||
SKIPPED_TESTS_ROOTONLY="${SKIPPED_TESTS_ROOTONLY}====${TEST_NO}:space:-:space:${TEST_DESCRIPTION}"
|
||||
#SkipTest "${TEST_NO}:Test:space:requires:space:root:space:permissions:-:-:"
|
||||
fi
|
||||
|
||||
# Skip test if it's configured in profile (old style)
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
FIND=`echo "${TEST_SKIP_ALWAYS}" | grep "${TEST_NO}" | tr '[:lower:]' '[:upper:]'`
|
||||
|
@ -2023,6 +2016,13 @@
|
|||
# Not all prerequisites met, like missing tool
|
||||
if [ ${SKIPTEST} -eq 0 -a "${PREQS_MET}" = "NO" ]; then SKIPTEST=1; if [ -z "${SKIPREASON}" ]; then SKIPREASON="Prerequisities not met (ie missing tool, other type of Linux distribution)"; fi; fi
|
||||
|
||||
# Skip if a test is root only and we are running a non-privileged test
|
||||
if [ ${SKIPTEST} -eq 0 -a ${ROOT_ONLY} -eq 1 -a ! ${MYID} = "0" ]; then
|
||||
SKIPTEST=1; SKIPREASON="This test needs root permissions"
|
||||
SKIPPED_TESTS_ROOTONLY="${SKIPPED_TESTS_ROOTONLY}====${TEST_NO}:space:-:space:${TEST_DESCRIPTION}"
|
||||
#SkipTest "${TEST_NO}:Test:space:requires:space:root:space:permissions:-:-:"
|
||||
fi
|
||||
|
||||
# Skip test?
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
# First wait X seconds (depending pause_between_tests)
|
||||
|
|
Loading…
Reference in New Issue