mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-04-08 17:06:34 +02:00
Fix a bug when use does_pattern_exist_in_file function in 8.1.21.
This commit is contained in:
parent
c0a480b6af
commit
08247701d3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user