Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito 960373
policy_module(selinux,1.0)
Chris PeBenito 960373
Chris PeBenito ee5772
########################################
Chris PeBenito b4cd15
#
Chris PeBenito ee5772
# Declarations
Chris PeBenito b4cd15
#
Chris PeBenito ee5772
Chris PeBenito ee5772
attribute can_write_binary_policy;
Chris PeBenito ee5772
attribute can_relabelto_binary_policy;
Chris PeBenito ee5772
Chris PeBenito ee5772
type checkpolicy_t, can_write_binary_policy;
Chris PeBenito ee5772
domain_make_domain(checkpolicy_t)
Chris PeBenito ee5772
role system_r types checkpolicy_t;
Chris PeBenito ee5772
Chris PeBenito ee5772
type checkpolicy_exec_t;
Chris PeBenito ee5772
domain_make_entrypoint_file(checkpolicy_t,checkpolicy_exec_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
#
Chris PeBenito ee5772
# default_context_t is the type applied to
Chris PeBenito ee5772
# /etc/selinux/*/contexts/*
Chris PeBenito ee5772
#
Chris PeBenito ee5772
type default_context_t;
Chris PeBenito ee5772
files_make_file(default_context_t) 
Chris PeBenito ee5772
Chris PeBenito ee5772
#
Chris PeBenito ee5772
# file_context_t is the type applied to
Chris PeBenito ee5772
# /etc/selinux/*/contexts/files
Chris PeBenito ee5772
#
Chris PeBenito ee5772
type file_context_t;
Chris PeBenito ee5772
files_make_file(file_context_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
type load_policy_t;
Chris PeBenito ee5772
domain_make_domain(load_policy_t)
Chris PeBenito ee5772
role system_r types load_policy_t;
Chris PeBenito ee5772
Chris PeBenito ee5772
type load_policy_exec_t;
Chris PeBenito ee5772
domain_make_entrypoint_file(load_policy_t,load_policy_exec_t)
Chris PeBenito ee5772
Chris PeBenito a1f94a
type newrole_t; # nscd_client_domain, mlsfileread, mlsfilewrite, mlsfileupgrade, mlsfiledowngrade, mlsprocsetsl;
Chris PeBenito 18f25a
kernel_make_role_change_constraint_exception(newrole_t)
Chris PeBenito 18f25a
kernel_make_object_identity_change_constraint_exception(newrole_t)
Chris PeBenito ee5772
domain_make_domain(newrole_t)
Chris PeBenito a1f94a
domain_make_file_descriptors_widely_inheritable(newrole_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
type newrole_exec_t;
Chris PeBenito ee5772
domain_make_entrypoint_file(newrole_t,newrole_exec_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# policy_config_t is the type of /etc/security/selinux/*
Chris PeBenito b4cd15
# the security server policy configuration.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type policy_config_t;
Chris PeBenito b4cd15
files_make_file(policy_config_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
neverallow ~can_relabelto_binary_policy policy_config_t:file relabelto;
Chris PeBenito b4cd15
neverallow ~can_write_binary_policy policy_config_t:file { write append };
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# policy_src_t is the type of the policy source
Chris PeBenito b4cd15
# files.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type policy_src_t;
Chris PeBenito b4cd15
files_make_file(policy_src_t)
Chris PeBenito b4cd15
Chris PeBenito a1f94a
type restorecon_t, can_relabelto_binary_policy;
Chris PeBenito a1f94a
type restorecon_exec_t;
Chris PeBenito 18f25a
kernel_make_object_identity_change_constraint_exception(restorecon_t)
Chris PeBenito ff3138
init_make_system_domain(restorecon_t,restorecon_exec_t)
Chris PeBenito ee5772
role system_r types restorecon_t;
Chris PeBenito ee5772
Chris PeBenito b4cd15
#
Chris PeBenito ee5772
# selinux_config_t is the type applied to
Chris PeBenito ee5772
# /etc/selinux/config
Chris PeBenito b4cd15
#
Chris PeBenito ee5772
type selinux_config_t;
Chris PeBenito ee5772
files_make_file(selinux_config_t)
Chris PeBenito b4cd15
Chris PeBenito a1f94a
type setfiles_t, can_relabelto_binary_policy;
Chris PeBenito 18f25a
kernel_make_object_identity_change_constraint_exception(setfiles_t)
Chris PeBenito ee5772
domain_make_domain(setfiles_t)
Chris PeBenito ee5772
role system_r types setfiles_t;
Chris PeBenito ee5772
Chris PeBenito ee5772
type setfiles_exec_t;
Chris PeBenito ee5772
domain_make_entrypoint_file(setfiles_t,setfiles_exec_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito b4cd15
#
Chris PeBenito ee5772
# Checkpolicy local policy
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
Chris PeBenito ee5772
allow checkpolicy_t self:capability dac_override;
Chris PeBenito b4cd15
Chris PeBenito ee5772
# able to create and modify binary policy files
Chris PeBenito ee5772
allow checkpolicy_t policy_config_t:dir { read getattr lock search ioctl add_name remove_name write };
Chris PeBenito ee5772
allow checkpolicy_t policy_config_t:file { create ioctl read getattr lock write setattr append link unlink rename };
Chris PeBenito ee5772
Chris PeBenito a1f94a
# allow test policies to be created in src directories
Chris PeBenito a1f94a
allow checkpolicy_t policy_src_t:dir { getattr search read write add_name remove_name };
Chris PeBenito a1f94a
type_transition checkpolicy_t policy_src_t:file policy_config_t;
Chris PeBenito a1f94a
Chris PeBenito ee5772
# only allow read of policy source files
Chris PeBenito ee5772
allow checkpolicy_t policy_src_t:dir { getattr search read };
Chris PeBenito ee5772
allow checkpolicy_t policy_src_t:{ file lnk_file } { getattr read };
Chris PeBenito ee5772
allow checkpolicy_t selinux_config_t:dir search;
Chris PeBenito ee5772
Chris PeBenito ee5772
filesystem_get_persistent_filesystem_attributes(checkpolicy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
terminal_use_console(checkpolicy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
init_use_file_descriptors(checkpolicy_t)
Chris PeBenito ee5772
init_script_use_pseudoterminal(checkpolicy_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
domain_use_widely_inheritable_file_descriptors(checkpolicy_t)
Chris PeBenito 1e5c2a
Chris PeBenito ee5772
libraries_use_dynamic_loader(checkpolicy_t)
Chris PeBenito ee5772
libraries_read_shared_libraries(checkpolicy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
ifdef(`TODO',`
Chris PeBenito ee5772
role sysadm_r types checkpolicy_t;
Chris PeBenito ee5772
domain_auto_trans(sysadm_t, checkpolicy_exec_t, checkpolicy_t)
Chris PeBenito a1f94a
allow checkpolicy_t admin_tty_type:chr_file { read write ioctl getattr };
Chris PeBenito a1f94a
allow checkpolicy_t sysadm_tmp_t:file { getattr write };
Chris PeBenito ee5772
Chris PeBenito ee5772
# directory search permissions for path to source and binary policy files
Chris PeBenito ee5772
allow checkpolicy_t etc_t:dir search;
Chris PeBenito ee5772
Chris PeBenito ee5772
# Read the devpts root directory.  
Chris PeBenito ee5772
ifdef(`sshd.te',`allow checkpolicy_t sshd_devpts_t:dir r_dir_perms;')
Chris PeBenito ee5772
Chris PeBenito ee5772
# Allow users to execute checkpolicy without a domain transition
Chris PeBenito ee5772
# so it can be used without privilege to write real binary policy file
Chris PeBenito ee5772
can_exec(unpriv_userdomain, checkpolicy_exec_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
allow checkpolicy_t userdomain:fd use;
Chris PeBenito 1e5c2a
Chris PeBenito ee5772
') dnl endif TODO
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito ee5772
# Load_policy local policy
Chris PeBenito ee5772
#
Chris PeBenito ee5772
Chris PeBenito ee5772
allow load_policy_t self:capability dac_override;
Chris PeBenito ee5772
Chris PeBenito ee5772
# only allow read of policy config files
Chris PeBenito ee5772
allow load_policy_t policy_src_t:dir search;
Chris PeBenito ee5772
allow load_policy_t policy_config_t:dir { getattr search read };
Chris PeBenito ee5772
allow load_policy_t policy_config_t:{ file lnk_file sock_file fifo_file } { getattr read };
Chris PeBenito ee5772
Chris PeBenito ee5772
allow newrole_t selinux_config_t:dir { getattr read search };
Chris PeBenito ee5772
allow newrole_t selinux_config_t:file { read getattr };
Chris PeBenito ee5772
allow newrole_t selinux_config_t:lnk_file { getattr read };
Chris PeBenito ee5772
Chris PeBenito ee5772
kernel_get_selinuxfs_mount_point(load_policy_t)
Chris PeBenito ee5772
kernel_load_selinux_policy(load_policy_t)
Chris PeBenito ee5772
kernel_set_selinux_boolean(load_policy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
filesystem_get_persistent_filesystem_attributes(load_policy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
terminal_use_console(load_policy_t)
Chris PeBenito ee5772
terminal_list_pseudoterminals(load_policy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
init_script_use_file_descriptors(load_policy_t)
Chris PeBenito ee5772
init_script_use_pseudoterminal(load_policy_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
domain_use_widely_inheritable_file_descriptors(load_policy_t)
Chris PeBenito 1e5c2a
Chris PeBenito ee5772
libraries_use_dynamic_loader(load_policy_t)
Chris PeBenito ee5772
libraries_read_shared_libraries(load_policy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
miscfiles_read_localization(load_policy_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
ifdef(`TODO',`
Chris PeBenito ee5772
role sysadm_r types load_policy_t;
Chris PeBenito ee5772
domain_auto_trans(sysadm_t, load_policy_exec_t, load_policy_t)
Chris PeBenito a1f94a
allow load_policy_t sysadm_tmp_t:file { getattr write };
Chris PeBenito a1f94a
allow load_policy_t admin_tty_type:chr_file { read write ioctl getattr };
Chris PeBenito ee5772
Chris PeBenito ee5772
# directory search permissions for path to binary policy files
Chris PeBenito ee5772
allow load_policy_t etc_t:dir search;
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
allow load_policy_t userdomain:fd use;
Chris PeBenito ee5772
') dnl endif TODO
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito ee5772
# Newrole local policy
Chris PeBenito ee5772
#
Chris PeBenito ee5772
Chris PeBenito ee5772
allow newrole_t self:capability { setuid setgid net_bind_service dac_override };
Chris PeBenito ee5772
Chris PeBenito ee5772
allow newrole_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem dyntransition };
Chris PeBenito ee5772
allow newrole_t self:process setexec;
Chris PeBenito ee5772
allow newrole_t self:fd use;
Chris PeBenito ee5772
allow newrole_t self:fifo_file { read getattr lock ioctl write append };
Chris PeBenito ee5772
allow newrole_t self:unix_dgram_socket sendto;
Chris PeBenito ee5772
allow newrole_t self:unix_stream_socket connectto;
Chris PeBenito ee5772
allow newrole_t self:shm { associate getattr setattr create destroy read write lock unix_read unix_write };
Chris PeBenito ee5772
allow newrole_t self:sem { associate getattr setattr create destroy read write unix_read unix_write };
Chris PeBenito ee5772
allow newrole_t self:msgq { associate getattr setattr create destroy read write enqueue unix_read unix_write };
Chris PeBenito ee5772
allow newrole_t self:msg { send receive };
Chris PeBenito ee5772
Chris PeBenito ee5772
allow newrole_t { selinux_config_t default_context_t }:dir { getattr read search };
Chris PeBenito ee5772
allow newrole_t { selinux_config_t default_context_t }:file { read getattr };
Chris PeBenito ee5772
allow newrole_t { selinux_config_t default_context_t }:lnk_file { getattr read };
Chris PeBenito ee5772
Chris PeBenito ee5772
kernel_read_system_state(newrole_t)
Chris PeBenito ee5772
kernel_read_kernel_sysctl(newrole_t)
Chris PeBenito ee5772
kernel_get_selinuxfs_mount_point(newrole_t)
Chris PeBenito ee5772
kernel_validate_selinux_context(newrole_t)
Chris PeBenito ee5772
kernel_compute_selinux_av(newrole_t)
Chris PeBenito ee5772
kernel_compute_create(newrole_t)
Chris PeBenito ee5772
kernel_compute_relabel(newrole_t)
Chris PeBenito ee5772
kernel_compute_reachable_user_contexts(newrole_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
devices_get_pseudorandom_data(newrole_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
filesystem_get_persistent_filesystem_attributes(newrole_t)
Chris PeBenito ee5772
Chris PeBenito a1f94a
terminal_use_all_users_physical_terminals(newrole_t)
Chris PeBenito a1f94a
terminal_use_all_users_pseudoterminals(newrole_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
# Write to utmp.
Chris PeBenito 1e5c2a
init_script_modify_runtime_data(newrole_t)
Chris PeBenito 1e5c2a
Chris PeBenito 1e5c2a
domain_use_widely_inheritable_file_descriptors(newrole_t)
Chris PeBenito 1e5c2a
Chris PeBenito ee5772
files_read_general_system_config(newrole_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
libraries_use_dynamic_loader(newrole_t)
Chris PeBenito ee5772
libraries_read_shared_libraries(newrole_t)
Chris PeBenito ee5772
Chris PeBenito a1f94a
logging_send_system_log_message(newrole_t)
Chris PeBenito a1f94a
Chris PeBenito ee5772
miscfiles_read_localization(newrole_t)
Chris PeBenito ee5772
Chris PeBenito a1f94a
authlogin_check_password_transition(newrole_t)
Chris PeBenito a1f94a
Chris PeBenito ee5772
ifdef(`TODO',`
Chris PeBenito ee5772
in_user_role(newrole_t)
Chris PeBenito ee5772
role sysadm_r types newrole_t;
Chris PeBenito ee5772
Chris PeBenito ee5772
allow newrole_t unpriv_userdomain:fd use;
Chris PeBenito ee5772
can_ypbind(newrole)
Chris PeBenito ee5772
ifdef(`automount.te', `
Chris PeBenito ee5772
allow newrole_t autofs_t:dir { search getattr };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
# for when the user types "exec newrole" at the command line
Chris PeBenito ee5772
allow newrole_t privfd:process sigchld;
Chris PeBenito a9a20d
 
Chris PeBenito ee5772
# Execute /sbin/pwdb_chkpwd to check the password.
Chris PeBenito ee5772
allow newrole_t sbin_t:dir r_dir_perms;
Chris PeBenito ee5772
Chris PeBenito ee5772
# Execute shells
Chris PeBenito ee5772
allow newrole_t bin_t:dir r_dir_perms;
Chris PeBenito ee5772
allow newrole_t bin_t:lnk_file read;
Chris PeBenito ee5772
Chris PeBenito ee5772
# Allow newrole_t to transition to user domains.
Chris PeBenito ee5772
bool secure_mode false;
Chris PeBenito ee5772
domain_trans(newrole_t, shell_exec_t, unpriv_userdomain)
Chris PeBenito ee5772
if(!secure_mode)
Chris PeBenito ee5772
{
Chris PeBenito ee5772
	# if we are not in secure mode then we can transition to sysadm_t
Chris PeBenito ee5772
	domain_trans(newrole_t, shell_exec_t, sysadm_t)
Chris PeBenito ee5772
}
Chris PeBenito ee5772
Chris PeBenito ee5772
# Read /var.
Chris PeBenito ee5772
allow newrole_t var_t:dir r_dir_perms;
Chris PeBenito ee5772
allow newrole_t var_t:notdevfile_class_set r_file_perms;
Chris PeBenito ee5772
Chris PeBenito ee5772
# Relabel terminals.
Chris PeBenito ee5772
allow newrole_t { ttyfile ptyfile }:chr_file { relabelfrom relabelto };
Chris PeBenito ee5772
Chris PeBenito ee5772
ifdef(`gnome-pty-helper.te', `allow newrole_t gphdomain:fd use;')
Chris PeBenito ee5772
Chris PeBenito ee5772
# for some PAM modules and for cwd
Chris PeBenito ee5772
dontaudit newrole_t { home_root_t home_type }:dir search;
Chris PeBenito ee5772
Chris PeBenito ee5772
# for when the network connection is killed
Chris PeBenito ee5772
dontaudit unpriv_userdomain newrole_t:process signal;
Chris PeBenito ee5772
Chris PeBenito ee5772
') dnl ifdef TODO
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito ee5772
# Restorecon local policy
Chris PeBenito ee5772
#
Chris PeBenito ee5772
Chris PeBenito ee5772
allow restorecon_t self:capability { dac_override dac_read_search fowner };
Chris PeBenito ee5772
Chris PeBenito ee5772
allow restorecon_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:dir { getattr read search };
Chris PeBenito ee5772
allow restorecon_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:file { read getattr };
Chris PeBenito ee5772
allow restorecon_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:lnk_file { getattr read };
Chris PeBenito ee5772
Chris PeBenito ee5772
kernel_use_file_descriptors(restorecon_t)
Chris PeBenito ee5772
kernel_read_system_state(restorecon_t)
Chris PeBenito ee5772
kernel_get_selinuxfs_mount_point(restorecon_t)
Chris PeBenito ee5772
kernel_validate_selinux_context(restorecon_t)
Chris PeBenito ee5772
kernel_compute_selinux_av(restorecon_t)
Chris PeBenito ee5772
kernel_compute_create(restorecon_t)
Chris PeBenito ee5772
kernel_compute_relabel(restorecon_t)
Chris PeBenito ee5772
kernel_compute_reachable_user_contexts(restorecon_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
filesystem_get_persistent_filesystem_attributes(restorecon_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
terminal_use_general_physical_terminal(restorecon_t)
Chris PeBenito 1e5c2a
Chris PeBenito ee5772
init_use_file_descriptors(restorecon_t)
Chris PeBenito ee5772
init_script_use_pseudoterminal(restorecon_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
domain_use_widely_inheritable_file_descriptors(restorecon_t)
Chris PeBenito 1e5c2a
Chris PeBenito ee5772
files_read_runtime_system_config(restorecon_t)
Chris PeBenito ee5772
files_read_general_system_config(restorecon_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
libraries_use_dynamic_loader(restorecon_t)
Chris PeBenito ee5772
libraries_read_shared_libraries(restorecon_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
logging_send_system_log_message(restorecon_t)
Chris PeBenito ee5772
Chris PeBenito c3c58c
optional_policy(`hotplug.te',`
Chris PeBenito c3c58c
hotplug_use_file_descriptors(restorecon_t)
Chris PeBenito c3c58c
')
Chris PeBenito c3c58c
Chris PeBenito ee5772
# relabeling rules
Chris PeBenito ee5772
kernel_relabel_unlabeled_object(restorecon_t)
Chris PeBenito ee5772
devices_manage_all_devices_labels(restorecon_t)
Chris PeBenito ee5772
files_manage_all_files_labels(restorecon_t)
Chris PeBenito e843cc
files_read_all_directories(restorecon_t)
Chris PeBenito a1f94a
# this is to satisfy the assertion:
Chris PeBenito a1f94a
authlogin_relabel_to_shadow_passwords(restorecon_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
ifdef(`TODO',`
Chris PeBenito 1e5c2a
allow restorecon_t admin_tty_type:chr_file { read write ioctl };
Chris PeBenito ee5772
domain_audo_trans(sysadm_t, restorecon_exec_t, restorecon_t)
Chris PeBenito ee5772
role sysadm_r types restorecon_t;
Chris PeBenito 1e5c2a
allow restorecon_t userdomain:fd use;
Chris PeBenito ee5772
Chris PeBenito ee5772
# for upgrading glibc and other shared objects - without this the upgrade
Chris PeBenito ee5772
# scripts will put things in a state such that restorecon can not be run!
Chris PeBenito ee5772
allow restorecon_t lib_t:file { read execute };
Chris PeBenito ee5772
Chris PeBenito 25baab
tunable_policy(`distro_redhat', `
Chris PeBenito ee5772
allow restorecon_t tmpfs_t:{ chr_file blk_file } { rw_file_perms relabelfrom relabelto };
Chris PeBenito ee5772
')
Chris PeBenito ee5772
Chris PeBenito ee5772
allow restorecon_t fs_type:dir r_dir_perms;
Chris PeBenito ee5772
Chris PeBenito ee5772
allow restorecon_t device_t:file { read write };
Chris PeBenito ee5772
allow restorecon_t kernel_t:fifo_file { read write };
Chris PeBenito ee5772
') dnl endif TODO
Chris PeBenito ee5772
Chris PeBenito ee5772
########################################
Chris PeBenito ee5772
#
Chris PeBenito ee5772
# Setfiles local policy
Chris PeBenito ee5772
#
Chris PeBenito ee5772
Chris PeBenito ee5772
allow setfiles_t self:capability { dac_override dac_read_search fowner };
Chris PeBenito ee5772
Chris PeBenito ee5772
allow setfiles_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:dir { getattr read search };
Chris PeBenito ee5772
allow setfiles_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:file { read getattr };
Chris PeBenito ee5772
allow setfiles_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:lnk_file { getattr read };
Chris PeBenito ee5772
Chris PeBenito ee5772
kernel_read_system_state(setfiles_t)
Chris PeBenito ee5772
kernel_get_selinuxfs_mount_point(setfiles_t)
Chris PeBenito ee5772
kernel_validate_selinux_context(setfiles_t)
Chris PeBenito ee5772
kernel_compute_selinux_av(setfiles_t)
Chris PeBenito ee5772
kernel_compute_create(setfiles_t)
Chris PeBenito ee5772
kernel_compute_relabel(setfiles_t)
Chris PeBenito ee5772
kernel_compute_reachable_user_contexts(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
filesystem_get_persistent_filesystem_attributes(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
terminal_use_all_users_physical_terminals(setfiles_t)
Chris PeBenito 1e5c2a
terminal_use_all_users_pseudoterminals(setfiles_t)
Chris PeBenito 1e5c2a
terminal_use_general_physical_terminal(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
init_use_file_descriptors(setfiles_t)
Chris PeBenito ee5772
init_script_use_file_descriptors(setfiles_t)
Chris PeBenito ee5772
init_script_use_pseudoterminal(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
domain_use_widely_inheritable_file_descriptors(setfiles_t)
Chris PeBenito 1e5c2a
Chris PeBenito ee5772
libraries_use_dynamic_loader(setfiles_t)
Chris PeBenito ee5772
libraries_read_shared_libraries(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
files_read_runtime_system_config(setfiles_t)
Chris PeBenito ee5772
files_read_general_system_config(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
logging_send_system_log_message(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
miscfiles_read_localization(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
# relabeling rules
Chris PeBenito ee5772
kernel_relabel_unlabeled_object(setfiles_t)
Chris PeBenito ee5772
devices_manage_all_devices_labels(setfiles_t)
Chris PeBenito e843cc
files_read_all_directories(setfiles_t)
Chris PeBenito ee5772
files_manage_all_files_labels(setfiles_t)
Chris PeBenito a1f94a
# this is to satisfy the assertion:
Chris PeBenito a1f94a
authlogin_relabel_to_shadow_passwords(setfiles_t)
Chris PeBenito ee5772
Chris PeBenito ee5772
ifdef(`TODO',`
Chris PeBenito ee5772
Chris PeBenito ee5772
domain_auto_trans(sysadm_t, setfiles_exec_t, setfiles_t)
Chris PeBenito ee5772
role sysadm_r types setfiles_t;
Chris PeBenito ee5772
Chris PeBenito 1e5c2a
allow setfiles_t userdomain:fd use;
Chris PeBenito ee5772
Chris PeBenito ee5772
# for upgrading glibc and other shared objects - without this the upgrade
Chris PeBenito ee5772
# scripts will put things in a state such that setfiles can not be run!
Chris PeBenito ee5772
allow setfiles_t lib_t:file { read execute };
Chris PeBenito ee5772
Chris PeBenito ee5772
allow setfiles_t unlabeled_t:dir read;
Chris PeBenito ee5772
Chris PeBenito ee5772
allow setfiles_t fs_type:dir r_dir_perms;
Chris PeBenito b4cd15
Chris PeBenito ee5772
# for config files in a home directory
Chris PeBenito ee5772
allow setfiles_t home_type:file r_file_perms;
Chris PeBenito ee5772
') dnl endif TODO