Chris PeBenito 165b42
Chris PeBenito 87eb5c
policy_module(setrans,1.0.1)
Chris PeBenito 165b42
Chris PeBenito 165b42
########################################
Chris PeBenito 165b42
#
Chris PeBenito 165b42
# Declarations
Chris PeBenito 165b42
#
Chris PeBenito 165b42
Chris PeBenito 165b42
type setrans_t;
Chris PeBenito 165b42
# real declaration moved to mls until
Chris PeBenito 165b42
# range_transition works in loadable modules
Chris PeBenito 165b42
gen_require(`
Chris PeBenito 165b42
	type setrans_exec_t;
Chris PeBenito 165b42
')
Chris PeBenito 165b42
init_daemon_domain(setrans_t, setrans_exec_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
type setrans_var_run_t;
Chris PeBenito 165b42
files_pid_file(setrans_var_run_t)
Chris PeBenito 165b42
mls_trusted_object(setrans_var_run_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
########################################
Chris PeBenito 165b42
#
Chris PeBenito 165b42
# setrans local policy
Chris PeBenito 165b42
#
Chris PeBenito 165b42
Chris PeBenito 87eb5c
allow setrans_t self:capability sys_resource;
Chris PeBenito 87eb5c
allow setrans_t self:process { setrlimit setcap signal_perms };
Chris PeBenito 165b42
allow setrans_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 165b42
allow setrans_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 165b42
allow setrans_t self:netlink_selinux_socket create_socket_perms;
Chris PeBenito 165b42
Chris PeBenito 165b42
can_exec(setrans_t, setrans_exec_t)
Chris PeBenito 165b42
corecmd_search_sbin(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
# create unix domain socket in /var
Chris PeBenito 165b42
allow setrans_t setrans_var_run_t:sock_file manage_file_perms;
Chris PeBenito 165b42
allow setrans_t setrans_var_run_t:file manage_file_perms;
Chris PeBenito 165b42
allow setrans_t setrans_var_run_t:dir rw_dir_perms;
Chris PeBenito 165b42
files_pid_filetrans(setrans_t,setrans_var_run_t,file)
Chris PeBenito 165b42
Chris PeBenito 165b42
kernel_read_kernel_sysctls(setrans_t)
Chris PeBenito 165b42
kernel_read_proc_symlinks(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
# allow performing getpidcon() on all processes
Chris PeBenito 165b42
domain_read_all_domains_state(setrans_t)
Chris PeBenito 165b42
domain_getattr_all_domains(setrans_t)
Chris PeBenito 165b42
domain_getsession_all_domains(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
files_read_etc_runtime_files(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
mls_file_read_up(setrans_t)
Chris PeBenito 165b42
mls_file_write_down(setrans_t)
Chris PeBenito 165b42
mls_net_receive_all_levels(setrans_t)
Chris PeBenito 165b42
mls_rangetrans_target(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
selinux_compute_access_vector(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
term_dontaudit_use_generic_ptys(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
init_use_fds(setrans_t)
Chris PeBenito 87eb5c
init_dontaudit_use_script_ptys(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
libs_use_ld_so(setrans_t)
Chris PeBenito 165b42
libs_use_shared_libs(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
logging_send_syslog_msg(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
miscfiles_read_localization(setrans_t)
Chris PeBenito 165b42
Chris PeBenito 165b42
seutil_read_config(setrans_t)