2005-09-20 17:11:53 +00:00
|
|
|
|
2005-12-09 16:38:39 +00:00
|
|
|
policy_module(telnet,1.1.0)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type telnetd_t;
|
|
|
|
type telnetd_exec_t;
|
|
|
|
inetd_service_domain(telnetd_t,telnetd_exec_t)
|
|
|
|
role system_r types telnetd_t;
|
|
|
|
|
|
|
|
type telnetd_devpts_t; #, userpty_type;
|
|
|
|
term_login_pty(telnetd_devpts_t)
|
|
|
|
|
|
|
|
type telnetd_tmp_t;
|
|
|
|
files_tmp_file(telnetd_tmp_t)
|
|
|
|
|
|
|
|
type telnetd_var_run_t;
|
|
|
|
files_pid_file(telnetd_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow telnetd_t self:capability { fsetid chown fowner sys_tty_config dac_override };
|
|
|
|
allow telnetd_t self:process signal_perms;
|
|
|
|
allow telnetd_t self:fifo_file rw_file_perms;
|
|
|
|
allow telnetd_t self:tcp_socket connected_stream_socket_perms;
|
2005-11-01 15:57:15 +00:00
|
|
|
allow telnetd_t self:udp_socket create_socket_perms;
|
2005-09-20 17:11:53 +00:00
|
|
|
# for identd; cjp: this should probably only be inetd_child rules?
|
|
|
|
allow telnetd_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
|
|
allow telnetd_t self:capability { setuid setgid };
|
|
|
|
|
|
|
|
allow telnetd_t telnetd_devpts_t:chr_file { rw_file_perms setattr };
|
2005-10-31 14:55:34 +00:00
|
|
|
term_create_pty(telnetd_t,telnetd_devpts_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
allow telnetd_t telnetd_tmp_t:dir create_dir_perms;
|
|
|
|
allow telnetd_t telnetd_tmp_t:file create_file_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_tmp(telnetd_t, telnetd_tmp_t, { file dir })
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
allow telnetd_t telnetd_var_run_t:file create_file_perms;
|
2005-10-31 19:31:22 +00:00
|
|
|
allow telnetd_t telnetd_var_run_t:dir rw_dir_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_pid(telnetd_t,telnetd_var_run_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctl(telnetd_t)
|
|
|
|
kernel_read_system_state(telnetd_t)
|
|
|
|
kernel_read_network_state(telnetd_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(telnetd_t)
|
|
|
|
corenet_udp_sendrecv_all_if(telnetd_t)
|
|
|
|
corenet_raw_sendrecv_all_if(telnetd_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(telnetd_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(telnetd_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(telnetd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(telnetd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(telnetd_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
corenet_tcp_bind_all_nodes(telnetd_t)
|
|
|
|
corenet_udp_bind_all_nodes(telnetd_t)
|
|
|
|
|
|
|
|
dev_read_urand(telnetd_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(telnetd_t)
|
|
|
|
|
|
|
|
auth_rw_login_records(telnetd_t)
|
|
|
|
|
2005-10-31 14:55:34 +00:00
|
|
|
corecmd_search_sbin(telnetd_t)
|
|
|
|
|
2005-09-20 17:11:53 +00:00
|
|
|
files_read_etc_files(telnetd_t)
|
|
|
|
files_read_etc_runtime_files(telnetd_t)
|
|
|
|
# for identd; cjp: this should probably only be inetd_child rules?
|
|
|
|
files_search_home(telnetd_t)
|
|
|
|
|
2006-01-18 18:08:39 +00:00
|
|
|
init_rw_utmp(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(telnetd_t)
|
|
|
|
libs_use_shared_libs(telnetd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(telnetd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(telnetd_t)
|
|
|
|
|
|
|
|
seutil_dontaudit_search_config(telnetd_t)
|
|
|
|
|
|
|
|
sysnet_read_config(telnetd_t)
|
|
|
|
|
|
|
|
remotelogin_domtrans(telnetd_t)
|
|
|
|
|
|
|
|
# for identd; cjp: this should probably only be inetd_child rules?
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`kerberos',`
|
2005-09-20 17:11:53 +00:00
|
|
|
kerberos_use(telnetd_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nis',`
|
2005-09-20 17:11:53 +00:00
|
|
|
nis_use_ypbind(telnetd_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2005-09-20 17:11:53 +00:00
|
|
|
nscd_use_socket(telnetd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`TODO',`
|
|
|
|
# Allow krb5 telnetd to use fork and open /dev/tty for use
|
|
|
|
allow telnetd_t userpty_type:chr_file setattr;
|
|
|
|
')
|