Dash:
[t2-trunk.git] / package / mail / anomy-mailtools / clamav.patch
blob4ada08a320ebb15e8fcee870aea2cc347ebfe382
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../anomy-mailtools/clamav.patch
5 # Copyright (C) 2004 - 2006 The T2 SDE Project
6 # Copyright (C) 1998 - 2004 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 --- ./contrib/check_for_virus.orig 2001-08-13 12:10:10.000000000 -0400
19 +++ ./contrib/check_for_virus 2003-08-25 10:17:26.000000000 -0400
20 @@ -49,6 +49,23 @@
21 logger "virus check for $1: ok"
22 echo "CLEAN : OK"
24 +# ClamAV (Clam AntiVirus)
25 +elif test -x /usr/bin/clamdscan; then
26 + STATUS=
27 + /usr/bin/clamdscan --quiet "$1"
28 + RETURNCODE=$?
29 + if test $RETURNCODE -eq 1; then
30 + STATUS="virus found"
31 + RET=3
32 + fi
33 + if test -n "$STATUS"; then
34 + INFO=`/usr/bin/clamdscan --disable-summary --stdout "$1"|cut -f2 -d' '`
35 + logger "virus check for $1: VIRUS FOUND!! - $INFO"
36 + echo "VIRUS : $INFO"
37 + else
38 + logger "virus check for $1: ok"
39 + echo "CLEAN : OK"
40 + fi
41 # AVP (Kaspersky Anti-Virus for Linux)
42 elif test -x /usr/bin/kavscanner; then
43 STATUS=