Package: p3scan
Version: 2:2.3.2-5
Severity: important
Hi,
When upgrading p3scan, the /etc/p3scan/p3scan.mail link is silently
replaced with this :
# ls -l /etc/p3scan/p3scan.mail
lrwxrwxrwx 1 root root 79 May 27 00:23 /etc/p3scan/p3scan.mail ->
/home/rynge2/debian/p3scan/p3scan-2.3.2/debian/p3scan/etc/p3scan/p3scan-en.mail
wich, on my machine, is a danglink symlink... ;)
I believe the upstream Makefile is the culprit, but I don't know the
proper/Debian way of fixing this part of the bug.
I however tag this bug important because it breaks the configuration so that
next time a virus is detected, the template cannot be found, and in this very
case p3scan dies badly with the following error messages :
Jun 5 15:02:28 pern p3scan[8378]: ERR: Critical error opening file '', Program
aborted.
Jun 5 15:02:28 pern p3scan[8378]: ERR: Exiting now...
Jun 5 15:02:28 pern p3scan[8378]: ERR: Unable to free memory not previously
allocated: ø<84>Ò·ø<84>Ò·Ðå^K^HÐå^K^HÀ¨^A^P
Jun 5 15:02:28 pern p3scan[3906]: ERR: Attention: child with pid 8378 died
with abnormal termsignal (11)! This is probably a bug. Please report to the
author. numprocs is now 0
Jun 5 15:02:28 pern kernel: p3scan[8378]: segfault at 00000004 eip 0804dd92
esp bfdf59f0 error 4
Jun 5 15:05:27 pern p3scan[3906]: P3Scan terminates now
After some investigation, I believe the problem lies somewhere in the following
horrible construct (which seems to be used all over the code!) :
subjfd = open(config->virustemplate, O_RDONLY);
if (subjfd<0){
w_free(mail,"mail0");
if (p->extra) w_free(mailx,"mailx0");
context_uninit(p);
config->emergency=make_message("Critical error opening file '%s',
Program aborted.", p->vnmsg);
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program
aborted.", p->vnmsg);
/* should not reach here as we are dead */
}
p->vnmsg is used after calling context_uninit(p), which in turns does a
w_free(p).
So, something like this should fix it :
subjfd = open(config->virustemplate, O_RDONLY);
if (subjfd<0){
char *filename = strndup(p->vnmsg, strlen(p->vnmsg)+1);
w_free(mail,"mail0");
if (p->extra) w_free(mailx,"mailx0");
context_uninit(p);
config->emergency=make_message("Critical error opening file '%s',
Program aborted.", filename);
do_log(LOG_EMERG,"ERR: Critical error opening file '%s', Program
aborted.", filename);
/* should not reach here as we are dead */
}
Regards,
Tom
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.23.11-pern (PREEMPT)
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages p3scan depends on:
ii adduser 3.107 add and remove users and groups
ii libc6 2.7-10 GNU C Library: Shared libraries
ii libpcre3 7.4-1+lenny1 Perl 5 Compatible Regular Expressi
ii libssl0.9.8 0.9.8g-10+lenny1 SSL shared libraries
p3scan recommends no packages.
-- no debconf information
--
Thomas Parmelan
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]