From 08247701d3fd32e3fc7f10598472fabe2d332aa8 Mon Sep 17 00:00:00 2001 From: Samson-W Date: Sun, 21 Oct 2018 03:06:58 +0800 Subject: [PATCH] Fix a bug when use does_pattern_exist_in_file function in 8.1.21. --- .../8.1.21_record_Events_that_privileged_passwd_cmd_usage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/hardening/8.1.21_record_Events_that_privileged_passwd_cmd_usage.sh b/bin/hardening/8.1.21_record_Events_that_privileged_passwd_cmd_usage.sh index 7fe18c4..0565cff 100755 --- a/bin/hardening/8.1.21_record_Events_that_privileged_passwd_cmd_usage.sh +++ b/bin/hardening/8.1.21_record_Events_that_privileged_passwd_cmd_usage.sh @@ -30,7 +30,7 @@ audit () { for AUDIT_VALUE in $AUDIT_PARAMS; do debug "$AUDIT_VALUE should be in file $FILE" IFS=$d_IFS - does_pattern_exist_in_file $FILE $AUDIT_VALUE + does_pattern_exist_in_file $FILE "$AUDIT_VALUE" IFS=$c_IFS if [ $FNRET != 0 ]; then crit "$AUDIT_VALUE is not in file $FILE" @@ -46,7 +46,7 @@ apply () { IFS=$'\n' for AUDIT_VALUE in $AUDIT_PARAMS; do debug "$AUDIT_VALUE should be in file $FILE" - does_pattern_exist_in_file $FILE $AUDIT_VALUE + does_pattern_exist_in_file $FILE "$AUDIT_VALUE" if [ $FNRET != 0 ]; then warn "$AUDIT_VALUE is not in file $FILE, adding it" add_end_of_file $FILE $AUDIT_VALUE