mirror of https://github.com/CISOfy/lynis.git
[BOOT-5139] support for roles
This commit is contained in:
parent
b95e44a526
commit
9203b01f88
|
@ -362,17 +362,20 @@
|
||||||
Display --indent 2 --text "- Checking presence LILO" --result "${STATUS_OK}" --color GREEN
|
Display --indent 2 --text "- Checking presence LILO" --result "${STATUS_OK}" --color GREEN
|
||||||
LogText "Checking password option LILO"
|
LogText "Checking password option LILO"
|
||||||
FIND=$(${EGREPBINARY} 'password[[:space:]]?=' ${LILOCONFFILE} | ${GREPBINARY} -v "^#")
|
FIND=$(${EGREPBINARY} 'password[[:space:]]?=' ${LILOCONFFILE} | ${GREPBINARY} -v "^#")
|
||||||
if [ -z "${FIND}" && $MACHINE_ROLE = "server" || "workstation" ]; then
|
if [ -z "${FIND}" ]; then
|
||||||
Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color RED
|
if [ "${MACHINE_ROLE}" = "server" -o "${MACHINE_ROLE}" = "workstation" ]; then
|
||||||
LogText "Result: no password set for LILO. Bootloader is unprotected to dropping to single user mode or unauthorized access to devices/data."
|
Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color RED
|
||||||
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>"
|
LogText "Result: no password set for LILO. Bootloader is unprotected to dropping to single user mode or unauthorized access to devices/data."
|
||||||
ReportWarning ${TEST_NO} "No password set on LILO bootloader"
|
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>"
|
||||||
AddHP 0 2
|
ReportWarning ${TEST_NO} "No password set on LILO bootloader"
|
||||||
elif [ -z "${FIND}" && $MACHINE_ROLE = "personal"]; then
|
AddHP 0 2
|
||||||
|
elif [ "${MACHINE_ROLE}" = "personal"]; then
|
||||||
Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color yellow
|
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."
|
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>"
|
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
|
AddHP 1 2
|
||||||
|
else
|
||||||
|
LogText "Result: no password set for LILO, with unknown machine role"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
Display --indent 4 --text "- Password option presence " --result "${STATUS_OK}" --color GREEN
|
Display --indent 4 --text "- Password option presence " --result "${STATUS_OK}" --color GREEN
|
||||||
|
|
Loading…
Reference in New Issue