Chris PeBenito 17de1b
Chris PeBenito c1e501
policy_module(setrans, 1.5.1)
Chris PeBenito c1e501
Chris PeBenito c1e501
gen_require(`
Chris PeBenito c1e501
	class context contains;
Chris PeBenito c1e501
')
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 e070dd
type setrans_exec_t;
Chris PeBenito 17de1b
init_daemon_domain(setrans_t, setrans_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 88c02e
type setrans_initrc_exec_t;
Chris PeBenito 88c02e
init_script_file(setrans_initrc_exec_t)
Chris PeBenito 88c02e
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 e070dd
ifdef(`enable_mcs',`
Chris PeBenito 3f67f7
	init_ranged_daemon_domain(setrans_t, setrans_exec_t, s0 - mcs_systemhigh)
Chris PeBenito e070dd
')
Chris PeBenito e070dd
Chris PeBenito e070dd
ifdef(`enable_mls',`
Chris PeBenito 3f67f7
	init_ranged_daemon_domain(setrans_t, setrans_exec_t, mls_systemhigh)
Chris PeBenito e070dd
')
Chris PeBenito e070dd
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 878691
allow setrans_t self:process { setrlimit getcap 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 c1e501
allow setrans_t self:context contains;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
can_exec(setrans_t, setrans_exec_t)
Chris PeBenito 8021cb
corecmd_search_bin(setrans_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# create unix domain socket in /var
Chris PeBenito 3f67f7
manage_files_pattern(setrans_t, setrans_var_run_t, setrans_var_run_t)
Chris PeBenito 3f67f7
manage_sock_files_pattern(setrans_t, setrans_var_run_t, setrans_var_run_t)
Chris PeBenito 3f67f7
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 8708d9
domain_dontaudit_search_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 f8233a
mls_file_read_all_levels(setrans_t)
Chris PeBenito f8233a
mls_file_write_all_levels(setrans_t)
Chris PeBenito 17de1b
mls_net_receive_all_levels(setrans_t)
Chris PeBenito a8671a
mls_socket_write_all_levels(setrans_t)
Chris PeBenito d9845a
mls_process_read_up(setrans_t)
Chris PeBenito d9845a
mls_socket_read_all_levels(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_dontaudit_use_script_ptys(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
')