Cobbler has modules to manage multiple services, such as bind and dhcpd. When updating these configurations, cobbler wants to courteously restart/reload the services to activate the changes. SELinux policy should allow this - or at the least, can you suggest improvements for cobbler? Specifically, audit2allow says that a `cobbler sync` operation, with cobbler configured to manage dhcpd and named, requires: allow cobblerd_t systemd_systemctl_exec_t:file execute; allow cobblerd_t systemd_systemctl_exec_t:file { read open } allow cobblerd_t systemd_systemctl_exec_t:file execute_no_trans; allow cobblerd_t init_t:unix_stream_socket connectto; allow cobblerd_t systemd_unit_file_t:service start allow cobblerd_t systemd_unit_file_t:service status allow cobblerd_t named_unit_file_t:service start allow cobblerd_t named_unit_file_t:service status There are modules to manage others, but for now I'm limiting the report to those I've tested.
I have added the ability to restart dnsmasq, named, and dhcpcd Are there any others? What AVC caused you to add allow cobblerd_t systemd_unit_file_t:service start allow cobblerd_t systemd_unit_file_t:service status
5644e27aba3fdb51f1c27ac927df3979cfd4df6d has fixes in git.
(In reply to Daniel Walsh from comment #1) > I have added the ability to restart dnsmasq, named, and dhcpcd > > Are there any others? tftpd, though there were no related AVCs. At least not after applying the blanket service start/stop policy... There's also somewhat experimental support for storage backends using CouchDB, MongoDB, MySQL, and presumably MariaDB. Refer to http://www.cobblerd.org/manuals/2.4.0/5/18_-_Alternative_Storage_Backends.html > What AVC caused you to add > > allow cobblerd_t systemd_unit_file_t:service start # grep 1388293012.222:2215 /var/log/audit/audit.log type=USER_AVC msg=audit(1388293012.222:2215): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { start } for auid=-1 uid=0 gid=0 path="/usr/lib/systemd/system/dhcpd.service" scontext=system_u:system_r:cobblerd_t:s0 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?' > allow cobblerd_t systemd_unit_file_t:service status # grep 1388293092.972:2220 /var/log/audit/audit.log type=USER_AVC msg=audit(1388293092.972:2220): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { status } for auid=-1 uid=0 gid=0 path="/usr/lib/systemd/system/dhcpd.service" scontext=system_u:system_r:cobblerd_t:s0 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?' A policy targeted to dhcpd would remedy this as well, of course - I assumed that there wasn't a dedicated type for dhcpd as there was for named, but the reality is probably just sloppy custom policy application.
commit 6d3d5e6c2ce71116f43af030302cd1967b9576f6 Author: Miroslav Grepl <mgrepl> Date: Mon Jan 6 09:58:02 2014 +0100 Add support for /usr/lib/systemd/system/dhcpd.service
selinux-policy-3.12.1-116.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-116.fc20
Package selinux-policy-3.12.1-116.fc20: * should fix your issue, * was pushed to the Fedora 20 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-116.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-0806/selinux-policy-3.12.1-116.fc20 then log in and leave karma (feedback).
selinux-policy-3.12.1-116.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.