[Bug 799623] Re: Incorrect generated logrotate file
Martin Pitt
martin.pitt at ubuntu.com
Wed Feb 12 15:11:08 UTC 2014
Raring is EOL, and it's probably not worth any more SRUing this to
quantal either.
** Changed in: clamav (Ubuntu Raring)
Status: In Progress => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/799623
Title:
Incorrect generated logrotate file
Status in “clamav” package in Ubuntu:
In Progress
Status in “clamav” source package in Precise:
In Progress
Status in “clamav” source package in Quantal:
In Progress
Status in “clamav” source package in Raring:
Won't Fix
Status in ALT Linux:
Invalid
Bug description:
SRU justification :
Without this fix, installation scripts can generate invalid configuration files
(i.e. logrotate.d/clamav-damemon)
Impact :
Invalid configuration files
Fix :
Make the parsing algorithm a bit more discriminative
Test Case :
1) install clamav & clamav-daemon
$ sudo apt-get -y install clamav clamav-daemon
2) Add the following line before the first LogFile statement
LogFileMaxSize 0
3) Deinstall without purging the config file
apt-get -y remove clamav clamav-daemon clamav-base clamav-freshclam libclamav6
4) Re-install clamav & clamav-daemon & keep the existing config file
apt-get -y install clamav clamav-daemon clamav-base clamav-freshclam libclamav6
The clamav-daemon file should look like this (which is wrong) :
0 {
rotate 12
weekly
compress
delaycompress
create 640 clamav adm
postrotate
/etc/init.d/clamav-daemon reload-log > /dev/null
endscript
}
The correct format of the file should be :
/var/log/clamav/clamav.log {
rotate 12
weekly
compress
delaycompress
create 640 clamav adm
postrotate
/etc/init.d/clamav-daemon reload-log > /dev/null
endscript
}
Regression :
None expected, the values returned are still valid.
Original description of the problem :
Binary package hint: clamav-daemon
Version: 0.96.5+dfsg-1ubuntu1.10.04.2
Sometimes the logrotate conf file (/etc/logrotate.d/clamav-daemon) is
incorrectly generated, with a '0' instead of
'/var/log/clamav/clamav.log'. See the attached file for a example of
bad configuration.
I suspect the root cause is in the clamav-daemon.postinst script. In
the 'configure' case the logrotate conf file could be generated and I
feel the variable 'LogFile' is with a bad value thus printing like
"0" in the conf file.
Cheers,
Javier
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/799623/+subscriptions
More information about the Ubuntu-sponsors
mailing list