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>2019-12-13 14:35:38 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-12-13 14:35:38 +0300
commitbf4374bb1956c0aa93c9e7b92a786e188dd31968 (patch)
treec73a6deaa5e937cce8db049bfad2d03a3f4b1ef8 /include/tests_kernel
parentfd84be485b39f49b411c4e9744864119be954d82 (diff)
[KRNL-5830] skip test partially if non-privileged
Diffstat (limited to 'include/tests_kernel')
-rw-r--r--include/tests_kernel7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/tests_kernel b/include/tests_kernel
index c3caf24b..9357e298 100644
--- a/include/tests_kernel
+++ b/include/tests_kernel
@@ -612,8 +612,9 @@
else
LogText "Result: file ${FILE} not found"
fi
+
# Check if /boot exists
- if [ -d ${ROOTDIR}boot ]; then
+ if [ ${PRIVILEGED} -eq 1 -a -d "${ROOTDIR}boot" ]; then
LogText "Result: /boot exists, performing more tests from here"
FIND=$(${LSBINARY} ${ROOTDIR}boot/* 2> /dev/null)
if [ -n "${FIND}" ]; then
@@ -647,7 +648,7 @@
else
FOUND_VMLINUZ=$(ls -t ${ROOTDIR}boot/vmlinuz-* 2> /dev/null | head -1)
fi
- LogText "Result: /found ${FOUND_VMLINUZ} (usually Arch Linux or similar)"
+ LogText "Result: found ${FOUND_VMLINUZ}"
LogText "Test: checking kernel version on disk"
NEXTLINE=0
VERSION_ON_DISK=""
@@ -737,7 +738,7 @@
LogText "Result: Skipping this test, as there are no files in /boot"
fi
else
- LogText "Result: /boot does not exist"
+ LogText "Result: /boot does not exist or not privileged to read files"
fi
# Display discovered status