Chris PeBenito 29af4c
policy_module(setroubleshoot, 1.11.0)
Chris PeBenito eac818
Chris PeBenito eac818
########################################
Chris PeBenito eac818
#
Chris PeBenito bcc6e6
# 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 bcc6e6
type setroubleshoot_fixit_t;
Chris PeBenito bcc6e6
type setroubleshoot_fixit_exec_t;
Chris PeBenito bcc6e6
dbus_system_domain(setroubleshoot_fixit_t, setroubleshoot_fixit_exec_t)
Chris PeBenito bcc6e6
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 bcc6e6
allow setroubleshootd_t self:capability { dac_override sys_nice sys_tty_config };
Chris PeBenito bcc6e6
allow setroubleshootd_t self:process { getattr getsched setsched sigkill signull signal };
Dan Walsh 3eaa99
# if bad library causes setroubleshoot to require these, we want to give it so setroubleshoot can continue to run
Dan Walsh 3eaa99
allow setroubleshootd_t self:process { execmem execstack };
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
Dan Walsh 3eaa99
manage_dirs_pattern(setroubleshootd_t, setroubleshoot_var_run_t, setroubleshoot_var_run_t)
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)
Dan Walsh 3eaa99
files_pid_filetrans(setroubleshootd_t, setroubleshoot_var_run_t, { file sock_file dir })
Chris PeBenito eac818
Chris PeBenito eac818
kernel_read_kernel_sysctls(setroubleshootd_t)
Chris PeBenito eac818
kernel_read_system_state(setroubleshootd_t)
Chris PeBenito bcc6e6
kernel_read_net_sysctls(setroubleshootd_t)
Chris PeBenito 6b19be
kernel_read_network_state(setroubleshootd_t)
Dan Walsh 3eaa99
kernel_dontaudit_list_all_proc(setroubleshootd_t)
Dan Walsh 3eaa99
kernel_read_unlabeled_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 bcc6e6
dev_getattr_all_blk_files(setroubleshootd_t)
Chris PeBenito bcc6e6
dev_getattr_all_chr_files(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito 8708d9
domain_dontaudit_search_all_domains_state(setroubleshootd_t)
Chris PeBenito bcc6e6
domain_signull_all_domains(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 bcc6e6
files_list_all(setroubleshootd_t)
Chris PeBenito 7aca2a
files_getattr_all_files(setroubleshootd_t)
Chris PeBenito bcc6e6
files_getattr_all_pipes(setroubleshootd_t)
Chris PeBenito bcc6e6
files_getattr_all_sockets(setroubleshootd_t)
Chris PeBenito bcc6e6
files_read_all_symlinks(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 bcc6e6
fs_read_fusefs_symlinks(setroubleshootd_t)
Chris PeBenito bcc6e6
fs_list_inotifyfs(setroubleshootd_t)
Chris PeBenito bcc6e6
fs_dontaudit_read_nfs_files(setroubleshootd_t)
Chris PeBenito bcc6e6
fs_dontaudit_read_cifs_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 c3c753
term_dontaudit_use_all_ptys(setroubleshootd_t)
Chris PeBenito c3c753
term_dontaudit_use_all_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 bcc6e6
logging_send_audit_msgs(setroubleshootd_t)
Chris PeBenito eac818
logging_send_syslog_msg(setroubleshootd_t)
Chris PeBenito c11057
logging_stream_connect_dispatcher(setroubleshootd_t)
Chris PeBenito eac818
Chris PeBenito bcc6e6
modutils_read_module_config(setroubleshootd_t)
Chris PeBenito bcc6e6
Chris PeBenito eac818
seutil_read_config(setroubleshootd_t)
Chris PeBenito 7aca2a
seutil_read_file_contexts(setroubleshootd_t)
Chris PeBenito bcc6e6
seutil_read_bin_policy(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(`
Dan Walsh 3eaa99
	locate_read_lib_files(setroubleshootd_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Chris PeBenito bcc6e6
	dbus_system_domain(setroubleshootd_t, setroubleshootd_exec_t)
Chris PeBenito cdf98f
')
Chris PeBenito cdf98f
Chris PeBenito cdf98f
optional_policy(`
Chris PeBenito bcc6e6
	rpm_signull(setroubleshootd_t)
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
')
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
########################################
Chris PeBenito bcc6e6
#
Chris PeBenito bcc6e6
# setroubleshoot_fixit local policy
Chris PeBenito bcc6e6
#
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
allow setroubleshoot_fixit_t self:capability sys_nice;
Chris PeBenito bcc6e6
allow setroubleshoot_fixit_t self:process { setsched getsched };
Chris PeBenito bcc6e6
allow setroubleshoot_fixit_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito bcc6e6
allow setroubleshoot_fixit_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
allow setroubleshoot_fixit_t setroubleshootd_t:process signull;
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
setroubleshoot_dbus_chat(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
setroubleshoot_stream_connect(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
kernel_read_system_state(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
corecmd_exec_bin(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
corecmd_exec_shell(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
seutil_domtrans_setfiles(setroubleshoot_fixit_t)
Dan Walsh 3eaa99
seutil_domtrans_setsebool(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
files_read_usr_files(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
files_read_etc_files(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
files_list_tmp(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
auth_use_nsswitch(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
logging_send_audit_msgs(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
logging_send_syslog_msg(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
miscfiles_read_localization(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
Dan Walsh 3eaa99
userdom_dontaudit_search_admin_dir(setroubleshoot_fixit_t)
Dan Walsh 3eaa99
userdom_signull_unpriv_users(setroubleshoot_fixit_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
	gnome_dontaudit_search_config(setroubleshoot_fixit_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Chris PeBenito bcc6e6
optional_policy(`
Chris PeBenito bcc6e6
	rpm_signull(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
	rpm_read_db(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
	rpm_dontaudit_manage_db(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
	rpm_use_script_fds(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
')
Chris PeBenito bcc6e6
Chris PeBenito bcc6e6
optional_policy(`
Chris PeBenito bcc6e6
	policykit_dbus_chat(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
	userdom_read_all_users_state(setroubleshoot_fixit_t)
Chris PeBenito bcc6e6
')