Inzwischen ist fast genau ein Jahr her, dass ich meinem Squid das Viren scannen beigebracht habe. Damals hatte ich allerdings als Virenscanner ’nur‘ den Clamav eingebunden. Die Tage hatte ich eine Nachfrage dazu wie man den Sophos auch einbindet. In der Firma haben wir das schon eine ganze Weile (s.den Kommentar 5 2008-06-09). Also wurde es auch auf meinem Proxy langsam mal Zeit…:

# apt-get install build-essential bzip2
….
# wget -N http://ftp.st.ryukoku.ac.jp/pub/security/tool/sophie/sophie-3.06Beta.tar.bz2
# ls -l sophie-3.06Beta.tar.bz2
-rw-r–r– 1 root root 126443 18. Jul 2007 sophie-3.06Beta.tar.bz2
# wget -N http://ftp.st.ryukoku.ac.jp/pub/security/tool/sophie/sophie-3.06Beta.tar.bz2.md5
# md5sum -c sophie-3.06Beta.tar.bz2.md5
sophie-3.06Beta.tar.bz2: OK
# tar xjpf sophie-3.06Beta.tar.bz2
# cd sophie-3.06Beta
# cd /usr/local/lib/
# ln -s libsavi.so.3 libsavi.so
# cd –
/tmp/sophie-3.06Beta
# ./configure

config.status: creating Makefile
config.status: creating sophie.cfg
config.status: creating config.h
# make

# cp -p sophie /usr/bin/
# cp -p etc/sophie.cfg /etc/
# cp -p etc/sophie.savi /etc/
# cp -p etc/sophie.cfg /etc/sophie.cfg.org
# ps fauxwwwOp | grep -v „\bgrep\b“ | grep -v „\bps\b“ | grep havp
havp 11951 0.0 9.8 56924 50832 ? Ss 18:21 0:00 /usr/sbin/havp
havp 11952 0.0 9.8 56924 50808 ? S 18:21 0:00 \_ /usr/sbin/havp
havp 11953 0.0 9.8 56924 50568 ? S 18:21 0:00 | \_ /usr/sbin/havp

# id havp
uid=128(havp) gid=129(havp) Gruppen=129(havp)
# vi /etc/sophie.cfg
# diff -Natur etc/sophie.cfg /etc/sophie.cfg

— etc/sophie.cfg 2003-03-06 13:00:00.000000000 +0100
+++ /etc/sophie.cfg 2009-01-10 18:29:44.000000000 +0100
@@ -38,12 +39,14 @@
# User to run Sopncyuhiencyuncyu as
#
# Change requires: RESTART
-user: mail
+#user: mail
+user: havp
# Group to run Sopncyuhiencyuncyu as
#
# Change requires: RESTART
-group: mail
+#group: mail
+group: havp
# Scanning timeout (in seconds)
# If Sopncyuhiencyuncyu child doesn’t finish scanning a file within this timeframe,

# cp -p contrib/sophie.init /etc/init.d/sophie
# chmod a+x /etc/init.d/sophie
# vi /etc/init.d/sophie
# diff -Natur contrib/sophie.init /etc/init.d/sophie

— contrib/sophie.init 2003-02-27 13:00:00.000000000 +0100
+++ /etc/init.d/sophie 2009-01-10 17:57:59.000000000 +0100
@@ -8,26 +8,27 @@
# pidfile: /var/run/sophie.pid
#
# Source function library.
-. /etc/init.d/functions
+test -r /etc/init.d/functions && . /etc/init.d/functions
[ -f /usr/bin/sophie ] || exit 0
start() {
# Start daemons.
echo -n $“Starting Sopncyuhiencyuncyu SAVI daemon: “
– daemon /usr/bin/sophie -D
+ #daemon /usr/bin/sophie -D
+ /usr/bin/sophie -D
RETVAL=$?
echo
– [ $RETVAL = 0 ] && touch /var/lock/subsys/sophie
+ [ $RETVAL = 0 ] && touch /var/lock/sophie
}
stop() {
# Stop daemons.
echo -n $“Shutting down Sopncyuhiencyuncyu SAVI daemon: “
– killproc sophie
+ killall sophie
RETVAL=$?
echo
– [ $RETVAL = 0 ] && rm -f /var/lock/subsys/sophie
+ [ $RETVAL = 0 ] && rm -f /var/lock/sophie
}
restart() {

# /etc/init.d/sophie start
Starting Sopncyuhiencyuncyu SAVI daemon: /usr/bin/sophie placed in the background
# ps fauxwwwOp | grep -v „\bgrep\b“ | grep -v „\bps\b“ | grep sophie
root 12294 0.0 0.4 3712 2172 ? Ss 18:25 0:00 /usr/bin/sophie -D
havp 12295 20.7 4.9 28840 25512 ? S 18:25 0:04 \_ /usr/bin/sophie -D
# ls -l /var/run/sophie
srwxrwx— 1 havp havp 0 10. Jan 18:25 /var/run/sophie=
# vi /etc/havp/havp.config


#####
##### Sophos Scanner (Sopncyuhiencyuncyu)
#####
#ENABLESOPHIE false
ENABLESOPHIE true
# Path to sophie socket
#
# Default:
# SOPHIESOCKET /var/run/sophie
SOPHIESOCKET /var/run/sophie

# /etc/init.d/havp restart
Restarting havp: Starting HAVP Version: 0.89
havp.
# tail -n11 /var/log/havp/error.log

10/01/2009 18:37:57 === Starting HAVP Version: 0.89
10/01/2009 18:37:57 Running as user: havp, group: havp
10/01/2009 18:37:57 Use parent proxy: localhost:3128
10/01/2009 18:37:57 — Initializing ClamAV Library Scanner
10/01/2009 18:37:57 ClamAV: Using database directory: /var/lib/clamav/
10/01/2009 18:38:07 ClamAV: Loaded 404916 signatures (engine 0.94.2)
10/01/2009 18:38:07 ClamAV Library Scanner passed EICAR virus test (Eicar-Test-Signature)
10/01/2009 18:38:07 — Initializing Sopncyuhiencyuncyu Socket Scanner
10/01/2009 18:38:07 Sopncyuhiencyuncyu Socket Scanner passed EICAR virus test (EICAR-AV-Test)
10/01/2009 18:38:07 — All scanners initialized
10/01/2009 18:38:07 Process ID: 13698

# sweep -v | more

SWEEP Virenerkennungsdienstprogramm
Copyright (c) 1989-2008 Sophos Plc, www.sophos.com
Systemzeit 19:10:45, Systemdatum 10. Januar 2009
Produktversion : 4.34.0
Engine Version : 2.79.0
Version Virendaten : 4.34
Benutzeroberfläche Version : 2.07.214
Plattform : Linux/Intel
Veröffentlicht : 06. Oktober 2008
Gesamtzahl der Viren (mit IDEs) : 514707
Informationen zu weiteren Datendateien:
Datendateiname : /usr/local/sav/access-a.ide
Datendateityp : IDE
Datendateidatum : 10. Januar 2009, 19:08:34
Datendateistatus : Geladen

#

Ach ja. – Ganz zum Schluss stellte ich dann noch fest, dass es wohl schon eine neuere Sophos-Version gibt, als die verwendete… :oops:
Also Sorry noch mal. Irgendwann die Tage werde ich mich wohl noch mal darum kümmern müssen.