diff options
Diffstat (limited to 'include/tests_file_integrity')
-rw-r--r-- | include/tests_file_integrity | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/tests_file_integrity b/include/tests_file_integrity index 2eb2b00f..b100e38a 100644 --- a/include/tests_file_integrity +++ b/include/tests_file_integrity @@ -70,7 +70,7 @@ # # Test : FINT-4315 # Description : Check AIDE configuration file - if [ ! "${AIDEBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi + if [ ! -z "${AIDEBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no FINT-4315 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check AIDE configuration file" if [ ${SKIPTEST} -eq 0 ]; then AIDE_CONFIG_LOCS="/etc /etc/aide /usr/local/etc" @@ -223,7 +223,7 @@ if [ ${SKIPTEST} -eq 0 ]; then # LFD configuration parameters ENABLED=$(${GREPBINARY} "^LF_DAEMON = \"1\"" ${CSF_CONFIG}) - if [ ! "${ENABLED}" = "" ]; then + if [ ! -z "${ENABLED}" ]; then LogText "Result: lfd service is configured to run" Display --indent 6 --text "- Configuration status" --result "${STATUS_ENABLED}" --color GREEN else @@ -231,7 +231,7 @@ Display --indent 6 --text "- Configuration status" --result "${STATUS_DISABLED}" --color YELLOW fi ENABLED=$(${GREPBINARY} "^LF_DIRWATCH =" ${CSF_CONFIG} | ${AWKBINARY} '{ print $3 }' | ${SEDBINARY} 's/\"//g') - if [ ! "${ENABLED}" = "0" -a ! "${ENABLED}" = "" ]; then + if [ ! "${ENABLED}" = "0" -a ! -z "${ENABLED}" ]; then LogText "Result: lfd directory watching is enabled (value: ${ENABLED})" Display --indent 6 --text "- Temporary directory watches" --result "${STATUS_ENABLED}" --color GREEN else @@ -239,7 +239,7 @@ Display --indent 6 --text "- Temporary directory watches" --result "${STATUS_DISABLED}" --color YELLOW fi ENABLED=$(${GREPBINARY} "^LF_DIRWATCH_FILE =" ${CSF_CONFIG} | ${AWKBINARY} '{ print $3 }' | ${SEDBINARY} 's/\"//g') - if [ ! "${ENABLED}" = "0" -a ! "${ENABLED}" = "" ]; then + if [ ! "${ENABLED}" = "0" -a ! -z "${ENABLED}" ]; then Display --indent 6 --text "- Directory/File watches" --result "${STATUS_ENABLED}" --color GREEN else Display --indent 6 --text "- Directory/File watches" --result "${STATUS_DISABLED}" --color YELLOW @@ -270,7 +270,7 @@ # # Test : FINT-4402 (was FINT-4316) # Description : Check if AIDE is configured to use SHA256 or SHA512 checksums - if [ ! "${AIDEBINARY}" = "" -a ! "${AIDECONFIG}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi + if [ ! "${AIDEBINARY}" = "" -a ! -z "${AIDECONFIG}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no FINT-4402 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "AIDE configuration: Checksums (SHA256 or SHA512)" if [ ${SKIPTEST} -eq 0 ]; then FIND=$(${GREPBINARY} -v "^#" ${AIDECONFIG} | ${EGREPBINARY} "= .*(sha256|sha512)") |