Chris PeBenito 17de1b
Chris PeBenito 0251df
policy_module(rlogin,1.3.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type rlogind_t;
Chris PeBenito 17de1b
type rlogind_exec_t;
Chris PeBenito 17de1b
inetd_service_domain(rlogind_t,rlogind_exec_t)
Chris PeBenito 17de1b
role system_r types rlogind_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type rlogind_devpts_t; #, userpty_type;
Chris PeBenito 17de1b
term_login_pty(rlogind_devpts_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type rlogind_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(rlogind_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type rlogind_var_run_t;
Chris PeBenito 17de1b
files_pid_file(rlogind_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 rlogind_t self:capability { fsetid chown fowner sys_tty_config dac_override };
Chris PeBenito 17de1b
allow rlogind_t self:process signal_perms;
Chris PeBenito c0868a
allow rlogind_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow rlogind_t self:tcp_socket connected_stream_socket_perms;
Chris PeBenito 17de1b
# for identd; cjp: this should probably only be inetd_child rules?
Chris PeBenito 17de1b
allow rlogind_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
Chris PeBenito 17de1b
allow rlogind_t self:capability { setuid setgid };
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow rlogind_t rlogind_devpts_t:chr_file { rw_chr_file_perms setattr };
Chris PeBenito 17de1b
term_create_pty(rlogind_t,rlogind_devpts_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# for /usr/lib/telnetlogin
Chris PeBenito 17de1b
can_exec(rlogind_t, rlogind_exec_t)
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_dirs_pattern(rlogind_t,rlogind_tmp_t,rlogind_tmp_t)
Chris PeBenito c0868a
manage_files_pattern(rlogind_t,rlogind_tmp_t,rlogind_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(rlogind_t, rlogind_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_files_pattern(rlogind_t,rlogind_var_run_t,rlogind_var_run_t)
Chris PeBenito 17de1b
files_pid_filetrans(rlogind_t,rlogind_var_run_t,file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(rlogind_t)
Chris PeBenito 17de1b
kernel_read_system_state(rlogind_t)
Chris PeBenito 17de1b
kernel_read_network_state(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corenet_non_ipsec_sendrecv(rlogind_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_if(rlogind_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_if(rlogind_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_nodes(rlogind_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_nodes(rlogind_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(rlogind_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_urand(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_xattr_fs(rlogind_t)
Chris PeBenito 6b19be
fs_search_auto_mountpoints(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
auth_domtrans_chk_passwd(rlogind_t)
Chris PeBenito 17de1b
auth_rw_login_records(rlogind_t)
Chris PeBenito 6b19be
auth_use_nsswitch(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(rlogind_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(rlogind_t)
Chris PeBenito 17de1b
files_search_home(rlogind_t)
Chris PeBenito 17de1b
files_search_default(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_rw_utmp(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(rlogind_t)
Chris PeBenito 17de1b
libs_use_shared_libs(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
seutil_dontaudit_search_config(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_setattr_unpriv_users_ptys(rlogind_t)
Chris PeBenito 17de1b
# cjp: this is egregious
Chris PeBenito 17de1b
userdom_read_all_users_home_content_files(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
remotelogin_domtrans(rlogind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	kerberos_read_keytab(rlogind_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
ifdef(`TODO',`
Chris PeBenito 17de1b
# Allow krb5 rlogind to use fork and open /dev/tty for use
Chris PeBenito 17de1b
allow rlogind_t userpty_type:chr_file setattr;
Chris PeBenito 17de1b
')