Package: clamav-daemon Version: 0.92.1~dfsg-1volatile1 Severity: normal Tags: patch
If you're running clamd in supervised mode ("Foreground true") then the reload-log options of init.d/clamav-daemon don't work. When logrotate calls it nothing happens, so the daemon keeps writing to the old (and now rotated) log file. Here is a fix. This also fixes the status and reload-database commands. --- clamav-daemon.~1~ 2007-05-30 20:32:52.000000000 -0400 +++ clamav-daemon 2008-03-03 14:03:33.000000000 -0500 @@ -57,14 +57,15 @@ THEPIDFILE="`grep ^PidFile $CLAMAVCONF | awk '{print $2}'`" [ -n "$THEPIDFILE" ] || THEPIDFILE='/var/run/clamav/clamd.pid' +if [ -f "$THEPIDFILE" ]; then + CLAMDPID=`pidofproc -p $THEPIDFILE $DAEMON` + RUNNING=$? +else + CLAMDPID=`pidofproc $DAEMON` + RUNNING=$? +fi if [ -z "$RUN_SUPERVISED" ]; then - if [ -f "$THEPIDFILE" ]; then - PID=`pidofproc -p $THEPIDFILE $DAEMON` - RUNNING=$? - else - PID=`pidofproc $DAEMON` - RUNNING=$? - fi + PID=$CLAMDPID else [ -e "$SUPERVISORPIDFILE" ] && PID=`cat $SUPERVISORPIDFILE` fi @@ -141,16 +142,16 @@ reload-database) OPTIND=1 log_daemon_msg "Reloading database for $DESC" "$NAME" - if [ "$RUNNING" = 0 ] && [ -n "$PID" ]; then - kill -USR2 $PID + if [ "$RUNNING" = 0 ] && [ -n "$CLAMDPID" ]; then + kill -USR2 $CLAMDPID fi log_end_msg $? ;; reload-log) OPTIND=1 log_daemon_msg "Reloading log file for $DESC" "$NAME" - if [ "$RUNNING" = 0 ] && [ -n "$PID" ]; then - kill -HUP $PID + if [ "$RUNNING" = 0 ] && [ -n "$CLAMDPID" ]; then + kill -HUP $CLAMDPID fi log_end_msg $? ;; -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (870, 'stable'), (700, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-6-686-bigmem Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages clamav-daemon depends on: ii clamav-base 0.92.1~dfsg-1volatile1 base package for clamav, an anti-v ii clamav-freshclam 0.92.1~dfsg-1volatile1 downloads clamav virus databases f ii libc6 2.3.6.ds1-13etch5 GNU C Library: Shared libraries ii libclamav3 0.92.1~dfsg-1volatile1 virus scanner library ii lsb-base 3.1-23.2etch1 Linux Standard Base 3.1 init scrip ii ucf 2.0020 Update Configuration File: preserv clamav-daemon recommends no packages. -- no debconf information -- Roderick Schertler [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]