Hide Forgot
Description of problem: clamd.exim.service from exim-clamav package fails to start because it is blocked by selinux to access its log file (/var/log/clamd.exim). Version-Release number of selected component (if applicable): selinux-policy-3.10.0-81.2.fc17 How reproducible: Always Steps to Reproduce: 1. yum install exim-clamav 2. systemctl start clamd.exim Actual results: It fails to start. Expected results: It starts. Additional info: type=1400 audit(1328192703.986:7): avc: denied { open } for pid=906 comm="clamd" name="clamd.exim" dev="dm-0" ino=278405 scontext=system_u:system_r:clamd_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=file
Looks like the log file is mislabled? matchpathcon /var/log/clamd.exim /var/log/clamd.exim system_u:object_r:clamd_var_log_t:s0 restorecon /var/log/clamd.exim Will fix. any idea how this file got created originally?
It is created by "touch" in %post. I workarounded it by explicit restorecon call. Thanks.
Would be nice to have /var/log/clamd for example. Then we could add a label for this dir and the "restorecon" would not be needed.
There is an effort to unify this across all clamd enabled packages. I am not sure whether we will finish it for F17, but it is on our radar.