Chris PeBenito 4fd520
Chris PeBenito 5ea24b
policy_module(rlogin,1.1.0)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
########################################
Chris PeBenito 4fd520
#
Chris PeBenito 4fd520
# Declarations
Chris PeBenito 4fd520
#
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type rlogind_t;
Chris PeBenito 4fd520
type rlogind_exec_t;
Chris PeBenito 4fd520
inetd_service_domain(rlogind_t,rlogind_exec_t)
Chris PeBenito 4fd520
role system_r types rlogind_t;
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type rlogind_devpts_t; #, userpty_type;
Chris PeBenito 4fd520
term_login_pty(rlogind_devpts_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type rlogind_tmp_t;
Chris PeBenito 4fd520
files_tmp_file(rlogind_tmp_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
type rlogind_var_run_t;
Chris PeBenito 4fd520
files_pid_file(rlogind_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 rlogind_t self:capability { fsetid chown fowner sys_tty_config dac_override };
Chris PeBenito 4fd520
allow rlogind_t self:process signal_perms;
Chris PeBenito 4fd520
allow rlogind_t self:fifo_file rw_file_perms;
Chris PeBenito 4fd520
allow rlogind_t self:tcp_socket connected_stream_socket_perms;
Chris PeBenito 4fd520
# for identd; cjp: this should probably only be inetd_child rules?
Chris PeBenito 4fd520
allow rlogind_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
Chris PeBenito 4fd520
allow rlogind_t self:capability { setuid setgid };
Chris PeBenito 4fd520
Chris PeBenito 4fd520
allow rlogind_t rlogind_devpts_t:chr_file { rw_file_perms setattr };
Chris PeBenito ce0ff1
term_create_pty(rlogind_t,rlogind_devpts_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
# for /usr/lib/telnetlogin
Chris PeBenito 4fd520
can_exec(rlogind_t, rlogind_exec_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
allow rlogind_t rlogind_tmp_t:dir create_dir_perms;
Chris PeBenito 4fd520
allow rlogind_t rlogind_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(rlogind_t, rlogind_tmp_t, { file dir })
Chris PeBenito 4fd520
Chris PeBenito 4fd520
allow rlogind_t rlogind_var_run_t:file create_file_perms;
Chris PeBenito b9ea0f
allow rlogind_t rlogind_var_run_t:dir rw_dir_perms;
Chris PeBenito 1c1ac6
files_pid_filetrans(rlogind_t,rlogind_var_run_t,file)
Chris PeBenito 4fd520
Chris PeBenito 445522
kernel_read_kernel_sysctls(rlogind_t)
Chris PeBenito 4fd520
kernel_read_system_state(rlogind_t)
Chris PeBenito 4fd520
kernel_read_network_state(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
corenet_tcp_sendrecv_all_if(rlogind_t)
Chris PeBenito 4fd520
corenet_udp_sendrecv_all_if(rlogind_t)
Chris PeBenito 4fd520
corenet_raw_sendrecv_all_if(rlogind_t)
Chris PeBenito 4fd520
corenet_tcp_sendrecv_all_nodes(rlogind_t)
Chris PeBenito 4fd520
corenet_udp_sendrecv_all_nodes(rlogind_t)
Chris PeBenito 4fd520
corenet_raw_sendrecv_all_nodes(rlogind_t)
Chris PeBenito 4fd520
corenet_tcp_sendrecv_all_ports(rlogind_t)
Chris PeBenito 4fd520
corenet_udp_sendrecv_all_ports(rlogind_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(rlogind_t)
Chris PeBenito 4fd520
corenet_tcp_bind_all_nodes(rlogind_t)
Chris PeBenito 4fd520
corenet_udp_bind_all_nodes(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
dev_read_urand(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
fs_getattr_xattr_fs(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
auth_domtrans_chk_passwd(rlogind_t)
Chris PeBenito 4fd520
auth_rw_login_records(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
files_read_etc_files(rlogind_t)
Chris PeBenito 4fd520
files_read_etc_runtime_files(rlogind_t)
Chris PeBenito 4fd520
files_search_home(rlogind_t)
Chris PeBenito 4fd520
files_search_default(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 68228b
init_rw_utmp(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
libs_use_ld_so(rlogind_t)
Chris PeBenito 4fd520
libs_use_shared_libs(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
logging_send_syslog_msg(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
miscfiles_read_localization(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
seutil_dontaudit_search_config(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
sysnet_read_config(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 15722e
userdom_setattr_unpriv_users_ptys(rlogind_t)
Chris PeBenito 4fd520
# cjp: this is egregious
Chris PeBenito 103fe2
userdom_read_all_users_home_content_files(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
remotelogin_domtrans(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 4fd520
	kerberos_read_keytab(rlogind_t)
Chris PeBenito 4fd520
Chris PeBenito 4fd520
	# for identd; cjp: this should probably only be inetd_child rules?
Chris PeBenito 4fd520
	kerberos_use(rlogind_t)
Chris PeBenito 4fd520
')
Chris PeBenito 4fd520
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 4fd520
	nis_use_ypbind(rlogind_t)
Chris PeBenito 4fd520
')
Chris PeBenito 4fd520
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 1815ba
	nscd_socket_use(rlogind_t)
Chris PeBenito 4fd520
')
Chris PeBenito 4fd520
Chris PeBenito 4fd520
ifdef(`TODO',`
Chris PeBenito 4fd520
# Allow krb5 rlogind to use fork and open /dev/tty for use
Chris PeBenito 4fd520
allow rlogind_t userpty_type:chr_file setattr;
Chris PeBenito 4fd520
')