[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [Bug 86090] kmail virus scan not working
From:       Andreas Gungl <a.gungl () gmx ! de>
Date:       2004-07-31 19:34:47
Message-ID: 20040731193447.32175.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=86090      
a.gungl gmx de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From a.gungl gmx de  2004-07-31 21:34 -------
CVS commit by gungl: 

fix Bug 86090 - kmail virus scan not working

mktemp didn't work that way in older versions which can be found
e.g. in Suse 8.2.
I also improved the status feedback for f-prot scans so that 
the tracking of the scan result is a little bit easier.

CCMAIL: 86090-done bugs kde org


  M +5 -1      kmail_antivir.sh   1.2
  M +5 -1      kmail_clamav.sh   1.2
  M +20 -4     kmail_fprot.sh   1.2
  M +5 -1      kmail_sav.sh   1.2


--- kdepim/kmail/avscripts/kmail_antivir.sh  #1.1:1.2
 @ -28,5 +28,9  @
 #    your version.
 #
-export TEMPFILE=`mktemp`
+TEMPFILE=`mktemp` 
+if [ $? ] ; then 
+    TEMPFILE=`mktemp /tmp/kmail.XXXXXX` 
+fi 
+export TEMPFILE
 cat > $TEMPFILE
 if antivir --scan-in-mbox $TEMPFILE | grep -q ALERT; then

--- kdepim/kmail/avscripts/kmail_clamav.sh  #1.1:1.2
 @ -28,5 +28,9  @
 #    your version.
 #
-export TEMPFILE=`mktemp`
+TEMPFILE=`mktemp` 
+if [ $? ] ; then 
+    TEMPFILE=`mktemp /tmp/kmail.XXXXXX` 
+fi 
+export TEMPFILE
 cat > $TEMPFILE
 if clamscan --stdout --no-summary --mbox $TEMPFILE | grep -q FOUND; then

--- kdepim/kmail/avscripts/kmail_fprot.sh  #1.1:1.2
 @ -28,11 +28,27  @
 #    your version.
 #
-export TEMPFILE=`mktemp`
+TEMPFILE=`mktemp` 
+if [ $? ] ; then 
+    TEMPFILE=`mktemp /tmp/kmail.XXXXXX` 
+fi 
+export TEMPFILE
 cat > $TEMPFILE
-if f-prot -archive 3 $TEMPFILE | grep -q "Infected: 1"; then
-echo "X-Virus-Flag: yes"
+f-prot -archive 3 $TEMPFILE
+if [ $RC -eq 0 ] ; then
+    echo "X-Virus-Flag: no"
 else
-echo "X-Virus-Flag: no"
+    case $RC in
+        1 ) DESC="no - Unrecoverable error" ;;
+        2 ) DESC="no - Selftest failed" ;;
+        3 ) DESC="yes - Virus-infected object found" ;;
+        4 ) DESC="no - Reserved" ;;
+        5 ) DESC="no - Abnormal termination" ;;
+        6 ) DESC="no - Virus was removed" ;;
+        7 ) DESC="no - Error, out of memory" ;;
+        8 ) DESC="yes - Something suspicious found" ;;
+    esac
+    echo "X-Virus-Flag: $DESC"
 fi
+
 cat $TEMPFILE
 rm $TEMPFILE

--- kdepim/kmail/avscripts/kmail_sav.sh  #1.1:1.2
 @ -28,5 +28,9  @
 #    your version.
 #
-export TEMPFILE=`mktemp`
+TEMPFILE=`mktemp` 
+if [ $? ] ; then 
+    TEMPFILE=`mktemp /tmp/kmail.XXXXXX` 
+fi 
+export TEMPFILE
 cat > $TEMPFILE
 if sweep -ss -mime $TEMPFILE | grep -q found; then
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic