2005-10-21 13:11:17 +00:00
|
|
|
|
2007-06-20 20:08:26 +00:00
|
|
|
policy_module(distcc,1.3.1)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type distccd_t;
|
|
|
|
type distccd_exec_t;
|
|
|
|
init_daemon_domain(distccd_t,distccd_exec_t)
|
|
|
|
|
|
|
|
type distccd_log_t;
|
|
|
|
logging_log_file(distccd_log_t)
|
|
|
|
|
|
|
|
type distccd_tmp_t;
|
|
|
|
files_tmp_file(distccd_tmp_t)
|
|
|
|
|
|
|
|
type distccd_var_run_t;
|
|
|
|
files_pid_file(distccd_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow distccd_t self:capability { setgid setuid };
|
|
|
|
dontaudit distccd_t self:capability sys_tty_config;
|
|
|
|
allow distccd_t self:process { signal_perms setsched };
|
|
|
|
allow distccd_t self:fifo_file { read write getattr };
|
2007-06-20 20:08:26 +00:00
|
|
|
allow distccd_t self:netlink_route_socket r_netlink_socket_perms;
|
2005-10-21 13:11:17 +00:00
|
|
|
allow distccd_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow distccd_t self:udp_socket create_socket_perms;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow distccd_t distccd_log_t:file manage_file_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
logging_log_filetrans(distccd_t,distccd_log_t,file)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern(distccd_t,distccd_tmp_t,distccd_tmp_t)
|
|
|
|
manage_files_pattern(distccd_t,distccd_tmp_t,distccd_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(distccd_t, distccd_tmp_t, { file dir })
|
2005-10-21 13:11:17 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_files_pattern(distccd_t,distccd_var_run_t,distccd_var_run_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(distccd_t,distccd_var_run_t,file)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(distccd_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(distccd_t)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_non_ipsec_sendrecv(distccd_t)
|
2005-10-21 13:11:17 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(distccd_t)
|
|
|
|
corenet_udp_sendrecv_all_if(distccd_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(distccd_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(distccd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(distccd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(distccd_t)
|
|
|
|
corenet_tcp_bind_all_nodes(distccd_t)
|
2005-10-24 14:15:29 +00:00
|
|
|
corenet_tcp_bind_distccd_port(distccd_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_distccd_server_packets(distccd_t)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(distccd_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(distccd_t)
|
|
|
|
fs_search_auto_mountpoints(distccd_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(distccd_t)
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_read_bin_symlinks(distccd_t)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(distccd_t)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
|
|
|
files_read_etc_files(distccd_t)
|
|
|
|
files_read_etc_runtime_files(distccd_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(distccd_t)
|
|
|
|
libs_use_shared_libs(distccd_t)
|
|
|
|
libs_exec_lib_files(distccd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(distccd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(distccd_t)
|
|
|
|
|
|
|
|
sysnet_read_config(distccd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(distccd_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(distccd_t)
|
2005-10-21 13:11:17 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(distccd_t)
|
|
|
|
term_dontaudit_use_generic_ptys(distccd_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(distccd_t)
|
2005-10-21 13:11:17 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 13:11:17 +00:00
|
|
|
nis_use_ypbind(distccd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 13:11:17 +00:00
|
|
|
seutil_sigchld_newrole(distccd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 13:11:17 +00:00
|
|
|
udev_read_db(distccd_t)
|
|
|
|
')
|