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_services12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services
index 299c04c6..bf8f0af1 100644
--- a/include/tests_boot_services
+++ b/include/tests_boot_services
@@ -66,7 +66,7 @@
case ${OS} in
"Linux")
if [ -f /proc/1/cmdline ]; then
- FILE=`cat /proc/1/cmdline | grep "^/" | awk '{ print $1 }'`
+ FILE=`awk '/^\// { print $1 }' /proc/1/cmdline`
if [ ! "${FILE}" = "" ]; then
if [ -L ${FILE} ]; then
ShowSymlinkPath ${FILE}
@@ -235,10 +235,10 @@
logtext "Found file ${GRUBCONFFILE}, proceeding with tests."
FileIsReadable ${GRUBCONFFILE}
if [ ${CANREAD} -eq 1 ]; then
- FIND=`cat ${GRUBCONFFILE} | grep 'password --md5' | grep -v '^#'`
- FIND2=`cat ${GRUBCONFFILE} | grep 'password --encrypted' | grep -v '^#'`
- FIND3=`cat ${GRUBCONFFILE} | grep 'set superusers' | grep -v '^#'`
- FIND4=`cat ${GRUBCONFFILE} | grep 'password_pbkdf2' | grep -v '^#'`
+ FIND=`grep 'password --md5' ${GRUBCONFFILE} | grep -v '^#'`
+ FIND2=`grep 'password --encrypted' ${GRUBCONFFILE} | grep -v '^#'`
+ FIND3=`grep 'set superusers' ${GRUBCONFFILE} | grep -v '^#'`
+ FIND4=`grep 'password_pbkdf2' ${GRUBCONFFILE} | grep -v '^#'`
# GRUB1: MD5 or SHA1
if [ ! "${FIND}" = "" -o ! "${FIND2}" = "" ]; then
FOUND=1
@@ -313,7 +313,7 @@
BOOT_LOADER_FOUND=1
Display --indent 2 --text "- Checking presence LILO" --result "OK" --color GREEN
logtext "Checking password option LILO"
- FIND=`cat ${LILOCONFFILE} | ${EGREPBINARY} 'password[[:space:]]?=' | grep -v "^#"`
+ FIND=`${EGREPBINARY} 'password[[:space:]]?=' ${LILOCONFFILE} | grep -v "^#"`
if [ "${FIND}" = "" ]; then
Display --indent 4 --text "- Password option presence " --result "WARNING" --color RED
logtext "Result: no password set for LILO. Bootloader is unprotected to"