Description of problem: When run as part of a cron job, AIDE generates AVC denials when attempting to write to /var/log/aide/aide.log. Version-Release number of selected component (if applicable): aide-0.15.1-5.fc19.x86_64 selinux-policy-3.12.1-63.fc19.noarch selinux-policy-targeted-3.12.1-63.fc19.noarch How reproducible: Every time "aide" is updated as a cron job in /etc/cron.(hourly|daily|weekly|monthly). Steps to Reproduce: 1. Create a file in /etc/cron.daily that executes "/usr/sbin/aide --update 2>&1" 2. Check /var/log/audit/audit.log for instances of AVC denials from aide 3. Check email from cron with AIDE report indicating that /var/log/aide/aide.txt cannot be written. Actual results: audit2why provides the following explanations: type=AVC msg=audit(1373873583.328:998): avc: denied { write } for pid=27218 comm="aide" name="aide.log" dev="dm-1" ino=55076 scontext=system_u:system_r:aide_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:aide_log_t:s0 tclass=file Was caused by: Missing type enforcement (TE) allow rule. You can use audit2allow to generate a loadable module to allow this access. type=AVC msg=audit(1373874830.911:999): avc: denied { sys_admin } for pid=27218 comm="aide" capability=21 scontext=system_u:system_r:aide_t:s0-s0:c0.c1023 tcontext=system_u:system_r:aide_t:s0-s0:c0.c1023 tclass=capability Was caused by: Missing type enforcement (TE) allow rule. You can use audit2allow to generate a loadable module to allow this access. Expected results: o No AVC denials o AIDE is able to write to /var/log/aide/aide.log Additional info: Issue is resolved by implementing the following policy change: module local 1.0; require { type aide_t; type aide_log_t; class capability sys_admin; class file write; } #============= aide_t ============== allow aide_t aide_log_t:file write; allow aide_t self:capability sys_admin;
Switching to selinux-policy for now. Changes might be needed in both aide and selinux-policy.
I have no problem allowing the write although I would like to know why it needs sys_admin, 6e47d17e32e671c1ef051dcb5fdfabb53a3526ca allows this in git.
selinux-policy-3.12.1-66.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-66.fc19
Package selinux-policy-3.12.1-66.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-66.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-13543/selinux-policy-3.12.1-66.fc19 then log in and leave karma (feedback).
selinux-policy-3.12.1-66.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.