Fedora Account System
Red Hat Associate
Red Hat Customer
Created attachment 994785 [details] patch against el6 branch to make init script source /etc/sysconfig/clamd if present Description of problem: The clamd init script doesn't try to source the /etc/sysconfig/clamd file, which means that it is difficult to do things like run clamd in a cgroup. If the clamd init script attempted to source that file, running clamd in a cgroup would be as simple as creating /etc/sysconfig/clamd with the contents: CGROUP_DAEMON="cpu,cpuacct:/clamav" (assuming that such a group existed). See https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/Starting_a_Process.html#Starting_a_Service for more information about how this use case is supposed to work. As things stand today, getting equivalent functionality requires hacks like sysadmins modifying their local init scripts. This is a duplicate of #756854, but I'd like to revisit the issue since I have an actual use case that is broken and provide a simple, safe patch that won't affect stability (assuming I got it right ;-) ). Version-Release number of selected component (if applicable): 0.98.6-1.el6 How reproducible: 100% Steps to Reproduce: As root: cat >> /etc/sysconfig/clamd <<EOF export CLAMD_TEST_ENV_VAR=test EOF service clamd restart strings /proc/$(pgrep clamd)/environ | grep CLAMD_TEST_ENV_VAR Actual results: Stopping Clam AntiVirus Daemon: [ OK ] Starting Clam AntiVirus Daemon: [ OK ] <nothing> Expected results: Stopping Clam AntiVirus Daemon: [ OK ] Starting Clam AntiVirus Daemon: [ OK ] CLAMD_TEST_ENV_VAR=test Additional info: Patch attached.
clamav-0.98.6-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/clamav-0.98.6-2.el6
clamav-0.98.6-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/clamav-0.98.6-2.el5
Package clamav-0.98.6-2.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing clamav-0.98.6-2.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-5761/clamav-0.98.6-2.el6 then log in and leave karma (feedback).
clamav-0.98.6-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
clamav-0.98.6-2.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.