Description of problem: when kde changes printer configuration, cupsd renames /etc/cups/printers.conf Tis triggers a warning message in selinux alert browser. Version-Release number of selected component (if applicable): 3.10.0-130.fc17 How reproducible: Steps to Reproduce: 1. start kde and run printer settings 2. enter root password 3. click ok Actual results: selinux altert appears Expected results: no alert, printers.conf belongs to cups Additional info:
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.