2020-02-29 21:54:39 +00:00
|
|
|
policy_module(distcc, 1.13.0)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type distccd_t;
|
|
|
|
type distccd_exec_t;
|
|
|
|
init_daemon_domain(distccd_t, distccd_exec_t)
|
|
|
|
|
|
|
|
type distccd_initrc_exec_t;
|
|
|
|
init_script_file(distccd_initrc_exec_t)
|
|
|
|
|
|
|
|
type distccd_log_t;
|
|
|
|
logging_log_file(distccd_log_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type distccd_runtime_t alias distccd_var_run_t;
|
|
|
|
files_pid_file(distccd_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type distccd_tmp_t;
|
|
|
|
files_tmp_file(distccd_tmp_t)
|
|
|
|
|
2018-06-23 13:00:56 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# 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 rw_fifo_file_perms;
|
|
|
|
allow distccd_t self:tcp_socket { accept listen };
|
|
|
|
|
|
|
|
allow distccd_t distccd_log_t:file append_file_perms;
|
|
|
|
allow distccd_t distccd_log_t:file create_file_perms;
|
|
|
|
allow distccd_t distccd_log_t:file setattr_file_perms;
|
|
|
|
logging_log_filetrans(distccd_t, distccd_log_t, file)
|
|
|
|
|
|
|
|
manage_dirs_pattern(distccd_t, distccd_tmp_t, distccd_tmp_t)
|
|
|
|
manage_files_pattern(distccd_t, distccd_tmp_t, distccd_tmp_t)
|
|
|
|
files_tmp_filetrans(distccd_t, distccd_tmp_t, { file dir })
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_files_pattern(distccd_t, distccd_runtime_t, distccd_runtime_t)
|
|
|
|
files_pid_filetrans(distccd_t, distccd_runtime_t, file)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(distccd_t)
|
|
|
|
kernel_read_kernel_sysctls(distccd_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_netlabel(distccd_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(distccd_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(distccd_t)
|
|
|
|
corenet_tcp_bind_generic_node(distccd_t)
|
|
|
|
|
|
|
|
corenet_sendrecv_distccd_server_packets(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)
|
|
|
|
|
|
|
|
corecmd_exec_bin(distccd_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(distccd_t)
|
|
|
|
|
|
|
|
files_read_etc_runtime_files(distccd_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(distccd_t)
|
|
|
|
|
|
|
|
libs_exec_lib_files(distccd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(distccd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(distccd_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(distccd_t)
|
|
|
|
userdom_dontaudit_search_user_home_dirs(distccd_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
seutil_sigchld_newrole(distccd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(distccd_t)
|
|
|
|
')
|