/[smeserver]/rpms/qpsmtpd/sme10/0002-added-ClamAV-version-to-the-X-Virus-Checked-header.patch
ViewVC logotype

Annotation of /rpms/qpsmtpd/sme10/0002-added-ClamAV-version-to-the-X-Virus-Checked-header.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Feb 9 20:56:14 2016 UTC (8 years, 9 months ago) by vip-ire
Branch: MAIN
CVS Tags: qpsmtpd-0_96-19_el7_sme, qpsmtpd-0_96-12_el7_sme, qpsmtpd-0_96-11_el7_sme, qpsmtpd-0_96-16_el7_sme, qpsmtpd-0_96-13_el7_sme, qpsmtpd-0_96-6_el7_sme, qpsmtpd-0_96-18_el7_sme, qpsmtpd-0_96-23_el7_sme, qpsmtpd-0_96-20_el7_sme, qpsmtpd-0_84-20_el7_sme, qpsmtpd-0_96-17_el7_sme, qpsmtpd-0_96-8_el7_sme, qpsmtpd-0_96-5_el7_sme, qpsmtpd-0_96-2_el7_sme, qpsmtpd-0_96-21_el7_sme, qpsmtpd-0_96-22_el7_sme, qpsmtpd-0_96-14_el7_sme, qpsmtpd-0_96-15_el7_sme, qpsmtpd-0_96-9_el7_sme, qpsmtpd-0_96-4_el7_sme, qpsmtpd-0_96-1_el7_sme, qpsmtpd-0_96-3_el7_sme, qpsmtpd-0_84-18_el7_sme, qpsmtpd-0_96-10_el7_sme, qpsmtpd-0_84-19_el7_sme, HEAD
Changes since 1.1: +0 -0 lines
Fix patches (remove the Id line)

1 stephdl 1.1 From 68ecedd1ac05ce6f26d6292b1a859020f5b6c62d Mon Sep 17 00:00:00 2001
2     From: Matt Simerson <matt@tnpi.net>
3     Date: Sun, 2 May 2010 01:48:05 -0400
4     Subject: added ClamAV version to the X-Virus-Checked header
5    
6     Signed-off-by: Robert <rspier@pobox.com>
7     ---
8     plugins/virus/clamdscan | 8 ++++++--
9     1 files changed, 6 insertions(+), 2 deletions(-)
10    
11     diff --git a/plugins/virus/clamdscan b/plugins/virus/clamdscan
12     index a7884e7..cf6c2a2 100644
13     --- a/plugins/virus/clamdscan
14     +++ b/plugins/virus/clamdscan
15     @@ -1,5 +1,4 @@
16     #!/usr/bin/perl -w
17     -# $Id$
18    
19     =head1 NAME
20    
21     @@ -111,6 +110,7 @@ use warnings;
22     sub register {
23     my ( $self, $qp, @args ) = @_;
24    
25     + $self->log(LOGERROR, "Bad parameters for the clamdscan plugin") if @_ % 2;
26     %{ $self->{"_clamd"} } = @args;
27    
28     # Set some sensible defaults
29     @@ -198,6 +198,9 @@ sub hook_data_post {
30     return DECLINED;
31     }
32    
33     + my @clamd_version = split(/\//, $clamd->version);
34     + $self->{"_clamd"}->{'version'} = $clamd_version[0] || 'ClamAV';
35     +
36     my ( $path, $found ) = eval { $clamd->scan_path( $filename ) };
37     if ($@) {
38     $self->log( LOGERROR, "Error scanning mail: $@" );
39     @@ -218,11 +221,12 @@ sub hook_data_post {
40     }
41     }
42     else {
43     + $transaction->header->add( 'X-Virus-Found', 'No' );
44     $self->log( LOGINFO, "ClamAV scan reports clean");
45     }
46    
47     $transaction->header->add( 'X-Virus-Checked',
48     - "Checked by ClamAV on " . $self->qp->config("me") );
49     + "Checked by $self->{'_clamd'}->{'version'} on " . $self->qp->config("me") );
50    
51     return (DECLINED);
52     }
53     --
54     1.7.2.2
55    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed