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-11-19 17:38:32 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-11-19 17:38:32 +0300
commitf16325ff55194494b1fe35d816babcbd07d86b33 (patch)
tree2ae5d973952f0d33f945854f6aafb424cc63de14 /include
parentfcb1b2df87ccc59d2679bf96aa078d83613bc370 (diff)
Only show non-privileged tests that were skipped if they are applicable to our platform
Diffstat (limited to 'include')
-rw-r--r--include/functions14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/functions b/include/functions
index 49e03eaa..b1b86a53 100644
--- a/include/functions
+++ b/include/functions
@@ -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)