Chris PeBenito eac818
Chris PeBenito 9570b2
policy_module(setroubleshoot, 1.10.0)
Chris PeBenito eac818
Chris PeBenito eac818
########################################
Chris PeBenito eac818
#
Chris PeBenito eac818
# Declarations 
Chris PeBenito eac818
#
Chris PeBenito eac818
Chris PeBenito eac818
type setroubleshootd_t alias setroubleshoot_t;
Chris PeBenito eac818
type setroubleshootd_exec_t;
Chris PeBenito eac818
domain_type(setroubleshootd_t)
Chris PeBenito eac818
init_daemon_domain(setroubleshootd_t, setroubleshootd_exec_t)
Chris PeBenito eac818
Chris PeBenito eac818
type setroubleshoot_var_lib_t;
Chris PeBenito eac818
files_type(setroubleshoot_var_lib_t)
Chris PeBenito eac818
Chris PeBenito eac818
# log files
Chris PeBenito eac818
type setroubleshoot_var_log_t;
Chris PeBenito eac818
logging_log_file(setroubleshoot_var_log_t)
Chris PeBenito eac818
Chris PeBenito eac818
# pid files
Chris PeBenito eac818
type setroubleshoot_var_run_t;
Chris PeBenito eac818
files_pid_file(setroubleshoot_var_run_t)
Chris PeBenito eac818
Chris PeBenito eac818
########################################
Chris PeBenito eac818
#
Chris PeBenito eac818
# setroubleshootd local policy
Chris PeBenito eac818
#
Chris PeBenito eac818
Chris PeBenito eac818
allow setroubleshootd_t self:capability { dac_override sys_tty_config };
Chris PeBenito f6a590
allow setroubleshootd_t self:process { signull signal getattr getsched };
Chris PeBenito c0868a
allow setroubleshootd_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito eac818
allow setroubleshootd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito eac818
allow setroubleshootd_t self:unix_stream_socket { create_stream_socket_perms connectto };
Chris PeBenito eac818
allow setroubleshootd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito eac818
Chris PeBenito eac818
# database files
Chris PeBenito c0868a
allow setroubleshootd_t setroubleshoot_var_lib_t:dir setattr;
Chris PeBenito 0bfccd
manage_files_pattern(setroubleshootd_t, setroubleshoot_var_lib_t, setroubleshoot_var_lib_t)
Chris PeBenito 0bfccd
files_var_lib_filetrans(setroubleshootd_t, setroubleshoot_var_lib_t, { file dir })
Chris PeBenito eac818
Chris PeBenito eac818
# log files
Chris PeBenito c0868a
allow setroubleshootd_t setroubleshoot_var_log_t:dir setattr;
Chris PeBenito 0bfccd
manage_files_pattern(setroubleshootd_t, setroubleshoot_var_log_t, setroubleshoot_var_log_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(setroubleshootd_t, setroubleshoot_var_log_t, setroubleshoot_var_log_t)
Chris PeBenito 0bfccd
logging_log_filetrans(setroubleshootd_t, setroubleshoot_var_log_t, { file dir })
Chris PeBenito eac818
Chris PeBenito eac818
# pid file
Chris PeBenito 0bfccd
manage_files_pattern(setroubleshootd_t, setroubleshoot_var_run_t, setroubleshoot_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(setroubleshootd_t, setroubleshoot_var_run_t, setroubleshoot_var_run_t)
Chris PeBenito 3f67f7
files_pid_filetrans(setroubleshootd_t, setroubleshoot_var_run_t, { file sock_file })
Chris PeBenito eac818
Chris PeBenito eac818
kernel_read_kernel_sysctls(setroubleshootd_t)
Chris PeBenito eac818
kernel_read_system_state(setroubleshootd_t)
Chris PeBenito 6b19be
kernel_read_network_state(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
corecmd_exec_bin(setroubleshootd_t)
Chris PeBenito eac818
corecmd_exec_shell(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(setroubleshootd_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(setroubleshootd_t)
Chris PeBenito eac818
corenet_tcp_sendrecv_generic_if(setroubleshootd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(setroubleshootd_t)
Chris PeBenito eac818
corenet_tcp_sendrecv_all_ports(setroubleshootd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(setroubleshootd_t)
Chris PeBenito eac818
corenet_tcp_connect_smtp_port(setroubleshootd_t)
Chris PeBenito eac818
corenet_sendrecv_smtp_client_packets(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
dev_read_urand(setroubleshootd_t)
Chris PeBenito cdf98f
dev_read_sysfs(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito 8708d9
domain_dontaudit_search_all_domains_state(setroubleshootd_t)
Chris PeBenito 8708d9
Chris PeBenito eac818
files_read_usr_files(setroubleshootd_t)
Chris PeBenito eac818
files_read_etc_files(setroubleshootd_t)
Chris PeBenito eac818
files_getattr_all_dirs(setroubleshootd_t)
Chris PeBenito 7aca2a
files_getattr_all_files(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito 0a0b80
fs_getattr_all_dirs(setroubleshootd_t)
Chris PeBenito 0a0b80
fs_getattr_all_files(setroubleshootd_t)
Chris PeBenito 0a0b80
Chris PeBenito eac818
selinux_get_enforce_mode(setroubleshootd_t)
Chris PeBenito 7aca2a
selinux_validate_context(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
term_dontaudit_use_all_user_ptys(setroubleshootd_t)
Chris PeBenito eac818
term_dontaudit_use_all_user_ttys(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito 0a0b80
auth_use_nsswitch(setroubleshootd_t)
Chris PeBenito 0a0b80
Chris PeBenito eac818
init_read_utmp(setroubleshootd_t)
Chris PeBenito eac818
init_dontaudit_write_utmp(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
miscfiles_read_localization(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
locallogin_dontaudit_use_fds(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
logging_send_syslog_msg(setroubleshootd_t)
Chris PeBenito c11057
logging_stream_connect_dispatcher(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
seutil_read_config(setroubleshootd_t)
Chris PeBenito 7aca2a
seutil_read_file_contexts(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito eac818
sysnet_read_config(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito 296273
userdom_dontaudit_read_user_home_content_files(setroubleshootd_t)
Chris PeBenito 7aca2a
Chris PeBenito eac818
optional_policy(`
Chris PeBenito 296273
	dbus_system_bus_client(setroubleshootd_t)
Chris PeBenito cdf98f
	dbus_connect_system_bus(setroubleshootd_t)
Chris PeBenito cdf98f
')
Chris PeBenito cdf98f
Chris PeBenito cdf98f
optional_policy(`
Chris PeBenito eac818
	rpm_read_db(setroubleshootd_t)
Chris PeBenito eac818
	rpm_dontaudit_manage_db(setroubleshootd_t)
Chris PeBenito 6073ea
	rpm_use_script_fds(setroubleshootd_t)
Chris PeBenito eac818
')