2006-09-01 15:52:05 +00:00
|
|
|
|
2007-09-28 13:58:24 +00:00
|
|
|
policy_module(setroubleshoot,1.5.0)
|
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;
|
|
|
|
manage_files_pattern(setroubleshootd_t,setroubleshoot_var_lib_t,setroubleshoot_var_lib_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
files_var_lib_filetrans(setroubleshootd_t,setroubleshoot_var_lib_t,{ file dir })
|
|
|
|
|
|
|
|
# log files
|
2006-12-12 20:08:08 +00:00
|
|
|
allow setroubleshootd_t setroubleshoot_var_log_t:dir setattr;
|
|
|
|
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)
|
2006-09-01 15:52:05 +00:00
|
|
|
logging_log_filetrans(setroubleshootd_t,setroubleshoot_var_log_t,{ file dir })
|
|
|
|
|
|
|
|
# pid file
|
2006-12-12 20:08:08 +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)
|
2006-09-01 15:52:05 +00:00
|
|
|
files_pid_filetrans(setroubleshootd_t,setroubleshoot_var_run_t, { file sock_file })
|
|
|
|
|
|
|
|
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)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(setroubleshootd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(setroubleshootd_t)
|
|
|
|
corenet_tcp_bind_all_nodes(setroubleshootd_t)
|
|
|
|
corenet_tcp_connect_smtp_port(setroubleshootd_t)
|
|
|
|
corenet_sendrecv_smtp_client_packets(setroubleshootd_t)
|
|
|
|
|
|
|
|
dev_read_urand(setroubleshootd_t)
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
libs_use_ld_so(setroubleshootd_t)
|
|
|
|
libs_use_shared_libs(setroubleshootd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(setroubleshootd_t)
|
|
|
|
|
|
|
|
locallogin_dontaudit_use_fds(setroubleshootd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(setroubleshootd_t)
|
|
|
|
logging_stream_connect_auditd(setroubleshootd_t)
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
2007-03-06 17:16:08 +00:00
|
|
|
userdom_dontaudit_read_sysadm_home_content_files(setroubleshootd_t)
|
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
term_dontaudit_use_generic_ptys(setroubleshootd_t)
|
|
|
|
term_dontaudit_use_unallocated_ttys(setroubleshootd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
rpm_read_db(setroubleshootd_t)
|
|
|
|
rpm_dontaudit_manage_db(setroubleshootd_t)
|
|
|
|
rpm_use_script_fds(setroubleshootd_t)
|
|
|
|
')
|