|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0251df |
policy_module(telnet,1.4.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type telnetd_t;
|
|
Chris PeBenito |
17de1b |
type telnetd_exec_t;
|
|
Chris PeBenito |
17de1b |
inetd_service_domain(telnetd_t,telnetd_exec_t)
|
|
Chris PeBenito |
17de1b |
role system_r types telnetd_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type telnetd_devpts_t; #, userpty_type;
|
|
Chris PeBenito |
17de1b |
term_login_pty(telnetd_devpts_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type telnetd_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(telnetd_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type telnetd_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(telnetd_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow telnetd_t self:capability { fsetid chown fowner sys_tty_config dac_override };
|
|
Chris PeBenito |
17de1b |
allow telnetd_t self:process signal_perms;
|
|
Chris PeBenito |
c0868a |
allow telnetd_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
17de1b |
allow telnetd_t self:tcp_socket connected_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow telnetd_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
# for identd; cjp: this should probably only be inetd_child rules?
|
|
Chris PeBenito |
17de1b |
allow telnetd_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
d6d16b |
allow telnetd_t self:netlink_route_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow telnetd_t self:capability { setuid setgid };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow telnetd_t telnetd_devpts_t:chr_file { rw_chr_file_perms setattr };
|
|
Chris PeBenito |
17de1b |
term_create_pty(telnetd_t,telnetd_devpts_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern(telnetd_t,telnetd_tmp_t,telnetd_tmp_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(telnetd_t,telnetd_tmp_t,telnetd_tmp_t)
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(telnetd_t, telnetd_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(telnetd_t,telnetd_var_run_t,telnetd_var_run_t)
|
|
Chris PeBenito |
17de1b |
files_pid_filetrans(telnetd_t,telnetd_var_run_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(telnetd_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(telnetd_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corenet_non_ipsec_sendrecv(telnetd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_if(telnetd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_if(telnetd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_nodes(telnetd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_nodes(telnetd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(telnetd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_urand(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_xattr_fs(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
auth_rw_login_records(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
8021cb |
corecmd_search_bin(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(telnetd_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(telnetd_t)
|
|
Chris PeBenito |
17de1b |
# for identd; cjp: this should probably only be inetd_child rules?
|
|
Chris PeBenito |
17de1b |
files_search_home(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
init_rw_utmp(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(telnetd_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
seutil_dontaudit_search_config(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
sysnet_read_config(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
remotelogin_domtrans(telnetd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# for identd; cjp: this should probably only be inetd_child rules?
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
kerberos_use(telnetd_t)
|
|
Chris PeBenito |
4900fd |
kerberos_read_keytab(telnetd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nis_use_ypbind(telnetd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nscd_socket_use(telnetd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`TODO',`
|
|
Chris PeBenito |
17de1b |
# Allow krb5 telnetd to use fork and open /dev/tty for use
|
|
Chris PeBenito |
17de1b |
allow telnetd_t userpty_type:chr_file setattr;
|
|
Chris PeBenito |
17de1b |
')
|