selinux-policy/refpolicy/policy/modules/services/distcc.te
2005-12-06 19:59:50 +00:00

109 lines
2.7 KiB
Plaintext

policy_module(distcc,1.0.1)
########################################
#
# 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 };
allow distccd_t self:tcp_socket create_stream_socket_perms;
allow distccd_t self:udp_socket create_socket_perms;
allow distccd_t distccd_log_t:file create_file_perms;
logging_create_log(distccd_t,distccd_log_t)
allow distccd_t distccd_tmp_t:dir create_dir_perms;
allow distccd_t distccd_tmp_t:file create_file_perms;
files_create_tmp_files(distccd_t, distccd_tmp_t, { file dir })
allow distccd_t distccd_var_run_t:file create_file_perms;
allow distccd_t distccd_var_run_t:dir rw_dir_perms;
files_create_pid(distccd_t,distccd_var_run_t)
kernel_read_system_state(distccd_t)
kernel_read_kernel_sysctl(distccd_t)
corenet_tcp_sendrecv_all_if(distccd_t)
corenet_udp_sendrecv_all_if(distccd_t)
corenet_raw_sendrecv_all_if(distccd_t)
corenet_tcp_sendrecv_all_nodes(distccd_t)
corenet_udp_sendrecv_all_nodes(distccd_t)
corenet_raw_sendrecv_all_nodes(distccd_t)
corenet_tcp_sendrecv_all_ports(distccd_t)
corenet_udp_sendrecv_all_ports(distccd_t)
corenet_non_ipsec_sendrecv(distccd_t)
corenet_tcp_bind_all_nodes(distccd_t)
corenet_udp_bind_all_nodes(distccd_t)
corenet_tcp_bind_distccd_port(distccd_t)
dev_read_sysfs(distccd_t)
fs_getattr_all_fs(distccd_t)
fs_search_auto_mountpoints(distccd_t)
term_dontaudit_use_console(distccd_t)
corecmd_exec_bin(distccd_t)
corecmd_read_sbin_symlink(distccd_t)
domain_use_wide_inherit_fd(distccd_t)
files_read_etc_files(distccd_t)
files_read_etc_runtime_files(distccd_t)
init_use_fd(distccd_t)
init_use_script_pty(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)
userdom_dontaudit_use_unpriv_user_fd(distccd_t)
userdom_dontaudit_search_sysadm_home_dir(distccd_t)
ifdef(`targeted_policy',`
term_dontaudit_use_unallocated_tty(distccd_t)
term_dontaudit_use_generic_pty(distccd_t)
files_dontaudit_read_root_file(distccd_t)
')
optional_policy(`nis',`
nis_use_ypbind(distccd_t)
')
optional_policy(`selinuxutil',`
seutil_sigchld_newrole(distccd_t)
')
optional_policy(`udev',`
udev_read_db(distccd_t)
')