selinux-policy/policy/modules/services/setroubleshoot.te
2006-09-06 16:36:23 +00:00

110 lines
3.5 KiB
Plaintext

policy_module(setroubleshoot,1.0.1)
########################################
#
# 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 };
allow setroubleshootd_t self:process { signal getattr };
allow setroubleshootd_t self:fifo_file rw_file_perms;
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;
allow setroubleshootd_t self:netlink_route_socket r_netlink_socket_perms;
# database files
allow setroubleshootd_t setroubleshoot_var_lib_t:file create_file_perms;
allow setroubleshootd_t setroubleshoot_var_lib_t:dir { rw_dir_perms setattr };
files_var_lib_filetrans(setroubleshootd_t,setroubleshoot_var_lib_t,{ file dir })
# log files
allow setroubleshootd_t setroubleshoot_var_log_t:file manage_file_perms;
allow setroubleshootd_t setroubleshoot_var_log_t:sock_file manage_file_perms;
allow setroubleshootd_t setroubleshoot_var_log_t:dir { rw_dir_perms setattr };
logging_log_filetrans(setroubleshootd_t,setroubleshoot_var_log_t,{ file dir })
# pid file
allow setroubleshootd_t setroubleshoot_var_run_t:file manage_file_perms;
allow setroubleshootd_t setroubleshoot_var_run_t:sock_file manage_file_perms;
allow setroubleshootd_t setroubleshoot_var_run_t:dir rw_dir_perms;
files_pid_filetrans(setroubleshootd_t,setroubleshoot_var_run_t, { file sock_file })
kernel_read_kernel_sysctls(setroubleshootd_t)
kernel_read_system_state(setroubleshootd_t)
corecmd_exec_sbin(setroubleshootd_t)
corecmd_exec_bin(setroubleshootd_t)
corecmd_exec_shell(setroubleshootd_t)
corenet_non_ipsec_sendrecv(setroubleshootd_t)
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)
files_read_usr_files(setroubleshootd_t)
files_read_etc_files(setroubleshootd_t)
files_getattr_all_dirs(setroubleshootd_t)
selinux_get_enforce_mode(setroubleshootd_t)
term_dontaudit_use_console(setroubleshootd_t)
term_dontaudit_use_all_user_ptys(setroubleshootd_t)
term_dontaudit_use_all_user_ttys(setroubleshootd_t)
init_read_utmp(setroubleshootd_t)
init_dontaudit_write_utmp(setroubleshootd_t)
init_use_fds(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)
sysnet_read_config(setroubleshootd_t)
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)
')