1900668638
The latest revision of the labeled policy patches which enable both labeled and unlabeled policy support for NetLabel. This revision takes into account Chris' feedback from the first version and reduces the number of interface calls in each domain down to two at present: one for unlabeled access, one for NetLabel access. The older, transport layer specific interfaces, are still present for use by third-party modules but are not used in the default policy modules. trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore. This patch changes the policy to use the netmsg initial SID as the "base" SID/context for NetLabel packets which only have MLS security attributes. Currently we use the unlabeled initial SID which makes it very difficult to distinquish between actual unlabeled packets and those packets which have MLS security attributes.
119 lines
3.8 KiB
Plaintext
119 lines
3.8 KiB
Plaintext
|
|
policy_module(setroubleshoot,1.3.2)
|
|
|
|
########################################
|
|
#
|
|
# 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 { signull signal getattr getsched };
|
|
allow setroubleshootd_t self:fifo_file rw_fifo_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:dir setattr;
|
|
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 })
|
|
|
|
# log files
|
|
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)
|
|
logging_log_filetrans(setroubleshootd_t,setroubleshoot_var_log_t,{ file dir })
|
|
|
|
# pid file
|
|
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)
|
|
files_pid_filetrans(setroubleshootd_t,setroubleshoot_var_run_t, { file sock_file })
|
|
|
|
kernel_read_kernel_sysctls(setroubleshootd_t)
|
|
kernel_read_system_state(setroubleshootd_t)
|
|
kernel_read_network_state(setroubleshootd_t)
|
|
|
|
corecmd_exec_bin(setroubleshootd_t)
|
|
corecmd_exec_shell(setroubleshootd_t)
|
|
|
|
corenet_all_recvfrom_unlabeled(setroubleshootd_t)
|
|
corenet_all_recvfrom_netlabel(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)
|
|
|
|
domain_dontaudit_search_all_domains_state(setroubleshootd_t)
|
|
|
|
files_read_usr_files(setroubleshootd_t)
|
|
files_read_etc_files(setroubleshootd_t)
|
|
files_getattr_all_dirs(setroubleshootd_t)
|
|
files_getattr_all_files(setroubleshootd_t)
|
|
|
|
selinux_get_enforce_mode(setroubleshootd_t)
|
|
selinux_validate_context(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)
|
|
|
|
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)
|
|
seutil_read_file_contexts(setroubleshootd_t)
|
|
|
|
sysnet_read_config(setroubleshootd_t)
|
|
|
|
userdom_dontaudit_read_sysadm_home_content_files(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)
|
|
')
|
|
|
|
optional_policy(`
|
|
nis_use_ypbind(setroubleshootd_t)
|
|
')
|