Description of problem: New chrony version (currently packaged only in rawhide) adds support for several reference clocks which are not allowed by current policy. Version-Release number of selected component (if applicable): selinux-policy-3.6.32-69.fc12.noarch Additional info: # PPS refclock: allow chronyd_t device_t:chr_file { read write open }; # SOCK refclock: allow chronyd_t chronyd_var_lib_t:sock_file { create unlink }; allow chronyd_t self:capability dac_override; # SHM refclock: allow chronyd_t self:shm { unix_read read write unix_write associate }; allow chronyd_t tmpfs_t:file { read write }; The DAC override seems to be required to allow creating/removing the unix socket in /var/lib/chrony before root privileges are dropped. Also, it would be nice to have /etc/chrony.keys marked with a different context to not allow other processes read it. /etc/chrony\.keys -- gen_context(system_u:object_r:chronyd_keys_t,s0) type chronyd_keys_t; files_type(chronyd_keys_t) allow chronyd_t chronyd_keys_t:file { read getattr open }; The policy is always in permissive mode, is this still needed?
One more thing. To allow SHM be used with gpsd, these seem to be required, depending on the order in which the services were started: allow chronyd_t gpsd_t:shm { unix_read unix_write }; allow gpsd_t chronyd_t:shm { unix_read unix_write };
(In reply to comment #0) > Description of problem: > New chrony version (currently packaged only in rawhide) adds support for > several reference clocks which are not allowed by current policy. > > Version-Release number of selected component (if applicable): > selinux-policy-3.6.32-69.fc12.noarch > > Additional info: > > # PPS refclock: > allow chronyd_t device_t:chr_file { read write open }; > device_t is bad. What device is used by chrony?
/dev/pps* crw-rw----. root root system_u:object_r:device_t:s0 /dev/pps0
Actually for the gpsd SHM this might be required: allow chronyd_t gpsd_t:shm { unix_read read write unix_write associate }; allow chronyd_t gpsd_tmpfs_t:file { read write }; Also, new chrony has support for memory locking and real-time scheduler setting: allow chronyd_t self:capability { sys_resource ipc_lock }; allow chronyd_t self:process setrlimit;
/dev/pps.* -c gen_context(system_u:object_r:clock_device_t,s0) Everything else looks fine. I have updated policy in Rawhide. You can take the permissive domain away.
Added to selinux-policy-3.6.32-81.fc12
selinux-policy-3.6.32-82.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-82.fc12
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1492
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.