diff --git a/bin/hardening/13.13_check_user_homedir_ownership.sh b/bin/hardening/13.13_check_user_homedir_ownership.sh index f3be6b1..2812b8b 100755 --- a/bin/hardening/13.13_check_user_homedir_ownership.sh +++ b/bin/hardening/13.13_check_user_homedir_ownership.sh @@ -33,7 +33,7 @@ audit () { if [ "$OWNER" != "$USER" ]; then EXCEP_FOUND=0 for excep in $EXCEPTIONS; do - if [ "$DIR:$USER:$OWNER" == "$excep" ]; then + if [ "$DIR:$USER:$OWNER" = "$excep" ]; then ok "The home directory ($DIR) of user $USER is owned by $OWNER but is part of exceptions ($DIR:$USER:$OWNER)." EXCEP_FOUND=1 break diff --git a/bin/hardening/8.2.5_syslog-ng_remote_host.sh b/bin/hardening/8.2.5_syslog-ng_remote_host.sh index 9ef0cfa..3f7747c 100755 --- a/bin/hardening/8.2.5_syslog-ng_remote_host.sh +++ b/bin/hardening/8.2.5_syslog-ng_remote_host.sh @@ -22,12 +22,12 @@ audit () { FILES="$SYSLOG_BASEDIR/syslog-ng.conf $(find $SYSLOG_BASEDIR/conf.d/)" for FILE in $FILES; do does_pattern_exist_in_file_multiline "$FILE" "$PATTERN" - if [ $FNRET == 0 ]; then + if [ $FNRET = 0 ]; then FOUND=1 fi done - if [ $FOUND == 1 ]; then + if [ $FOUND = 1 ]; then ok "$PATTERN is present in $FILES" else crit "$PATTERN is not present in $FILES" @@ -40,11 +40,11 @@ apply () { FILES="$SYSLOG_BASEDIR/syslog-ng.conf $(find $SYSLOG_BASEDIR/conf.d/ -type f)" for FILE in $FILES; do does_pattern_exist_in_file_multiline "$FILE" "$PATTERN" - if [ $FNRET == 0 ]; then + if [ $FNRET = 0 ]; then FOUND=1 fi done - if [ $FOUND == 1 ]; then + if [ $FOUND = 1 ]; then ok "$PATTERN is present in $FILES" else crit "$PATTERN is not present in $FILES, please set a remote host to send your logs" diff --git a/bin/hardening/8.3.2_tripwire_cron.sh b/bin/hardening/8.3.2_tripwire_cron.sh index 190d8fd..ba3476b 100755 --- a/bin/hardening/8.3.2_tripwire_cron.sh +++ b/bin/hardening/8.3.2_tripwire_cron.sh @@ -25,11 +25,11 @@ audit () { FOUND=0 for FILE in $FILES; do does_pattern_exist_in_file "$FILE" "$PATTERN" - if [ "$FNRET" == 0 ]; then + if [ "$FNRET" = 0 ]; then FOUND=1 fi done - if [ $FOUND == 1 ]; then + if [ $FOUND = 1 ]; then ok "$PATTERN is present in $FILES" else crit "$PATTERN is not present in $FILES" diff --git a/bin/hardening/99.4_net_fw_default_policy_drop.sh b/bin/hardening/99.4_net_fw_default_policy_drop.sh index 104be24..1f2c184 100755 --- a/bin/hardening/99.4_net_fw_default_policy_drop.sh +++ b/bin/hardening/99.4_net_fw_default_policy_drop.sh @@ -36,7 +36,7 @@ audit () { # previous line will capture actual policy if [[ $ipt =~ $regex ]]; then actual_policy=${BASH_REMATCH[1]} - if [[ $actual_policy == "$FW_POLICY" ]]; then + if [[ $actual_policy = "$FW_POLICY" ]]; then ok "Policy correctly set to $FW_POLICY for chain $chain" else crit "Policy set to $actual_policy for chain $chain, should be ${FW_POLICY}."