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