Dear all, Hi. This is imacat from Taiwan. I'm running clamav-milter ClamAV 0.88.5 on my Debian GNU/Linux 3.1r3 Kernel 2.6.16.14.
I have disabled LogFile by commented it out in clamd.conf (I'm using Syslog). But my console are always filled-up with strange error messages like this: /var/spool/virusmails/061021/k9KGfp2J003979.Worm.Stration.JF: Invalid argument /var/spool/virusmails/061021/k9KGj35k003994.Worm.Stration.JF: Invalid argument After some debugging, I found that it appears whenever clamav-milter encounters a virus. Futhermore, I found that at clamav-milter/clamav-milter.c, line 4217, there is such thing: ====================== if(ret < 0) { /* fall back if sendfile fails, which shouldn't happen */ perror(newfile); close(fout); ====================== I tried to comment out that "perror(newfile)", and the strange error messsage is gone. I guess this is to record an error when sendfile() is not available. However, since on Linux 2.6, the current Linux kernel, sendfile() is not available, and sendfile() is only for Linux, is it really necessary to log that error message? It only pollutes the console, and we are not able to solve it even in the future (the Linux kernel group removed sendfile() on purpose). I'm attaching a simple patch to disable it. Hope this helps. Please tell me if there is any problem. Thank you. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r clamav-0.88.5.orig/clamav-milter/clamav-milter.c clamav-0.88.5/clamav-milter/clamav-milter.c - --- clamav-0.88.5.orig/clamav-milter/clamav-milter.c 2006-04-30 03:14:28.000000000 +0800 +++ clamav-0.88.5/clamav-milter/clamav-milter.c 2006-10-21 02:38:57.000000000 +0800 @@ -4213,8 +4213,6 @@ ret = sendfile(fout, fin, &offset, statb.st_size); close(fin); if(ret < 0) { - - /* fall back if sendfile fails, which shouldn't happen */ - - perror(newfile); close(fout); unlink(newfile); -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFORgsi9gubzC5S1wRAqq5AKCZu9xMmdQUSDF2GxmHaxdfaboErgCfXku+ Rv4X2iEJCF0jjj9xLgz2BHk= =ku8/ -----END PGP SIGNATURE----- -- Best regards, imacat ^_*' <[EMAIL PROTECTED]> PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt <<Woman's Voice>> News: http://www.wov.idv.tw/ Tavern IMACAT's: http://www.imacat.idv.tw/ TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
pgp86iMprZvVb.pgp
Description: PGP signature
_______________________________________________ http://lurker.clamav.net/list/clamav-devel.html