Incorrect generated logrotate file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| ALT Linux |
Invalid
|
Unknown
|
||
| clamav (Ubuntu) |
Low
|
Louis Bouchard | ||
| Precise |
Low
|
Louis Bouchard | ||
| Quantal |
Low
|
Louis Bouchard | ||
| Raring |
Low
|
Louis Bouchard | ||
| Saucy |
Low
|
Louis Bouchard |
Bug Description
SRU justification :
Without this fix, installation scripts can generate invalid configuration files
(i.e. logrotate.
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/
endscript
}
The correct format of the file should be :
/var/log/
rotate 12
weekly
compress
delaycompress
create 640 clamav adm
postrotate
/etc/
endscript
}
Regression :
None expected, the values returned are still valid.
Original description of the problem :
Binary package hint: clamav-daemon
Version: 0.96.5+
Sometimes the logrotate conf file (/etc/logrotate
I suspect the root cause is in the clamav-
Cheers,
Javier
Related branches
- Martin Pitt: Approve on 2014-02-12
-
Diff: 28 lines (+9/-1)2 files modifieddebian/changelog (+8/-0)
debian/common_functions (+1/-1)
Chuck Short (zulcss) wrote : | #2 |
Changed in clamav (Ubuntu): | |
importance: | Undecided → Low |
status: | New → Confirmed |
Imre Gergely (cemc) wrote : | #3 |
I've looked a little bit at the .postinst script but I can't see how this could happen, except when there is something wrong in the config file itself. Like 'LogFile 0' in it or something :)
@Javier, do you by any chance have the clamd.conf file ? Or can you reproduce this problem in any consistent way?
Changed in altlinux: | |
status: | Unknown → Invalid |
fatbob (cronmonkey) wrote : | #4 |
Hi there
Javier is a developer on a linux control system / distribution called zentyal. It was myself and another user who spotted this on our installations.
I've attatched my clamd.conf. If you need any further info please ask
Details on the zentyal forum here.
http://
Jorge Salamero Sanz (bencer) wrote : | #5 |
This bug appears because of the way we get conf parameters values, for LogFile:
grep '^LogFile' /etc/clamav/
LogFileMaxSize 0
LogFile /var/log/
LogFileUnlock false
LogFileMaxSize 0
The fix:
diff clamav-
175c175
< value=`grep "^$variable[
---
> value=`grep ^$variable $CLAMAVCONF | head -n1 | awk '{print $2}'`
Test:
< + grep ^LogFile /etc/clamav/
< + value=0
< + [ -z 0 ]
< + [ 0 != LogFile ]
< + export LogFile=0
---
> + awk {print $2}
> + grep ^LogFile[[:space:]] /etc/clamav/
> + value=/
> + [ -z /var/log/
> + [ /var/log/
> + export LogFile=
Launchpad Janitor (janitor) wrote : | #6 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in clamav (Ubuntu Precise): | |
status: | New → Confirmed |
Changed in clamav (Ubuntu Quantal): | |
status: | New → Confirmed |
Changed in clamav (Ubuntu Raring): | |
status: | New → Confirmed |
Changed in clamav (Ubuntu): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in clamav (Ubuntu Precise): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in clamav (Ubuntu Raring): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in clamav (Ubuntu Quantal): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Changed in clamav (Ubuntu Precise): | |
importance: | Undecided → Low |
Changed in clamav (Ubuntu Quantal): | |
importance: | Undecided → Low |
Changed in clamav (Ubuntu Raring): | |
importance: | Undecided → Low |
Changed in clamav (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in clamav (Ubuntu Precise): | |
status: | Confirmed → In Progress |
Changed in clamav (Ubuntu Quantal): | |
status: | Confirmed → In Progress |
Changed in clamav (Ubuntu Raring): | |
status: | Confirmed → In Progress |
Louis Bouchard (louis) wrote : | #10 |
debdiff for saucy
Martin Pitt (pitti) wrote : | #11 |
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 |
Martin Pitt (pitti) wrote : | #12 |
Trusty branch uploaded.
Changed in clamav (Ubuntu): | |
status: | In Progress → Fix Committed |
Martin Pitt (pitti) wrote : | #13 |
I uploaded the precise branch with the same change that I did to the trusty one:
- value=`grep ^$variable $CLAMAVCONF | head -n1 | awk '{print $2}'`
+ value=`grep "^$variable[
Unsubscribing sponsors now.
Changed in clamav (Ubuntu Quantal): | |
status: | In Progress → Won't Fix |
Launchpad Janitor (janitor) wrote : | #14 |
This bug was fixed in the package clamav - 0.98.1+
---------------
clamav (0.98.1+
* debian/
- Fix slurp_config() that is sometimes not discriminative
enough which leads to invalid configuration files (LP: #799623)
-- Louis Bouchard <email address hidden> Mon, 10 Feb 2014 17:56:52 +0100
Changed in clamav (Ubuntu): | |
status: | Fix Committed → Fix Released |
Hello Javier, or anyone else affected,
Accepted clamav into precise-proposed. The package will build now and be available at http://
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in clamav (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
tags: | added: verification-needed |
Changed in clamav (Ubuntu Saucy): | |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
importance: | Undecided → Low |
status: | New → In Progress |
Brian Murray (brian-murray) wrote : | #16 |
Hello Javier, or anyone else affected,
Accepted clamav into saucy-proposed. The package will build now and be available at http://
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in clamav (Ubuntu Saucy): | |
status: | In Progress → Fix Committed |
Scott Kitterman (kitterman) wrote : | #17 |
I've also fixed this in Debian Unstable as well.
Louis Bouchard (louis) wrote : | #18 |
@Bryan : thanks I'll do my best to get it tested this week, I was off sick all of last week.
@scott: thanks, I meant to do it but it somewhat dropped of
Louis Bouchard (louis) wrote : | #19 |
Verified for both Saucy & Precise. Work as expected.
tags: |
added: verification-done removed: verification-needed |
Launchpad Janitor (janitor) wrote : | #20 |
This bug was fixed in the package clamav - 0.97.8+
---------------
clamav (0.97.8+
* debian/
- Fix slurp_config() that is sometimes not discriminative
enough which leads to invalid configuration files (LP: #799623)
-- Louis Bouchard <email address hidden> Mon, 10 Feb 2014 17:54:42 +0100
Changed in clamav (Ubuntu Precise): | |
status: | Fix Committed → Fix Released |
The verification of the Stable Release Update for clamav has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.
Launchpad Janitor (janitor) wrote : | #22 |
This bug was fixed in the package clamav - 0.97.8+
---------------
clamav (0.97.8+
* debian/
- Fix slurp_config() that is sometimes not discriminative
enough which leads to invalid configuration files (LP: #799623)
-- Louis Bouchard <email address hidden> Thu, 27 Feb 2014 17:05:17 -0600
Changed in clamav (Ubuntu Saucy): | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #23 |
This bug was fixed in the package clamav - 0.98.1+
---------------
clamav (0.98.1+
* Rebuild as a security update (LP: #1296856)
-- Marc Deslauriers <email address hidden> Thu, 27 Mar 2014 08:54:58 -0400
Changed in clamav (Ubuntu Quantal): | |
status: | Won't Fix → Fix Released |
Thanks for the bug report, Ill see if I can get this fixed.
Regards
chuck