From 47cf86237bba51cd70b8dd64f72e049ef6b760a0 Mon Sep 17 00:00:00 2001 From: GoldenKiwi Date: Tue, 2 May 2023 17:57:35 +0200 Subject: [PATCH] fix: correct search in 5.4.5_default_timeout in apply mode (#178) fixes #116 --- bin/hardening/5.4.5_default_timeout.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/hardening/5.4.5_default_timeout.sh b/bin/hardening/5.4.5_default_timeout.sh index fa51e7b..5cfdd85 100755 --- a/bin/hardening/5.4.5_default_timeout.sh +++ b/bin/hardening/5.4.5_default_timeout.sh @@ -33,9 +33,9 @@ audit() { for file_in_dir in $(find "$FILE_SEARCHED" -type f); do does_pattern_exist_in_file "$file_in_dir" "$PATTERN" if [ "$FNRET" != 0 ]; then - debug "$PATTERN is not present in $FILE_SEARCHED/$file_in_dir" + debug "$PATTERN is not present in $file_in_dir" else - ok "$PATTERN is present in $FILE_SEARCHED/$file_in_dir" + ok "$PATTERN is present in $file_in_dir" SEARCH_RES=1 break fi @@ -45,7 +45,7 @@ audit() { if [ "$FNRET" != 0 ]; then debug "$PATTERN is not present in $FILE_SEARCHED" else - ok "$PATTERN is present in $FILES_TO_SEARCH" + ok "$PATTERN is present in $FILE_SEARCHED" SEARCH_RES=1 fi fi @@ -64,11 +64,11 @@ apply() { debug "$FILE_SEARCHED is a directory" # shellcheck disable=2044 for file_in_dir in $(find "$FILE_SEARCHED" -type f); do - does_pattern_exist_in_file "$FILE_SEARCHED/$file_in_dir" "$PATTERN" + does_pattern_exist_in_file "$file_in_dir" "$PATTERN" if [ "$FNRET" != 0 ]; then - debug "$PATTERN is not present in $FILE_SEARCHED/$file_in_dir" + debug "$PATTERN is not present in $file_in_dir" else - ok "$PATTERN is present in $FILE_SEARCHED/$file_in_dir" + ok "$PATTERN is present in $file_in_dir" SEARCH_RES=1 break fi @@ -78,7 +78,7 @@ apply() { if [ "$FNRET" != 0 ]; then debug "$PATTERN is not present in $FILE_SEARCHED" else - ok "$PATTERN is present in $FILES_TO_SEARCH" + ok "$PATTERN is present in $FILE_SEARCHED" SEARCH_RES=1 fi fi