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:
Diffstat (limited to 'include/tests_boot_services')
-rw-r--r--include/tests_boot_services17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services
index 84680efc..2de8d748 100644
--- a/include/tests_boot_services
+++ b/include/tests_boot_services
@@ -240,6 +240,23 @@
#
#################################################################################
#
+ # Test : BOOT-5117
+ # Description : Check for systemd-boot boot loader
+ if [ ! "${BOOTCTLBINARY}" = "" -a ${HAS_SYSTEMD} -eq 1 -a ${UEFI_BOOTED} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
+ Register --test-no BOOT-5117 --preqs-met ${PREQS_MET} --os "Linux" --weight L --network NO --category security --description "Check for systemd-boot bootloader presence"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ BOOT_LOADER_SEARCHED=1
+ CURRENT_BOOT_LOADER=$(${BOOTCTLBINARY} status --no-pager 2>/dev/null | ${AWKBINARY} '/Current Boot Loader/{ getline; print $2 }')
+ if [ "${CURRENT_BOOT_LOADER}" = "systemd-boot" ]; then
+ Display --indent 2 --text "- Checking systemd-boot presence" --result "${STATUS_FOUND}" --color GREEN
+ LogText "Result: found systemd-boot"
+ BOOT_LOADER="systemd-boot"
+ BOOT_LOADER_FOUND=1
+ fi
+ fi
+#
+#################################################################################
+#
# Test : BOOT-5121
# Description : Check for GRUB boot loader
Register --test-no BOOT-5121 --weight L --network NO --category security --description "Check for GRUB boot loader presence"