Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 305961 - app-antivirus/clamav-0.95.3: logfix() function doesn't work in clamd initscript
Summary: app-antivirus/clamav-0.95.3: logfix() function doesn't work in clamd initscript
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-19 22:04 UTC by haarp
Modified: 2012-08-11 13:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for init script (pastefile,556 bytes, patch)
2010-04-18 09:21 UTC, haarp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description haarp 2010-02-19 22:04:32 UTC
I'm using the clamd initscript to only start freshclam. It includes the logfix() function which should fix the owner/perms on the logfile /var/log/clamav/freshclam.log. It doesn't do anything for me though.
The file stays root:root (because the supplied logrotate script does it this way). I traced the problem to this if-statement:

if [ -n "${logfile}" -a -n "${clamav_user}" ]; then

the init script doesn't descend into the statement, even though $logfile and $clamav_user are set and non-empty. Simply commenting it out makes the whole thing work for me.
Alternatively to the logfix() function, one could also modify the logrotate script to create files already owned by $clamav_user.
Comment 1 haarp 2010-02-19 22:08:55 UTC
I forgot the reason:
The if-statement needs to check for $freshclam_user and not $clamav_user
Comment 2 martin holzer 2010-04-17 18:32:56 UTC
app-antivirus/clamav-0.96 is stable now
Comment 3 haarp 2010-04-17 18:41:08 UTC
Same bug in 0.96
Comment 4 haarp 2010-04-18 09:21:54 UTC
Created attachment 228243 [details, diff]
Patch for init script

Uhm, hello? Any dev there? This is a 10-second fix :)
Here's a patch so you don't even have to think :)
Comment 5 Eray Aslan gentoo-dev 2012-08-11 13:20:55 UTC
Should be fixed in clamav-0.97.5-r1.