glance has two daemons which run as the glance user - glance-registry and glance-api We surely need SELinux policy to constrain these two daemons (This is vague, I know - I'm just filing the bug to track that it needs looking into)
I just added policy to F15 for glance-api and glance-registry. I do have a concern about api using /tmp and creating a file which it later executes. The policy allows this but I would like to know why? Policy should show up in selinux-policy-3.10.0-23.fc16 I am sure there will be a decent amount of AVC's.
Thanks Dan! I'll try it out
Note, as of openstack-glance-2011.3-0.6.d4.fc16 we've switched to systemd Should have done this beforehand Dan, sorry!
No problem the policy should still work.
Okay, I've just tested selinux-policy-3.10.0-23.fc16.noarch out by following our howto here: https://fedoraproject.org/wiki/Getting_started_with_OpenStack_Nova The daemons are confined to the correct domains and I'm not seeing any AVC denials. (In reply to comment #1) > I do have a concern about api using /tmp and creating a file which it later > executes. The policy allows this but I would like to know why? I don't see anything obvious in strace at first glance, but I'll look into it further. Filed bug #735855 about it (In reply to comment #4) > No problem the policy should still work. There's probably initscripts policy you can now remove, though? There's no backwards compat concerns - the initscripts only existed in Fedora 16 for a week or so Thanks Dan!
My embarrassingly bad bad ... I was looking for denials in the wrong place :) On API startup, I think down to ffi stat-ing /selinux - see bug #735855: avc: denied { getattr } for pid=24385 comm="glance-api" name="/" dev=dm-1 ino=2 scontext=system_u:system_r:glance_api_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem Doing 'glance index', when the API connects to the registry: avc: denied { getattr } for pid=24385 comm="glance-api" name="/" dev=dm-1 ino=2 scontext=system_u:system_r:glance_api_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem Doing 'glance delete N', there are some registry denials caused by sqlite (see 'etilqs') creating tmp files: avc: denied { read write } for pid=25290 comm="glance-registry" name="tmp" dev=dm-1 ino=2752567 scontext=system_u:system_r:glance_registry_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir avc: denied { add_name } for pid=25290 comm="glance-registry" name="etilqs_LyEeZvDKk72iFs7" scontext=system_u:system_r:glance_registry_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir avc: denied { create } for pid=25290 comm="glance-registry" name="etilqs_LyEeZvDKk72iFs7" scontext=system_u:system_r:glance_registry_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file avc: denied { read write open } for pid=25290 comm="glance-registry" name="etilqs_LyEeZvDKk72iFs7" dev=dm-1 ino=2755020 scontext=system_u:system_r:glance_registry_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file avc: denied { remove_name } for pid=25290 comm="glance-registry" name="etilqs_LyEeZvDKk72iFs7" dev=dm-1 ino=2755020 scontext=system_u:system_r:glance_registry_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir avc: denied { unlink } for pid=25290 comm="glance-registry" name="etilqs_LyEeZvDKk72iFs7" dev=dm-1 ino=2755020 scontext=system_u:system_r:glance_registry_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file
I am adding fixes.
Fixed in selinux-policy-3.10.0-25.fc16
I only see selinux-policy-3.10.0-24.fc16 and it doesn't contain any glance related changes compared to selinux-policy-3.10.0-23.fc16 Am I missing something?
selinux-policy-3.10.0-25.fc16 is now available. yum update selinux-policy --enablerepo=updates-testing
This message is a reminder that Fedora 16 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '16'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 16's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 16 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.