distcc policy
Here's a policy for distccd, the distributed compiler daemon. Its been in heavy use in Gentoo for a while.
Signature · 8 lines
Chris PeBenito <[email protected]> Developer, Hardened Gentoo Linux Embedded Gentoo Linux Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243 Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243
Index: net_contexts
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux-usr/policy/net_contexts,v retrieving revision 1.5
net_contexts +1 -0
@@ -127,6 +127,7 @@ portcon tcp 7000 system_u:object_r:gatekeeper_port_t ') ifdef(`dictd.te', `portcon tcp 2628 system_u:object_r:dict_port_t') +ifdef(`distcc.te',`portcon tcp 3632 system_u:object_r:distccd_port_t') ifdef(`pxe.te', ` define(`use_pxe') ')
# distcc /usr/bin/distccd system_u:object_r:distccd_exec_t
#DESC distcc - Distributed compiler daemon
#
# Author: Chris PeBenito <[email protected]>
#
daemon_domain(distccd)can_network(distccd_t)tmp_domain(distccd)
type distccd_port_t, port_type;
allow distccd_t distccd_port_t:tcp_socket name_bind; allow distccd_t self:capability { setgid setuid };
# distccd can renice allow distccd_t self:process setsched;
# compiler stuff
allow distccd_t { bin_t sbin_t }:dir { search getattr };
can_exec(distccd_t,bin_t)
can_exec(distccd_t,lib_t)# comm stuff
allow distccd_t resolv_conf_t:file r_file_perms;
allow distccd_t self:{ unix_stream_socket unix_dgram_socket } { create connect read write };
allow distccd_t self:fifo_file { read write getattr };# config access
allow distccd_t { etc_t etc_runtime_t }:file r_file_perms;
allow distccd_t proc_t:file r_file_perms;allow distccd_t var_t:dir search;
allow distccd_t admin_tty_type:chr_file { ioctl read write };
Quoted 2 lines · Chris PeBenito
Here's a policy for distccd, the distributed compiler daemon. Its been in heavy use in Gentoo for a while.
Hi,
I needed the attached patch to make this work.
distcc.te renamed from home/walters/distcc.te +2 -0
@@ -5,6 +5,7 @@ daemon_domain(distccd) can_network(distccd_t) +log_domain(distccd) tmp_domain(distccd) type distccd_port_t, port_type;
@@ -16,6 +17,7 @@ # compiler stuff allow distccd_t { bin_t sbin_t }:dir { search getattr }; +allow distccd_t { bin_t sbin_t }:lnk_file { getattr read }; can_exec(distccd_t,bin_t) can_exec(distccd_t,lib_t)