Chris PeBenito 4fd520
Chris PeBenito 3d03a4
policy_module(telnet,1.1.1)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
########################################
Chris PeBenito 4fd520
#
Chris PeBenito 4fd520
# Declarations
Chris PeBenito 4fd520
#
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type telnetd_t;
Chris PeBenito 4fd520
type telnetd_exec_t;
Chris PeBenito 4fd520
inetd_service_domain(telnetd_t,telnetd_exec_t)
Chris PeBenito 4fd520
role system_r types telnetd_t;
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type telnetd_devpts_t; #, userpty_type;
Chris PeBenito 4fd520
term_login_pty(telnetd_devpts_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type telnetd_tmp_t;
Chris PeBenito 4fd520
files_tmp_file(telnetd_tmp_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type telnetd_var_run_t;
Chris PeBenito 4fd520
files_pid_file(telnetd_var_run_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
########################################
Chris PeBenito 4fd520
#
Chris PeBenito 4fd520
# Local policy
Chris PeBenito 4fd520
#
Chris PeBenito 4fd520
Chris PeBenito 4fd520
allow telnetd_t self:capability { fsetid chown fowner sys_tty_config dac_override };
Chris PeBenito 4fd520
allow telnetd_t self:process signal_perms;
Chris PeBenito 4fd520
allow telnetd_t self:fifo_file rw_file_perms;
Chris PeBenito 4fd520
allow telnetd_t self:tcp_socket connected_stream_socket_perms;
Chris PeBenito 35adb6
allow telnetd_t self:udp_socket create_socket_perms;
Chris PeBenito 4fd520
# for identd; cjp: this should probably only be inetd_child rules?
Chris PeBenito 4fd520
allow telnetd_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
Chris PeBenito 4fd520
allow telnetd_t self:capability { setuid setgid };
Chris PeBenito 4fd520
Chris PeBenito 4fd520
allow telnetd_t telnetd_devpts_t:chr_file { rw_file_perms setattr };
Chris PeBenito 628417
term_create_pty(telnetd_t,telnetd_devpts_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
allow telnetd_t telnetd_tmp_t:dir create_dir_perms;
Chris PeBenito 4fd520
allow telnetd_t telnetd_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(telnetd_t, telnetd_tmp_t, { file dir })
Chris PeBenito 4fd520
Chris PeBenito 4fd520
allow telnetd_t telnetd_var_run_t:file create_file_perms;
Chris PeBenito 6ff85b
allow telnetd_t telnetd_var_run_t:dir rw_dir_perms;
Chris PeBenito 1c1ac6
files_pid_filetrans(telnetd_t,telnetd_var_run_t,file)
Chris PeBenito 4fd520
Chris PeBenito 445522
kernel_read_kernel_sysctls(telnetd_t)
Chris PeBenito 4fd520
kernel_read_system_state(telnetd_t)
Chris PeBenito 4fd520
kernel_read_network_state(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 3d03a4
corenet_non_ipsec_sendrecv(telnetd_t)
Chris PeBenito 4fd520
corenet_tcp_sendrecv_all_if(telnetd_t)
Chris PeBenito 4fd520
corenet_udp_sendrecv_all_if(telnetd_t)
Chris PeBenito 4fd520
corenet_tcp_sendrecv_all_nodes(telnetd_t)
Chris PeBenito 4fd520
corenet_udp_sendrecv_all_nodes(telnetd_t)
Chris PeBenito 4fd520
corenet_tcp_sendrecv_all_ports(telnetd_t)
Chris PeBenito 4fd520
corenet_udp_sendrecv_all_ports(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
dev_read_urand(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
fs_getattr_xattr_fs(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
auth_rw_login_records(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 628417
corecmd_search_sbin(telnetd_t)
Chris PeBenito 628417
Chris PeBenito 4fd520
files_read_etc_files(telnetd_t)
Chris PeBenito 4fd520
files_read_etc_runtime_files(telnetd_t)
Chris PeBenito 4fd520
# for identd; cjp: this should probably only be inetd_child rules?
Chris PeBenito 4fd520
files_search_home(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 68228b
init_rw_utmp(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
libs_use_ld_so(telnetd_t)
Chris PeBenito 4fd520
libs_use_shared_libs(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
logging_send_syslog_msg(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
miscfiles_read_localization(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
seutil_dontaudit_search_config(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
sysnet_read_config(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
remotelogin_domtrans(telnetd_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
# for identd; cjp: this should probably only be inetd_child rules?
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 4fd520
	kerberos_use(telnetd_t)
Chris PeBenito 4fd520
')
Chris PeBenito 4fd520
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 4fd520
	nis_use_ypbind(telnetd_t)
Chris PeBenito 4fd520
')
Chris PeBenito 4fd520
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 1815ba
	nscd_socket_use(telnetd_t)
Chris PeBenito 4fd520
')
Chris PeBenito 4fd520
Chris PeBenito 4fd520
ifdef(`TODO',`
Chris PeBenito 4fd520
# Allow krb5 telnetd to use fork and open /dev/tty for use
Chris PeBenito 4fd520
allow telnetd_t userpty_type:chr_file setattr;
Chris PeBenito 4fd520
')