Chris PeBenito b52122
policy_module(abrt, 1.1.1)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
########################################
Chris PeBenito e3a90e
#
Chris PeBenito e3a90e
# Declarations
Chris PeBenito e3a90e
#
Chris PeBenito e3a90e
Chris PeBenito e3a90e
type abrt_t;
Chris PeBenito e3a90e
type abrt_exec_t;
Chris PeBenito e3a90e
init_daemon_domain(abrt_t, abrt_exec_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
type abrt_initrc_exec_t;
Chris PeBenito e3a90e
init_script_file(abrt_initrc_exec_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# etc files
Chris PeBenito e3a90e
type abrt_etc_t;
Chris PeBenito e3a90e
files_config_file(abrt_etc_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# log files
Chris PeBenito e3a90e
type abrt_var_log_t;
Chris PeBenito e3a90e
logging_log_file(abrt_var_log_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# tmp files
Chris PeBenito e3a90e
type abrt_tmp_t;
Chris PeBenito e3a90e
files_tmp_file(abrt_tmp_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# var/cache files
Chris PeBenito e3a90e
type abrt_var_cache_t;
Chris PeBenito e3a90e
files_type(abrt_var_cache_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# pid files
Chris PeBenito e3a90e
type abrt_var_run_t;
Chris PeBenito e3a90e
files_pid_file(abrt_var_run_t)
Chris PeBenito e3a90e
Chris PeBenito 1b2f08
# type needed to allow all domains
Chris PeBenito 1b2f08
# to handle /var/cache/abrt
Chris PeBenito 1b2f08
type abrt_helper_t;
Chris PeBenito 1b2f08
type abrt_helper_exec_t;
Chris PeBenito 1b2f08
application_domain(abrt_helper_t, abrt_helper_exec_t)
Chris PeBenito 1b2f08
role system_r types abrt_helper_t;
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
ifdef(`enable_mcs',`
Chris PeBenito 1b2f08
	init_ranged_daemon_domain(abrt_t, abrt_exec_t, s0 - mcs_systemhigh)
Chris PeBenito 1b2f08
')
Chris PeBenito 1b2f08
Chris PeBenito e3a90e
########################################
Chris PeBenito e3a90e
#
Chris PeBenito e3a90e
# abrt local policy
Chris PeBenito e3a90e
#
Chris PeBenito e3a90e
Chris PeBenito 1b2f08
allow abrt_t self:capability { chown kill setuid setgid sys_nice dac_override };
Chris PeBenito 1b2f08
dontaudit abrt_t self:capability sys_rawio;
Chris PeBenito e3a90e
allow abrt_t self:process { signal signull setsched getsched };
Chris PeBenito e3a90e
Chris PeBenito e3a90e
allow abrt_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito e3a90e
allow abrt_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito e3a90e
allow abrt_t self:udp_socket create_socket_perms;
Chris PeBenito e3a90e
allow abrt_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito e3a90e
allow abrt_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# abrt etc files
Chris PeBenito e3a90e
rw_files_pattern(abrt_t, abrt_etc_t, abrt_etc_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# log file
Chris PeBenito e3a90e
manage_files_pattern(abrt_t, abrt_var_log_t, abrt_var_log_t)
Chris PeBenito e3a90e
logging_log_filetrans(abrt_t, abrt_var_log_t, file)
Chris PeBenito e3a90e
Chris PeBenito 1b2f08
# abrt tmp files
Chris PeBenito e3a90e
manage_dirs_pattern(abrt_t, abrt_tmp_t, abrt_tmp_t)
Chris PeBenito e3a90e
manage_files_pattern(abrt_t, abrt_tmp_t, abrt_tmp_t)
Chris PeBenito e3a90e
files_tmp_filetrans(abrt_t, abrt_tmp_t, { file dir })
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# abrt var/cache files
Chris PeBenito e3a90e
manage_files_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
Chris PeBenito e3a90e
manage_dirs_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
Chris PeBenito 1b2f08
manage_lnk_files_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
Chris PeBenito e3a90e
files_var_filetrans(abrt_t, abrt_var_cache_t, { file dir })
Chris PeBenito b52122
files_spool_filetrans(abrt_t, abrt_var_cache_t, dir)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# abrt pid files
Chris PeBenito e3a90e
manage_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
Chris PeBenito e3a90e
manage_dirs_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
Chris PeBenito b52122
manage_sock_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
Chris PeBenito 1b2f08
manage_lnk_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
Chris PeBenito e3a90e
files_pid_filetrans(abrt_t, abrt_var_run_t, { file dir })
Chris PeBenito e3a90e
Chris PeBenito e3a90e
kernel_read_ring_buffer(abrt_t)
Chris PeBenito e3a90e
kernel_read_system_state(abrt_t)
Chris PeBenito e3a90e
kernel_rw_kernel_sysctl(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
corecmd_exec_bin(abrt_t)
Chris PeBenito e3a90e
corecmd_exec_shell(abrt_t)
Chris PeBenito 1b2f08
corecmd_read_all_executables(abrt_t)
Chris PeBenito e3a90e
Dominick Grift cd1734
corenet_all_recvfrom_netlabel(abrt_t)
Dominick Grift cd1734
corenet_all_recvfrom_unlabeled(abrt_t)
Dominick Grift cd1734
corenet_tcp_sendrecv_generic_if(abrt_t)
Dominick Grift cd1734
corenet_tcp_sendrecv_generic_node(abrt_t)
Dominick Grift cd1734
corenet_tcp_sendrecv_generic_port(abrt_t)
Chris PeBenito 1b2f08
corenet_tcp_bind_generic_node(abrt_t)
Chris PeBenito 1b2f08
corenet_tcp_connect_http_port(abrt_t)
Chris PeBenito 1b2f08
corenet_tcp_connect_ftp_port(abrt_t)
Chris PeBenito 1b2f08
corenet_tcp_connect_all_ports(abrt_t)
Chris PeBenito 1b2f08
corenet_sendrecv_http_client_packets(abrt_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
dev_getattr_all_chr_files(abrt_t)
Chris PeBenito e3a90e
dev_read_urand(abrt_t)
Chris PeBenito 1b2f08
dev_rw_sysfs(abrt_t)
Chris PeBenito 1b2f08
dev_dontaudit_read_raw_memory(abrt_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
domain_getattr_all_domains(abrt_t)
Chris PeBenito 1b2f08
domain_read_all_domains_state(abrt_t)
Chris PeBenito 1b2f08
domain_signull_all_domains(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
files_getattr_all_files(abrt_t)
Chris PeBenito e3a90e
files_read_etc_files(abrt_t)
Chris PeBenito 1b2f08
files_read_var_symlinks(abrt_t)
Chris PeBenito 1b2f08
files_read_var_lib_files(abrt_t)
Chris PeBenito e3a90e
files_read_usr_files(abrt_t)
Chris PeBenito 1b2f08
files_read_generic_tmp_files(abrt_t)
Chris PeBenito 1b2f08
files_read_kernel_modules(abrt_t)
Chris PeBenito 1b2f08
files_dontaudit_list_default(abrt_t)
Chris PeBenito 1b2f08
files_dontaudit_read_default_files(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
fs_list_inotifyfs(abrt_t)
Chris PeBenito e3a90e
fs_getattr_all_fs(abrt_t)
Chris PeBenito e3a90e
fs_getattr_all_dirs(abrt_t)
Chris PeBenito 1b2f08
fs_read_fusefs_files(abrt_t)
Chris PeBenito 1b2f08
fs_read_noxattr_fs_files(abrt_t)
Chris PeBenito 1b2f08
fs_read_nfs_files(abrt_t)
Chris PeBenito 1b2f08
fs_read_nfs_symlinks(abrt_t)
Chris PeBenito 1b2f08
fs_search_all(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
sysnet_read_config(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
logging_read_generic_logs(abrt_t)
Chris PeBenito e3a90e
logging_send_syslog_msg(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
miscfiles_read_certs(abrt_t)
Chris PeBenito e3a90e
miscfiles_read_localization(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito 1b2f08
userdom_dontaudit_read_user_home_content_files(abrt_t)
Chris PeBenito e3a90e
Chris PeBenito e3a90e
optional_policy(`
Chris PeBenito 1b2f08
	dbus_system_domain(abrt_t, abrt_exec_t)
Chris PeBenito e3a90e
')
Chris PeBenito e3a90e
Chris PeBenito e3a90e
optional_policy(`
Chris PeBenito 1b2f08
	nis_use_ypbind(abrt_t)
Chris PeBenito 1b2f08
')
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
optional_policy(`
Chris PeBenito 1b2f08
	policykit_dbus_chat(abrt_t)
Chris PeBenito 1b2f08
	policykit_domtrans_auth(abrt_t)
Chris PeBenito 1b2f08
	policykit_read_lib(abrt_t)
Chris PeBenito 1b2f08
	policykit_read_reload(abrt_t)
Chris PeBenito 1b2f08
')
Chris PeBenito 1b2f08
Chris PeBenito b52122
optional_policy(`
Chris PeBenito b52122
	prelink_exec(abrt_t)
Chris PeBenito b52122
	libs_exec_ld_so(abrt_t)
Chris PeBenito b52122
	corecmd_exec_all_executables(abrt_t)
Chris PeBenito b52122
')
Chris PeBenito b52122
Chris PeBenito 1b2f08
# to install debuginfo packages
Chris PeBenito 1b2f08
optional_policy(`
Chris PeBenito 1b2f08
	rpm_exec(abrt_t)
Chris PeBenito 1b2f08
	rpm_dontaudit_manage_db(abrt_t)
Chris PeBenito 1b2f08
	rpm_manage_cache(abrt_t)
Chris PeBenito 1b2f08
	rpm_manage_pid_files(abrt_t)
Chris PeBenito 1b2f08
	rpm_read_db(abrt_t)
Chris PeBenito 1b2f08
	rpm_signull(abrt_t)
Chris PeBenito e3a90e
')
Chris PeBenito e3a90e
Chris PeBenito e3a90e
# to run mailx plugin
Chris PeBenito e3a90e
optional_policy(`
Chris PeBenito e3a90e
	sendmail_domtrans(abrt_t)
Chris PeBenito e3a90e
')
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
optional_policy(`
Chris PeBenito 1b2f08
	sssd_stream_connect(abrt_t)
Chris PeBenito 1b2f08
')
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
########################################
Chris PeBenito 1b2f08
#
Chris PeBenito 1b2f08
# abrt--helper local policy
Chris PeBenito 1b2f08
#
Chris PeBenito 1b2f08
Chris PeBenito b52122
allow abrt_helper_t self:capability { chown setgid sys_nice };
Chris PeBenito 1b2f08
allow abrt_helper_t self:process signal;
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
read_files_pattern(abrt_helper_t, abrt_etc_t, abrt_etc_t)
Chris PeBenito 1b2f08
Chris PeBenito b52122
files_search_spool(abrt_helper_t)
Chris PeBenito 1b2f08
manage_dirs_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
Chris PeBenito 1b2f08
manage_files_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
Chris PeBenito 1b2f08
manage_lnk_files_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
Chris PeBenito 1b2f08
files_var_filetrans(abrt_helper_t, abrt_var_cache_t, { file dir })
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
read_files_pattern(abrt_helper_t, abrt_var_run_t, abrt_var_run_t)
Chris PeBenito 1b2f08
read_lnk_files_pattern(abrt_helper_t, abrt_var_run_t, abrt_var_run_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
domain_read_all_domains_state(abrt_helper_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
files_read_etc_files(abrt_helper_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
fs_list_inotifyfs(abrt_helper_t)
Chris PeBenito 1b2f08
fs_getattr_all_fs(abrt_helper_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
auth_use_nsswitch(abrt_helper_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
logging_send_syslog_msg(abrt_helper_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
miscfiles_read_localization(abrt_helper_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
term_dontaudit_use_all_ttys(abrt_helper_t)
Chris PeBenito 1b2f08
term_dontaudit_use_all_ptys(abrt_helper_t)
Chris PeBenito 1b2f08
Chris PeBenito 1b2f08
ifdef(`hide_broken_symptoms', `
Chris PeBenito 1b2f08
	userdom_dontaudit_read_user_home_content_files(abrt_helper_t)
Chris PeBenito 1b2f08
	userdom_dontaudit_read_user_tmp_files(abrt_helper_t)
Chris PeBenito 1b2f08
	dev_dontaudit_read_all_blk_files(abrt_helper_t)
Chris PeBenito 1b2f08
	dev_dontaudit_read_all_chr_files(abrt_helper_t)
Chris PeBenito 1b2f08
	dev_dontaudit_write_all_chr_files(abrt_helper_t)
Chris PeBenito 1b2f08
	dev_dontaudit_write_all_blk_files(abrt_helper_t)
Chris PeBenito 1b2f08
	fs_dontaudit_rw_anon_inodefs_files(abrt_helper_t)
Chris PeBenito 1b2f08
')