[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, test, updated. 0143548027e1a238da3e4268024f0836ef5740a4

Stephen Gran steve at lobefin.net
Thu Sep 4 12:14:19 UTC 2008


The following commit has been merged in the test branch:
commit 48d21102b33465794ee11cb00c465aedba534ec5
Author: Stephen Gran <steve at lobefin.net>
Date:   Thu Sep 4 13:02:42 2008 +0100

    Handle all the new options in clamd.conf
    Signed-off-by: Stephen Gran <steve at lobefin.net>

diff --git a/debian/changelog b/debian/changelog
index b2fd36e..3c15570 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,12 @@
 clamav (0.94.dfsg-1) unstable; urgency=low
 
   * New upstream version (closes: #497662, #497773)
+    - lots of new options for clamd.conf
   * No longer supports --unzip option, so typo is gone (closes: #496276)
   * Translations:
     - sv (thanks Martin Bagge <brother at bsnet.se>) (closes: #491760)
 
- -- Stephen Gran <sgran at debian.org>  Thu, 04 Sep 2008 12:35:23 +0100
+ -- Stephen Gran <sgran at debian.org>  Thu, 04 Sep 2008 13:02:20 +0100
 
 clamav (0.93.3.dfsg-1) unstable; urgency=low
 
diff --git a/debian/clamav-base.postinst.in b/debian/clamav-base.postinst.in
index b47d23b..db2ced6 100644
--- a/debian/clamav-base.postinst.in
+++ b/debian/clamav-base.postinst.in
@@ -235,7 +235,11 @@ case "$1" in
     [ -z "$MaxFileSize" ] && MaxFileSize=25M
     [ -z "$MaxRecursion" ] && MaxRecursion=10
     [ -z "$MaxFiles" ] && MaxFiles=10000
-
+    [ -z "$ExcludePUA" ] && ExcludePUA=
+    [ -z "$IncludePUA" ] && IncludePUA=
+    [ -z "$ScanPartialMessages" ] && ScanPartialMessages=false
+    [ -z "$HeuristicScanPrecedence" ] && HeuristicScanPrecedence=false
+    [ -z "$StructuredDataDetection" ] && StructuredDataDetection=false
 
     cat >> $DEBCONFFILE << EOF
 User $user
@@ -277,8 +281,34 @@ PhishingRestrictedScan $PhishingRestrictedScan
 PhishingAlwaysBlockSSLMismatch $PhishingAlwaysBlockSSLMismatch
 PhishingAlwaysBlockCloak $PhishingAlwaysBlockCloak
 DetectPUA $DetectPUA
+ScanPartialMessages $ScanPartialMessages
+HeuristicScanPrecedence $HeuristicScanPrecedence
+StructuredDataDetection $StructuredDataDetection
+EOF
+
+    if is_true "$StructuredDataDetection"; then
+      [ -z "$StructuredMinCreditCardCount" ] || StructuredMinCreditCardCount=3
+      [ -z "$StructuredMinSSNCount" ] || StructuredMinSSNCount=3
+      [ -z "$StructuredSSNFormatNormal" ] || StructuredSSNFormatNormal=true
+      [ -z "$StructuredSSNFormatStripped" ] || StructuredSSNFormatStripped=false
+      cat >> $DEBCONFFILE << EOF
+StructuredMinCreditCardCount $StructuredMinCreditCardCount
+StructuredMinSSNCount $StructuredMinSSNCount
+StructuredSSNFormatNormal $StructuredSSNFormatNormal
+StructuredSSNFormatStripped $StructuredSSNFormatStripped
 EOF
+    fi
 
+    if [ -n "$IncludePUA" ]; then
+      for i in $IncludePUA; do
+        echo "IncludePUA $i" >> $DEBCONFFILE
+      done
+    fi
+    if [ -n "$ExcludePUA" ]; then
+      for e in $ExcludePUA; do
+        echo "ExcludePUA $i" >> $DEBCONFFILE
+      done
+    fi
     if [ -n "$logfile" ]; then
       echo "LogFile $logfile" >> $DEBCONFFILE
       echo "LogTime $logtime" >> $DEBCONFFILE
diff --git a/debian/common_functions b/debian/common_functions
index 4df1163..3fcbcfc 100644
--- a/debian/common_functions
+++ b/debian/common_functions
@@ -81,6 +81,22 @@ slurp_config()
         else
           continue
         fi
+      elif [ "$variable" = 'IncludePUA' ]; then
+        if [ -z "$IncludePUA" ]; then
+          for i in `grep ^$variable $CLAMAVCONF | awk '{print $2}'`; do
+            value="$i $value"
+          done
+        else
+          continue
+        fi
+      elif [ "$variable" = 'ExcludePUA' ]; then
+        if [ -z "$ExcludePUA" ]; then
+          for i in `grep ^$variable $CLAMAVCONF | awk '{print $2}'`; do
+            value="$i $value"
+          done
+        else
+          continue
+        fi
       elif [ "$variable" = 'VirusEvent' ] || [ "$variable" = 'OnUpdateExecute' ] || [ "$variable" = 'OnErrorExecute' ]; then
         value=`grep ^$variable $CLAMAVCONF | head -n1 | sed -e s/$variable\ //`
       else

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list