Chris PeBenito cf6141
Chris PeBenito 5ea24b
policy_module(distcc,1.1.0)
Chris PeBenito cf6141
Chris PeBenito cf6141
########################################
Chris PeBenito cf6141
#
Chris PeBenito cf6141
# Declarations
Chris PeBenito cf6141
#
Chris PeBenito cf6141
Chris PeBenito cf6141
type distccd_t;
Chris PeBenito cf6141
type distccd_exec_t;
Chris PeBenito cf6141
init_daemon_domain(distccd_t,distccd_exec_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
type distccd_log_t;
Chris PeBenito cf6141
logging_log_file(distccd_log_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
type distccd_tmp_t;
Chris PeBenito cf6141
files_tmp_file(distccd_tmp_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
type distccd_var_run_t;
Chris PeBenito cf6141
files_pid_file(distccd_var_run_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
########################################
Chris PeBenito cf6141
#
Chris PeBenito cf6141
# Local policy
Chris PeBenito cf6141
#
Chris PeBenito cf6141
Chris PeBenito cf6141
allow distccd_t self:capability { setgid setuid };
Chris PeBenito cf6141
dontaudit distccd_t self:capability sys_tty_config;
Chris PeBenito cf6141
allow distccd_t self:process { signal_perms setsched };
Chris PeBenito cf6141
allow distccd_t self:fifo_file { read write getattr };
Chris PeBenito cf6141
allow distccd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito cf6141
allow distccd_t self:udp_socket create_socket_perms;
Chris PeBenito cf6141
Chris PeBenito cf6141
allow distccd_t distccd_log_t:file create_file_perms;
Chris PeBenito 1c1ac6
logging_log_filetrans(distccd_t,distccd_log_t,file)
Chris PeBenito cf6141
Chris PeBenito cf6141
allow distccd_t distccd_tmp_t:dir create_dir_perms;
Chris PeBenito cf6141
allow distccd_t distccd_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(distccd_t, distccd_tmp_t, { file dir })
Chris PeBenito cf6141
Chris PeBenito cf6141
allow distccd_t distccd_var_run_t:file create_file_perms;
Chris PeBenito cf6141
allow distccd_t distccd_var_run_t:dir rw_dir_perms;
Chris PeBenito 1c1ac6
files_pid_filetrans(distccd_t,distccd_var_run_t,file)
Chris PeBenito cf6141
Chris PeBenito cf6141
kernel_read_system_state(distccd_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
corenet_tcp_sendrecv_all_if(distccd_t)
Chris PeBenito cf6141
corenet_udp_sendrecv_all_if(distccd_t)
Chris PeBenito cf6141
corenet_raw_sendrecv_all_if(distccd_t)
Chris PeBenito cf6141
corenet_tcp_sendrecv_all_nodes(distccd_t)
Chris PeBenito cf6141
corenet_udp_sendrecv_all_nodes(distccd_t)
Chris PeBenito cf6141
corenet_raw_sendrecv_all_nodes(distccd_t)
Chris PeBenito cf6141
corenet_tcp_sendrecv_all_ports(distccd_t)
Chris PeBenito cf6141
corenet_udp_sendrecv_all_ports(distccd_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(distccd_t)
Chris PeBenito cf6141
corenet_tcp_bind_all_nodes(distccd_t)
Chris PeBenito cf6141
corenet_udp_bind_all_nodes(distccd_t)
Chris PeBenito 34e722
corenet_tcp_bind_distccd_port(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
dev_read_sysfs(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
fs_getattr_all_fs(distccd_t)
Chris PeBenito cf6141
fs_search_auto_mountpoints(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
term_dontaudit_use_console(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
corecmd_exec_bin(distccd_t)
Chris PeBenito 1815ba
corecmd_read_sbin_symlinks(distccd_t)
Chris PeBenito cf6141
Chris PeBenito 15722e
domain_use_interactive_fds(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
files_read_etc_files(distccd_t)
Chris PeBenito cf6141
files_read_etc_runtime_files(distccd_t)
Chris PeBenito cf6141
Chris PeBenito 1c1ac6
init_use_fds(distccd_t)
Chris PeBenito 1815ba
init_use_script_ptys(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
libs_use_ld_so(distccd_t)
Chris PeBenito cf6141
libs_use_shared_libs(distccd_t)
Chris PeBenito cf6141
libs_exec_lib_files(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
logging_send_syslog_msg(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
miscfiles_read_localization(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
sysnet_read_config(distccd_t)
Chris PeBenito cf6141
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(distccd_t)
Chris PeBenito 103fe2
userdom_dontaudit_search_sysadm_home_dirs(distccd_t)
Chris PeBenito cf6141
Chris PeBenito cf6141
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(distccd_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(distccd_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(distccd_t)
Chris PeBenito cf6141
')
Chris PeBenito cf6141
Chris PeBenito 132880
optional_policy(`nis',`
Chris PeBenito cf6141
	nis_use_ypbind(distccd_t)
Chris PeBenito cf6141
')
Chris PeBenito cf6141
Chris PeBenito 132880
optional_policy(`selinuxutil',`
Chris PeBenito cf6141
	seutil_sigchld_newrole(distccd_t)
Chris PeBenito cf6141
')
Chris PeBenito cf6141
Chris PeBenito 132880
optional_policy(`udev',`
Chris PeBenito cf6141
	udev_read_db(distccd_t)
Chris PeBenito cf6141
')