policy patch
Subsystems (2)
file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)
I remove the above from domains/admin.te because it's granted to privhome by macros/user_macros.te and sysadm_t has the privhome attribute.
checkpolicy_t should not be creating lnk_file, sock_file, or fifo_file objects of type policy_config_t, and if there are sock_file or fifo_file objects of type policy_src_t then it should not be reading them.
system_crond_t should not be trying to access device nodes of types that are for files.
I still don't think that dmesg_t is appropriate for running dmesg from the administrator shell.
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/admin.te renamed from usr/src/se/policy/domains/admin.te +0 -1
@@ -31,4 +31,3 @@ # Add/remove user home directories file_type_auto_trans(sysadm_t, home_root_t, user_home_dir_t, dir) -file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)
domains/program/checkpolicy.te renamed from usr/src/se/policy/domains/program/checkpolicy.te +2 -2
@@ -23,7 +23,7 @@ # able to create and modify binary policy files allow checkpolicy_t policy_config_t:dir rw_dir_perms; -allow checkpolicy_t policy_config_t:notdevfile_class_set create_file_perms; +allow checkpolicy_t policy_config_t:file create_file_perms; ########################### # constrain what checkpolicy can use as source files
@@ -31,7 +31,7 @@ # only allow read of policy source files allow checkpolicy_t policy_src_t:dir r_dir_perms; -allow checkpolicy_t policy_src_t:notdevfile_class_set r_file_perms; +allow checkpolicy_t policy_src_t:{ file lnk_file } r_file_perms; # allow test policies to be created in src directories file_type_auto_trans(checkpolicy_t, policy_src_t, policy_config_t, file)
domains/program/crond.te renamed from usr/src/se/policy/domains/program/crond.te +3 -2
@@ -61,7 +61,7 @@ allow crond_t cron_spool_t:file r_file_perms; # Read /etc/security/default_contexts. -r_dir_file( crond_t, default_context_t) +r_dir_file(crond_t, default_context_t) allow crond_t etc_t:file { getattr read }; allow crond_t etc_t:lnk_file read;
@@ -147,7 +147,8 @@ ') # Stat any file and search any directory for find. -allow system_crond_t file_type:file_class_set getattr; +allow system_crond_t file_type:notdevfile_class_set getattr; +allow system_crond_t device_type:{ chr_file blk_file } getattr; allow system_crond_t file_type:dir { read search getattr }; # Create temporary files.
domains/program/dmesg.te renamed from usr/src/se/policy/domains/program/dmesg.te +4 -1
@@ -9,7 +9,10 @@ # # dmesg_exec_t is the type of the dmesg executable. # -daemon_base_domain(dmesg) +# while sysadm_t has the sys_admin capability there is no point in using +# dmesg_t when run from sysadm_t, so we use nosysadm. +# +daemon_base_domain(dmesg, , `nosysadm') # # Rules used for dmesg
Quoted 9 lines · Russell Coker
file_type_auto_trans(sysadm_t, user_home_dir_t, user_home_t)I remove the above from domains/admin.te because it's granted to privhome by macros/user_macros.te and
sysadm_thas the privhome attribute.
checkpolicy_tshould not be creatinglnk_file,sock_file, orfifo_fileobjects of typepolicy_config_t, and if there aresock_fileorfifo_fileobjects of typepolicy_src_tthen it should not be reading them.
Quoted 5 lines
system_crond_tshould not be trying to access device nodes of types that are for files.I still don't think that
dmesg_tis appropriate for running dmesg from the administrator shell.
Thanks, merged.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.