From 576e11b995920cc72f7ae69479de569664f85b50 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 11 Jul 2016 11:24:52 +0200 Subject: [BOOT-5122] Extended password check --- include/tests_boot_services | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/tests_boot_services b/include/tests_boot_services index 534a4a8e..08868155 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -270,12 +270,12 @@ FIND3=`grep 'set superusers' ${GRUBCONFFILE} | grep -v '^#'` FIND4=`grep 'password_pbkdf2' ${GRUBCONFFILE} | grep -v '^#'` FIND5=`grep 'grub.pbkdf2' ${GRUBCONFFILE} | grep -v '^#'` - # GRUB1: MD5 or SHA1 + # GRUB1: Password should be set (MD5 or SHA1) if [ ! "${FIND}" = "" -o ! "${FIND2}" = "" ]; then FOUND=1 - # GRUB2: Superusers and password should be defined - elif [ ! "${FIND3}" = "" -a ! "${FIND4}" = "" ]; then - FOUND=1 + # GRUB2: Superusers AND password should be defined + elif [ ! "${FIND3}" = "" ]; then + if [ ! -z "${FIND4}" -o ! -z "${FIND5}" ]; then FOUND=1; fi fi if [ ${FOUND} -eq 1 ]; then Display --indent 4 --text "- Checking for password protection" --result "${STATUS_OK}" --color GREEN -- cgit v1.2.3