*** SweepViruses.pm.def Thu Jul  1 10:40:35 2004
--- SweepViruses.pm     Sat Jul  3 13:18:49 2004
***************
*** 305,314 ****
      DisinfectOptions    => '--disinfect',
      ScanOptions         => '',
      InitParser          => \&InitBitdefenderParser,
      ProcessOutput       => \&ProcessBitdefenderOutput,
!     SupportScanning     => $S_BETA,
!     SupportDisinfect    => $S_BETA,
    },
    "drweb"   => {
      Name              => 'DrWeb',
      Lock                => 'drweb.lock',
--- 305,314 ----
      DisinfectOptions    => '--disinfect',
      ScanOptions         => '',
      InitParser          => \&InitBitdefenderParser,
      ProcessOutput       => \&ProcessBitdefenderOutput,
!     SupportScanning     => $S_SUPPORTED,
!     SupportDisinfect    => $S_SUPPORTED,
    },
    "drweb"   => {
      Name              => 'DrWeb',
      Lock                => 'drweb.lock',
***************
*** 350,358 ****
      ScanOptions         => '',
      InitParser          => \&InitAvgParser,
      ProcessOutput       => \&ProcessAvgOutput,
      SupportScanning     => $S_SUPPORTED,
!     SupportDisinfect    => $S_SUPPORTED,
    },
    "vexira"   => {
      Name                => 'Vexira',
      Lock                => 'VexiraBusy.lock',
--- 350,358 ----
      ScanOptions         => '',
      InitParser          => \&InitAvgParser,
      ProcessOutput       => \&ProcessAvgOutput,
      SupportScanning     => $S_SUPPORTED,
!     SupportDisinfect    => $S_NONE,
    },
    "vexira"   => {
      Name                => 'Vexira',
      Lock                => 'VexiraBusy.lock',
***************
*** 938,948 ****
        or MailScanner::Log::DieLog("Can't open directory %s for scanning, %s",
                                    "$dirname/$childname", $!);

      # Scan all the files in the subdirectory
      while($filename = $child->read()) {
        next unless -f "$dirname/$childname/$filename"; # Only check files
!       $results = $Clam->scan("$dirname/$childname/$filename", Mail::ClamAV::CL_ARCHIVE());
        unless ($results) {
          print "ERROR:: $results" . ":: $dirname/$childname/$filename\n";
          next;
        }
--- 938,966 ----
        or MailScanner::Log::DieLog("Can't open directory %s for scanning, %s",
                                    "$dirname/$childname", $!);

      # Scan all the files in the subdirectory
+       # check to see if rar is available. If it is we don't want to
+       # have clamav check for password protected since that has already
+       # been done and will be reported correctly
+       # if we are not allowing password protected archives and do not have rar
+       # then have clamav check for password protected archives but it will
+       # be reported as a virus (at least it will block passworded rar files)
+       my $unrar = `which unrar`;
+       chomp($unrar);
+       my $haverar = 0;
+       #MailScanner::Log::InfoLog("*************Check Rar Results : %s\n",$unrar);
+       if ($unrar !~ /no unrar in/i && $unrar ne ""){
+               $haverar = 1;
+       }
      while($filename = $child->read()) {
        next unless -f "$dirname/$childname/$filename"; # Only check files
!         if(MailScanner::Config::Value('allowpasszips') || $haverar){
!               $results = $Clam->scan("$dirname/$childname/$filename", Mail::ClamAV::CL_ARCHIVE()|Mail::ClamAV::CL_OLE2());
!         }else{
!            $results = $Clam->scan("$dirname/$childname/$filename", Mail::ClamAV::CL_ARCHIVE()|Mail::ClamAV::CL_ENCRYPTED()|Mail::ClamAV::CL_OLE2());
!         }
! #      $results = $Clam->scan("$dirname/$childname/$filename", Mail::ClamAV::CL_ARCHIVE());
        unless ($results) {
          print "ERROR:: $results" . ":: $dirname/$childname/$filename\n";
          next;
        }
