/halt and /.autofsck
Subsystems (2)
The attached patch makes initrc_t use type etc_runtime_t for /halt and /.autofsck flag files.
It also removes the cyrus lines which don't belong in initrc.te and which will be implemented properly when we solve the postgresql problem.
Signature · 4 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page
domains/program/initrc.te renamed from usr/src/se/policy/domains/program/initrc.te +3 -13
@@ -90,10 +90,6 @@ ') allow initrc_t self:passwd rootok; -ifdef(`cyrus.te', ` -allow initrc_su_t cyrus_var_lib_t:dir { search }; -') - # read /lib/modules allow initrc_t modules_object_t:dir { search read };
@@ -209,10 +205,6 @@ allow initrc_t rhgb_t:unix_stream_socket { read write }; ') -# Unlink /halt. -allow initrc_t root_t:dir { search write remove_name }; -allow initrc_t root_t:file { unlink write }; - ifdef(`gpm.te', `allow initrc_t gpmctl_t:sock_file setattr;') allow initrc_t var_spool_t:file rw_file_perms;
@@ -227,6 +219,9 @@ ifdef(`sound.te', `allow initrc_t sound_file_t:file { setattr write };') ifdef(`rpm.te', ` +# for /halt /.autofsck and other flag files +file_type_auto_trans(initrc_t, root_t, etc_runtime_t, file) + # Access /var/lib/rpm. allow initrc_t var_lib_rpm_t:dir rw_dir_perms; allow initrc_t var_lib_rpm_t:file create_file_perms;
@@ -241,11 +236,6 @@ allow initrc_t printconf_t:dir r_dir_perms; allow initrc_t printconf_t:file r_file_perms;') -# Create and delete /.autofsck -allow initrc_t root_t:dir { search write add_name }; -allow initrc_t root_t:file { create setattr unlink getattr }; -allow initrc_t default_t:file { unlink getattr }; - # Read user home directories. allow initrc_t { home_root_t home_type }:dir r_dir_perms; allow initrc_t home_type:file r_file_perms;
file_contexts/program/rpm.fc renamed from usr/src/se/policy/file_contexts/program/rpm.fc +3 -0
@@ -13,6 +13,7 @@ /usr/lib(64)?/rpm/rpmk -- system_u:object_r:bin_t /usr/lib(64)?/rpm/rpmv -- system_u:object_r:bin_t /var/log/rpmpkgs.* -- system_u:object_r:rpm_log_t +/var/log/yum.log -- system_u:object_r:rpm_log_t /usr/share/system-config-network(/netconfig)?/[^/]+.py -- system_u:object_r:bin_t /etc/sysconfig/networking/profiles/.*/resolv.conf -- system_u:object_r:net_conf_t /etc/sysconfig/network-scripts/.*resolv.conf -- system_u:object_r:net_conf_t
@@ -56,3 +55,5 @@ /sbin/yast2 -- system_u:object_r:rpm_exec_t /var/lib/YaST2(/.*)? system_u:object_r:rpm_var_lib_t +/halt -- system_u:object_r:etc_runtime_t +/\.autofsck -- system_u:object_r:etc_runtime_t