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:
authorJeremias Cordoba <js.cordoba8321@gmail.com>2020-05-05 01:51:03 +0300
committerJeremias Cordoba <js.cordoba8321@gmail.com>2020-05-05 01:51:03 +0300
commitf081a9ed7e78f5ef86ab97a3222dbf01ad8aa7d5 (patch)
treed3ff1408c63629abf6d8f619f57ddca7f8cbb4d3 /include/tests_kernel
parentce3c80b44f418e28503e1aecaeb87c170d0c811c (diff)
Fix KRNL-5730 to properly check /proc/config.gz
When KRNL-5728 locates the kernel config it does not properly set LINUXCONFIGFILE if config is found as /proc/config.gz. This causes KRNL-5730 to fail due to missing prereqs, despite a kernel config existing. Signed-off-by: Jeremias Cordoba <js.cordoba8321@gmail.com>
Diffstat (limited to 'include/tests_kernel')
-rw-r--r--include/tests_kernel5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/tests_kernel b/include/tests_kernel
index 72e5082b..e19a7679 100644
--- a/include/tests_kernel
+++ b/include/tests_kernel
@@ -235,12 +235,13 @@
Register --test-no KRNL-5728 --os Linux --weight L --network NO --category security --description "Checking Linux kernel config"
if [ ${SKIPTEST} -eq 0 ]; then
CHECKFILE="${ROOTDIR}boot/config-$(uname -r)"
+ CHECKFILE_ZIPPED="${ROOTDIR}proc/config.gz"
if [ -f ${CHECKFILE} ]; then
LINUXCONFIGFILE="${CHECKFILE}"
LogText "Result: found config (${LINUXCONFIGFILE})"
Display --indent 2 --text "- Checking Linux kernel configuration file" --result "${STATUS_FOUND}" --color GREEN
- elif [ -f ${ROOTDIR}proc/config.gz ]; then
- LINUXCONFIGFILE="${CHECKFILE}"
+ elif [ -f ${CHECKFILE_ZIPPED} ]; then
+ LINUXCONFIGFILE="${CHECKFILE_ZIPPED}"
LINUXCONFIGFILE_ZIPPED=1
LogText "Result: found config: ${ROOTDIR}proc/config.gz (compressed)"
Display --indent 2 --text "- Checking Linux kernel configuration file" --result "${STATUS_FOUND}" --color GREEN