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:
authormarcus-cr <marcus-cr@users.noreply.github.com>2016-10-26 13:30:31 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-10-26 13:30:31 +0300
commitb95e44a5262c930b8e2b4476c375a08c188fefb2 (patch)
treef8aaca5859fd62c98c6197b6b96c9ccfe877c791
parent6c02d49de090d23409853ec63dda3b624714356c (diff)
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.
-rw-r--r--include/tests_boot_services12
1 files 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=<name>': password=<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=<name>': password=<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
#
#################################################################################