Skip to content

Commit f6275f6

Browse files
committed
[FILE-6398] test disabled
1 parent b1e1f61 commit f6275f6

File tree

2 files changed

+44
-43
lines changed

2 files changed

+44
-43
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
### Changed
1010
- BOOT-5264 - Changed output of systemd-analyze test and added link
11-
- FILE-6398 - Only perform test if we know if Linux kernel is monolithic/modular
11+
- FILE-6398 - Test temporarily disabled as on modern kernels JDB support is built-in
1212
- FIRE-4508 - Several changes to expand the test, make it more generic, resolve minor issues
1313
- KRNL-5622 - Test if systemctl binary is set
1414
- Update of translations: Italian, Russian

include/tests_filesystems

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -734,48 +734,49 @@
734734
#
735735
# Test : FILE-6398
736736
# Description : Check if JBD (Journal Block Device) driver is loaded
737-
Register --test-no FILE-6398 --os Linux --weight L --network NO --category security --description "Checking if JBD (Journal Block Device) driver is loaded"
738-
if [ ${SKIPTEST} -eq 0 ]; then
739-
LogText "Test: Checking if JBD (Journal Block Device) driver is loaded"
740-
NOTINUSE=0
741-
# Only perform testing if we know that KRNL-5723 performed tests
742-
if [ ${MONOLITHIC_KERNEL_TESTED} -eq 1 ]; then
743-
# Cannot check if driver is loaded/present if kernel is monolithic
744-
if [ ${MONOLITHIC_KERNEL} -eq 0 ]; then
745-
JBD=$(${LSMODBINARY} | ${GREPBINARY} ^jbd)
746-
if [ -n "${JBD}" ]; then
747-
LogText "Result: JBD driver is loaded"
748-
INUSE=$(echo ${JBD} | ${AWKBINARY} '{if ($3 -ne 0) {print $4}}')
749-
if [ -n "${INUSE}" ]; then
750-
LogText "Result: JBD driver is in use by drivers: ${INUSE}"
751-
Report "JBD driver is in use by drivers: ${INUSE}"
752-
Display --indent 2 --text "- JBD driver loaded and in use" --result "${STATUS_OK}" --color GREEN
753-
else
754-
NOTINUSE=1
755-
LogText "Result: JBD driver loaded, but not in use"
756-
Report "JBD driver is loaded, but not in use."
757-
Display --indent 2 --text "- JBD driver loaded, but not in use" --result "${STATUS_SUGGESTION}" --color YELLOW
758-
fi
759-
else
760-
NOTINUSE=2
761-
LogText "Result: JBD driver not loaded"
762-
Report "JBD driver not loaded."
763-
Display --indent 2 --text "- JBD driver is not loaded" --result "${STATUS_CHECK_NEEDED}" --color YELLOW
764-
fi
765-
if [ ${NOTINUSE} -eq 1 ]; then
766-
ReportSuggestion "${TEST_NO}" "The JBD (Journal Block Device) driver is loaded but not in use." "You are currently not using any filesystems with journaling, i.e. you have greater risk of data corruption in case of system crash."
767-
elif [ ${NOTINUSE} -eq 2 ]; then
768-
ReportSuggestion "${TEST_NO}" "The JBD (Journal Block Device) driver is not loaded." "Since boot-time, you have not been using any filesystems with journaling. Alternatively, reason could be driver is blacklisted."
769-
fi
770-
else
771-
Display --indent 2 --text "- JBD driver: unable to check" --result "${STATUS_UNKNOWN}" --color YELLOW
772-
LogText "Kernel is monolithic - cannot check if JBD driver is part of compiled kernel."
773-
fi
774-
else
775-
Display --indent 2 --text "- JBD driver: test skipped" --result "${STATUS_UNKNOWN}" --color YELLOW
776-
LogText "Test skipped as the kernel type (monolithic/modular) is unknown"
777-
fi
778-
fi
737+
# Notes : Test is temporarily disabled, as JBD might be in a kernel (built-in) - https://github.com/CISOfy/lynis/issues/1508
738+
# Register --test-no FILE-6398 --os Linux --weight L --network NO --category security --description "Checking if JBD (Journal Block Device) driver is loaded"
739+
# if [ ${SKIPTEST} -eq 0 ]; then
740+
# LogText "Test: Checking if JBD (Journal Block Device) driver is loaded"
741+
# NOTINUSE=0
742+
# # Only perform testing if we know that KRNL-5723 performed tests
743+
# if [ ${MONOLITHIC_KERNEL_TESTED} -eq 1 ]; then
744+
# # Cannot check if driver is loaded/present if kernel is monolithic
745+
# if [ ${MONOLITHIC_KERNEL} -eq 0 ]; then
746+
# JBD=$(${LSMODBINARY} | ${GREPBINARY} ^jbd)
747+
# if [ -n "${JBD}" ]; then
748+
# LogText "Result: JBD driver is loaded"
749+
# INUSE=$(echo ${JBD} | ${AWKBINARY} '{if ($3 -ne 0) {print $4}}')
750+
# if [ -n "${INUSE}" ]; then
751+
# LogText "Result: JBD driver is in use by drivers: ${INUSE}"
752+
# Report "JBD driver is in use by drivers: ${INUSE}"
753+
# Display --indent 2 --text "- JBD driver loaded and in use" --result "${STATUS_OK}" --color GREEN
754+
# else
755+
# NOTINUSE=1
756+
# LogText "Result: JBD driver loaded, but not in use"
757+
# Report "JBD driver is loaded, but not in use."
758+
# Display --indent 2 --text "- JBD driver loaded, but not in use" --result "${STATUS_SUGGESTION}" --color YELLOW
759+
# fi
760+
# else
761+
# NOTINUSE=2
762+
# LogText "Result: JBD driver not loaded"
763+
# Report "JBD driver not loaded."
764+
# Display --indent 2 --text "- JBD driver is not loaded" --result "${STATUS_CHECK_NEEDED}" --color YELLOW
765+
# fi
766+
# if [ ${NOTINUSE} -eq 1 ]; then
767+
# ReportSuggestion "${TEST_NO}" "The JBD (Journal Block Device) driver is loaded but not in use." "You are currently not using any filesystems with journaling, i.e. you have greater risk of data corruption in case of system crash."
768+
# elif [ ${NOTINUSE} -eq 2 ]; then
769+
# ReportSuggestion "${TEST_NO}" "The JBD (Journal Block Device) driver is not loaded." "Since boot-time, you have not been using any filesystems with journaling. Alternatively, reason could be driver is blacklisted."
770+
# fi
771+
# else
772+
# Display --indent 2 --text "- JBD driver: unable to check" --result "${STATUS_UNKNOWN}" --color YELLOW
773+
# LogText "Kernel is monolithic - cannot check if JBD driver is part of compiled kernel."
774+
# fi
775+
# else
776+
# Display --indent 2 --text "- JBD driver: test skipped" --result "${STATUS_UNKNOWN}" --color YELLOW
777+
# LogText "Test skipped as the kernel type (monolithic/modular) is unknown"
778+
# fi
779+
# fi
779780
#
780781
#################################################################################
781782
#

0 commit comments

Comments
 (0)