2010-05-24 19:32:01 +00:00
|
|
|
policy_module(telnet, 1.10.0)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type telnetd_t;
|
|
|
|
type telnetd_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
inetd_service_domain(telnetd_t, telnetd_exec_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
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;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow telnetd_t self:fifo_file rw_fifo_file_perms;
|
2005-09-20 17:11:53 +00:00
|
|
|
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 };
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow telnetd_t telnetd_devpts_t:chr_file { rw_chr_file_perms setattr };
|
2008-07-23 21:38:39 +00:00
|
|
|
term_create_pty(telnetd_t, telnetd_devpts_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(telnetd_t, telnetd_tmp_t, telnetd_tmp_t)
|
|
|
|
manage_files_pattern(telnetd_t, telnetd_tmp_t, telnetd_tmp_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(telnetd_t, telnetd_var_run_t, telnetd_var_run_t)
|
|
|
|
files_pid_filetrans(telnetd_t, telnetd_var_run_t, file)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
kernel_read_system_state(telnetd_t)
|
|
|
|
kernel_read_network_state(telnetd_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(telnetd_t)
|
|
|
|
corenet_all_recvfrom_netlabel(telnetd_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(telnetd_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(telnetd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(telnetd_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(telnetd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(telnetd_t)
|
|
|
|
|
|
|
|
dev_read_urand(telnetd_t)
|
|
|
|
|
2008-04-04 17:08:34 +00:00
|
|
|
domain_interactive_fd(telnetd_t)
|
|
|
|
|
2005-09-20 17:11:53 +00:00
|
|
|
fs_getattr_xattr_fs(telnetd_t)
|
|
|
|
|
|
|
|
auth_rw_login_records(telnetd_t)
|
2007-12-04 15:05:55 +00:00
|
|
|
auth_use_nsswitch(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin(telnetd_t)
|
2005-10-31 14:55:34 +00:00
|
|
|
|
2008-04-04 17:08:34 +00:00
|
|
|
files_read_usr_files(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
|
|
|
|
|
|
|
logging_send_syslog_msg(telnetd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(telnetd_t)
|
|
|
|
|
2008-04-04 17:08:34 +00:00
|
|
|
seutil_read_config(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
remotelogin_domtrans(telnetd_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_search_user_home_dirs(telnetd_t)
|
2010-03-22 14:40:37 +00:00
|
|
|
userdom_setattr_user_ptys(telnetd_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_manage_user_tmp_files(telnetd_t)
|
|
|
|
userdom_tmp_filetrans_user_tmp(telnetd_t, file)
|
2008-04-04 17:08:34 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2009-02-11 19:28:30 +00:00
|
|
|
kerberos_keytab_template(telnetd, telnetd_t)
|
|
|
|
kerberos_manage_host_rcache(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
')
|
|
|
|
|
2008-04-04 17:08:34 +00:00
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_search_nfs(telnetd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_search_cifs(telnetd_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
')
|