Bug 832786
Summary: | cupsd rename access to /etc/cpus/printers.conf triggers an error | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michael S. Tsirkin <mst> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | dominick.grift, dwalsh, mgrepl |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 00:29:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Michael S. Tsirkin
2012-06-17 11:44:51 UTC
Could you add AVC msg which you are getting. We are able to fix it using file name transition but I am interested in AVC msg. I think this is it: [root@robin qemu]# grep cups /var/log/audit/audit.log |grep -i printers.conf type=AVC msg=audit(1339933136.188:458): avc: denied { rename } for pid=12849 comm="cupsd" name="printers.conf" dev="sda6" ino=8006 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:cupsd_etc_t:s0 tclass=file type=AVC msg=audit(1339947477.700:83): avc: denied { rename } for pid=1154 comm="cupsd" name="printers.conf" dev="sda6" ino=8006 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:cupsd_etc_t:s0 tclass=file type=AVC msg=audit(1339948622.572:70): avc: denied { rename } for pid=1123 comm="cupsd" name="printers.conf" dev="sda6" ino=8006 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:cupsd_etc_t:s0 tclass=file type=AVC msg=audit(1339960110.625:86): avc: denied { write } for pid=1190 comm="cupsd" name="printers.conf.O" dev="sda6" ino=8006 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:cupsd_etc_t:s0 tclass=file type=AVC msg=audit(1339960110.625:87): avc: denied { unlink } for pid=1190 comm="cupsd" name="printers.conf.O" dev="sda6" ino=8006 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:cupsd_etc_t:s0 tclass=file I updated the polocy as selinux troubleshooter suggested using audit2allow -M mypol and semodule -i mypol.pp, so the error is masked now. If you need me to reproduce with selinux troubleshooter, pls tell me how to unmask it again. Looks like you have a mislabeled files. restorecon -R -v /etc/cups Should fix the labels. I see where we did not have a proper transition rule on printers.conf.O Added transition rule for printers.conf.O Fixed in selinux-policy-3.10.0-132.fc17 If you modify printers again after fixing the labels, do they become mislabeled again? Way to test # restorecon -R -v /etc/cups Modify printers using kde # restorecon -R -v /etc/cups Second run should not fix any labels. neither one prints any errors Ok I added the transition rule, if you see printers.conf get mislabeled again, please reopen. Fixed in selinux-policy-3.10.0-132.fc17 selinux-policy-3.10.0-132.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-132.fc17 selinux-policy-3.10.0-132.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. selinux-policy-3.10.0-132.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |