From b95e44a5262c930b8e2b4476c375a08c188fefb2 Mon Sep 17 00:00:00 2001 From: marcus-cr Date: Wed, 26 Oct 2016 06:30:31 -0400 Subject: Changed LILO testing depending on server/workstation or personal roles (#302) Test will display result in red if no boot loader password set and if server or workstation role was set. Cosmetic change for log text, one instead of two log texts. Test displays result in yellow if using personal machine role as suggestion for typical users. --- include/tests_boot_services | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/tests_boot_services b/include/tests_boot_services index 1da0653b..ec8454ad 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -362,13 +362,18 @@ Display --indent 2 --text "- Checking presence LILO" --result "${STATUS_OK}" --color GREEN LogText "Checking password option LILO" FIND=$(${EGREPBINARY} 'password[[:space:]]?=' ${LILOCONFFILE} | ${GREPBINARY} -v "^#") - if [ -z "${FIND}" ]; then + if [ -z "${FIND}" && $MACHINE_ROLE = "server" || "workstation" ]; then Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color RED - LogText "Result: no password set for LILO. Bootloader is unprotected to" - LogText "dropping to single user mode or unauthorized access to devices/data." + LogText "Result: no password set for LILO. Bootloader is unprotected to dropping to single user mode or unauthorized access to devices/data." ReportSuggestion ${TEST_NO} "Add a password to LILO, by adding a line to the lilo.conf file, above the first line saying 'image=': password=" ReportWarning ${TEST_NO} "No password set on LILO bootloader" AddHP 0 2 + elif [ -z "${FIND}" && $MACHINE_ROLE = "personal"]; then + Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color yellow + LogText "Result: no password set for LILO. Bootloader is unprotected to dropping to single user mode or unauthorized access to devices/data." + ReportSuggestion ${TEST_NO} "No password set on LILO bootloader. Add a password to LILO, by adding a line to the lilo.conf file, above the first line saying 'image=': password=" + AddHP 0 2 + fi else Display --indent 4 --text "- Password option presence " --result "${STATUS_OK}" --color GREEN LogText "Result: LILO password option set" @@ -379,7 +384,6 @@ fi else LogText "Result: LILO configuration file not found" - fi fi # ################################################################################# -- cgit v1.2.3