2005-08-11 15:17:13 +00:00
|
|
|
|
|
|
|
policy_module(tcpd,1.0)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
type tcpd_t;
|
|
|
|
type tcpd_exec_t;
|
|
|
|
inetd_tcp_service_domain(tcpd_t,tcpd_exec_t)
|
|
|
|
role system_r types tcpd_t;
|
|
|
|
|
|
|
|
type tcpd_tmp_t;
|
|
|
|
files_tmp_file(tcpd_tmp_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
allow tcpd_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
allow tcpd_t tcpd_tmp_t:dir create_dir_perms;
|
|
|
|
allow tcpd_t tcpd_tmp_t:file create_file_perms;
|
|
|
|
files_create_tmp_files(tcpd_t, tcpd_tmp_t, { file dir })
|
|
|
|
|
|
|
|
corenet_raw_sendrecv_all_if(tcpd_t)
|
|
|
|
corenet_tcp_sendrecv_all_if(tcpd_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(tcpd_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(tcpd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(tcpd_t)
|
|
|
|
corenet_tcp_bind_all_nodes(tcpd_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(tcpd_t)
|
|
|
|
|
|
|
|
# Run other daemons in the inetd child domain.
|
|
|
|
corecmd_search_bin(tcpd_t)
|
|
|
|
corecmd_search_sbin(tcpd_t)
|
|
|
|
|
|
|
|
files_read_etc_files(tcpd_t)
|
|
|
|
# no good reason for files_dontaudit_search_var, probably nscd
|
|
|
|
files_dontaudit_search_var(tcpd_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(tcpd_t)
|
|
|
|
libs_use_shared_libs(tcpd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(tcpd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(tcpd_t)
|
|
|
|
|
|
|
|
sysnet_read_config(tcpd_t)
|
|
|
|
|
|
|
|
inetd_domtrans_child(tcpd_t)
|
|
|
|
|
2005-10-07 21:45:04 +00:00
|
|
|
optional_policy(`finger.te',`
|
|
|
|
finger_domtrans(tcpd_t)
|
|
|
|
')
|
|
|
|
|
2005-08-11 15:17:13 +00:00
|
|
|
optional_policy(`nis.te',`
|
|
|
|
nis_use_ypbind(tcpd_t)
|
|
|
|
')
|
2005-08-17 15:23:24 +00:00
|
|
|
|
2005-09-08 17:12:38 +00:00
|
|
|
optional_policy(`portmap.te',`
|
|
|
|
portmap_udp_sendto(tcpd_t)
|
|
|
|
')
|
|
|
|
|
2005-09-20 17:11:53 +00:00
|
|
|
optional_policy(`rlogin.te',`
|
|
|
|
rlogin_domtrans(tcpd_t)
|
|
|
|
')
|
|
|
|
|
2005-08-17 15:23:24 +00:00
|
|
|
optional_policy(`rshd.te',`
|
2005-09-08 17:12:38 +00:00
|
|
|
rshd_domtrans(tcpd_t)
|
2005-08-17 15:23:24 +00:00
|
|
|
')
|