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:
authorMichael Boelen <michael.boelen@cisofy.com>2019-07-16 14:20:30 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-16 14:20:30 +0300
commitfa8bad20db100d95cf089b0b2d897c339327215c (patch)
tree2f80f2e015d26056cd741137dc4fdd069a6c4c5d /include/tests_homedirs
parent2777caf6d218aeb40c2ebd8af2564be8201eeff1 (diff)
Use -n instead of ! -z
Diffstat (limited to 'include/tests_homedirs')
-rw-r--r--include/tests_homedirs4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/tests_homedirs b/include/tests_homedirs
index 9570816b..e51cf3d9 100644
--- a/include/tests_homedirs
+++ b/include/tests_homedirs
@@ -114,7 +114,7 @@
# Description : Check for suspicious shell history files
Register --test-no HOME-9310 --weight L --network NO --category security --description "Checking for suspicious shell history files"
if [ ${SKIPTEST} -eq 0 ]; then
- if [ ! -z "${HOMEDIRS}" ]; then
+ if [ -n "${HOMEDIRS}" ]; then
if [ "${OS}" = "Solaris" ]; then
# Solaris doesn't support -maxdepth
FIND=$(${FINDBINARY} ${HOMEDIRS} -name ".*history" ! -type f -print)
@@ -152,7 +152,7 @@
# Notes : For performance reasons we combine the scanning of different files, so inode caching is used
# as much as possible for every find command
# Profile opt : ignore-home-dir (multiple lines allowed), ignores home directory
- if [ ! -z "${REPORTFILE}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
+ if [ -n "${REPORTFILE}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no HOME-9350 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Collecting information from home directories"
if [ ${SKIPTEST} -eq 0 ]; then
IGNORE_HOME_DIRS=$(${GREPBINARY} "^ignore-home-dir=" ${REPORTFILE} | ${AWKBINARY} -F= '{ print $2 }')