View | Details | Raw Unified | Return to bug 233461 | Differences between
and this patch

Collapse All | Expand All

(-)files/patch-clamav-unofficial-sigs.sh (-1 / +19 lines)
Lines 1-4 Link Here
1
--- clamav-unofficial-sigs.sh.orig	2018-03-27 15:43:43 UTC
1
--- clamav-unofficial-sigs.sh.orig	2018-11-24 16:35:07 UTC
2
+++ clamav-unofficial-sigs.sh
2
+++ clamav-unofficial-sigs.sh
3
@@ -1290,7 +1290,7 @@ minimum_required_config_version="72"
3
@@ -1290,7 +1290,7 @@ minimum_required_config_version="72"
4
 minimum_yara_clamav_version="0.99"
4
 minimum_yara_clamav_version="0.99"
Lines 18-23 Link Here
18
 
18
 
19
 # Solaris which function returns garbage when the program is not found
19
 # Solaris which function returns garbage when the program is not found
20
 # only define the new which function if running under Solaris
20
 # only define the new which function if running under Solaris
21
@@ -1455,7 +1457,7 @@ for config_file in "${config_files[@]}" 
22
       # Delete both trailing and leading whitespace
23
       # Delete all trailing whitespace
24
       # Delete all empty lines
25
-      clean_config="$(command sed -e '/^#.*/d' -e 's/[[:space:]]#.*//' -e 's/#[[:space:]].*//' -e 's/^[ \t]*//;s/[ \t]*$//' -e '/^\s*$/d' "$config_file")"
26
+      clean_config="$(command sed -e '/^#.*/d' -e 's/[[:space:]]#.*//' -e 's/#[[:space:]].*//' -e 's/^[[:blank:]]*//;s/[[:blank:]]*$//' -e '/^[[:space:]]*$/d' "$config_file")"
27
     fi
28
 
29
     #fix eval of |
30
@@ -1470,7 +1472,7 @@ for config_file in "${config_files[@]}" 
31
     fi
32
 
33
     # Check there is an = for every set of "" optional whitespace \s* between = and "
34
-    config_check_vars="$(echo "$clean_config" | $grep_bin -c '=\s*\"' )"
35
+    config_check_vars="$(echo "$clean_config" | $grep_bin -c '=[[:space:]]*\"' )"
36
 
37
     if [ $(( ${#config_check} / 2 )) -ne "$config_check_vars" ] ; then
38
       xshok_pretty_echo_and_log "ERROR: Your configuration has errors, every = requires a pair of \"\"" "="
21
@@ -2131,20 +2133,11 @@ if [ "$sanesecurity_enabled" == "yes" ] 
39
@@ -2131,20 +2133,11 @@ if [ "$sanesecurity_enabled" == "yes" ] 
22
         xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "="
40
         xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "="
23
         xshok_pretty_echo_and_log "Checking for Sanesecurity updates..."
41
         xshok_pretty_echo_and_log "Checking for Sanesecurity updates..."

Return to bug 233461