2006-09-01 15:52:05 +00:00
|
|
|
|
2009-01-09 19:48:02 +00:00
|
|
|
policy_module(setroubleshoot, 1.9.1)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type setroubleshootd_t alias setroubleshoot_t;
|
|
|
|
type setroubleshootd_exec_t;
|
|
|
|
domain_type(setroubleshootd_t)
|
|
|
|
init_daemon_domain(setroubleshootd_t, setroubleshootd_exec_t)
|
|
|
|
|
|
|
|
type setroubleshoot_var_lib_t;
|
|
|
|
files_type(setroubleshoot_var_lib_t)
|
|
|
|
|
|
|
|
# log files
|
|
|
|
type setroubleshoot_var_log_t;
|
|
|
|
logging_log_file(setroubleshoot_var_log_t)
|
|
|
|
|
|
|
|
# pid files
|
|
|
|
type setroubleshoot_var_run_t;
|
|
|
|
files_pid_file(setroubleshoot_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# setroubleshootd local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow setroubleshootd_t self:capability { dac_override sys_tty_config };
|
2007-06-11 14:09:09 +00:00
|
|
|
allow setroubleshootd_t self:process { signull signal getattr getsched };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow setroubleshootd_t self:fifo_file rw_fifo_file_perms;
|
2006-09-01 15:52:05 +00:00
|
|
|
allow setroubleshootd_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow setroubleshootd_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
|
|
allow setroubleshootd_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
|
|
|
|
# database files
|
2006-12-12 20:08:08 +00:00
|
|
|
allow setroubleshootd_t setroubleshoot_var_lib_t:dir setattr;
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(setroubleshootd_t, setroubleshoot_var_lib_t, setroubleshoot_var_lib_t)
|
|
|
|
files_var_lib_filetrans(setroubleshootd_t, setroubleshoot_var_lib_t, { file dir })
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
# log files
|
2006-12-12 20:08:08 +00:00
|
|
|
allow setroubleshootd_t setroubleshoot_var_log_t:dir setattr;
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(setroubleshootd_t, setroubleshoot_var_log_t, setroubleshoot_var_log_t)
|
|
|
|
manage_sock_files_pattern(setroubleshootd_t, setroubleshoot_var_log_t, setroubleshoot_var_log_t)
|
|
|
|
logging_log_filetrans(setroubleshootd_t, setroubleshoot_var_log_t, { file dir })
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
# pid file
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(setroubleshootd_t, setroubleshoot_var_run_t, setroubleshoot_var_run_t)
|
|
|
|
manage_sock_files_pattern(setroubleshootd_t, setroubleshoot_var_run_t, setroubleshoot_var_run_t)
|
2009-06-26 14:40:13 +00:00
|
|
|
files_pid_filetrans(setroubleshootd_t, setroubleshoot_var_run_t, { file sock_file })
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctls(setroubleshootd_t)
|
|
|
|
kernel_read_system_state(setroubleshootd_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
kernel_read_network_state(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
corecmd_exec_bin(setroubleshootd_t)
|
|
|
|
corecmd_exec_shell(setroubleshootd_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(setroubleshootd_t)
|
|
|
|
corenet_all_recvfrom_netlabel(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(setroubleshootd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(setroubleshootd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
corenet_tcp_connect_smtp_port(setroubleshootd_t)
|
|
|
|
corenet_sendrecv_smtp_client_packets(setroubleshootd_t)
|
|
|
|
|
|
|
|
dev_read_urand(setroubleshootd_t)
|
2007-10-11 18:12:29 +00:00
|
|
|
dev_read_sysfs(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
2006-09-22 17:14:35 +00:00
|
|
|
domain_dontaudit_search_all_domains_state(setroubleshootd_t)
|
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
files_read_usr_files(setroubleshootd_t)
|
|
|
|
files_read_etc_files(setroubleshootd_t)
|
|
|
|
files_getattr_all_dirs(setroubleshootd_t)
|
2007-03-06 17:16:08 +00:00
|
|
|
files_getattr_all_files(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
2007-09-04 18:57:58 +00:00
|
|
|
fs_getattr_all_dirs(setroubleshootd_t)
|
|
|
|
fs_getattr_all_files(setroubleshootd_t)
|
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
selinux_get_enforce_mode(setroubleshootd_t)
|
2007-03-06 17:16:08 +00:00
|
|
|
selinux_validate_context(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
term_dontaudit_use_all_user_ptys(setroubleshootd_t)
|
|
|
|
term_dontaudit_use_all_user_ttys(setroubleshootd_t)
|
|
|
|
|
2007-09-04 18:57:58 +00:00
|
|
|
auth_use_nsswitch(setroubleshootd_t)
|
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
init_read_utmp(setroubleshootd_t)
|
|
|
|
init_dontaudit_write_utmp(setroubleshootd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(setroubleshootd_t)
|
|
|
|
|
|
|
|
locallogin_dontaudit_use_fds(setroubleshootd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(setroubleshootd_t)
|
2008-08-22 15:17:01 +00:00
|
|
|
logging_stream_connect_dispatcher(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
seutil_read_config(setroubleshootd_t)
|
2007-03-06 17:16:08 +00:00
|
|
|
seutil_read_file_contexts(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
|
|
|
sysnet_read_config(setroubleshootd_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_read_user_home_content_files(setroubleshootd_t)
|
2007-03-06 17:16:08 +00:00
|
|
|
|
2007-10-11 18:12:29 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
dbus_system_bus_client(setroubleshootd_t)
|
2007-10-11 18:12:29 +00:00
|
|
|
dbus_connect_system_bus(setroubleshootd_t)
|
|
|
|
')
|
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
optional_policy(`
|
|
|
|
rpm_read_db(setroubleshootd_t)
|
|
|
|
rpm_dontaudit_manage_db(setroubleshootd_t)
|
2008-12-03 18:33:19 +00:00
|
|
|
rpm_use_script_fds(setroubleshootd_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
')
|