mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-29 08:44:21 +02:00
[KRNL-5830] skip test partially if non-privileged
This commit is contained in:
parent
fd84be485b
commit
bf4374bb19
@ -612,8 +612,9 @@
|
|||||||
else
|
else
|
||||||
LogText "Result: file ${FILE} not found"
|
LogText "Result: file ${FILE} not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if /boot exists
|
# 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"
|
LogText "Result: /boot exists, performing more tests from here"
|
||||||
FIND=$(${LSBINARY} ${ROOTDIR}boot/* 2> /dev/null)
|
FIND=$(${LSBINARY} ${ROOTDIR}boot/* 2> /dev/null)
|
||||||
if [ -n "${FIND}" ]; then
|
if [ -n "${FIND}" ]; then
|
||||||
@ -647,7 +648,7 @@
|
|||||||
else
|
else
|
||||||
FOUND_VMLINUZ=$(ls -t ${ROOTDIR}boot/vmlinuz-* 2> /dev/null | head -1)
|
FOUND_VMLINUZ=$(ls -t ${ROOTDIR}boot/vmlinuz-* 2> /dev/null | head -1)
|
||||||
fi
|
fi
|
||||||
LogText "Result: /found ${FOUND_VMLINUZ} (usually Arch Linux or similar)"
|
LogText "Result: found ${FOUND_VMLINUZ}"
|
||||||
LogText "Test: checking kernel version on disk"
|
LogText "Test: checking kernel version on disk"
|
||||||
NEXTLINE=0
|
NEXTLINE=0
|
||||||
VERSION_ON_DISK=""
|
VERSION_ON_DISK=""
|
||||||
@ -737,7 +738,7 @@
|
|||||||
LogText "Result: Skipping this test, as there are no files in /boot"
|
LogText "Result: Skipping this test, as there are no files in /boot"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
LogText "Result: /boot does not exist"
|
LogText "Result: /boot does not exist or not privileged to read files"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Display discovered status
|
# Display discovered status
|
||||||
|
Loading…
x
Reference in New Issue
Block a user