2009-08-05 14:59:21 +00:00
|
|
|
policy_module(rlogin, 1.9.0)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type rlogind_t;
|
|
|
|
type rlogind_exec_t;
|
2007-09-17 14:33:40 +00:00
|
|
|
inetd_service_domain(rlogind_t, rlogind_exec_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
role system_r types rlogind_t;
|
|
|
|
|
|
|
|
type rlogind_devpts_t; #, userpty_type;
|
|
|
|
term_login_pty(rlogind_devpts_t)
|
|
|
|
|
2009-06-12 19:44:10 +00:00
|
|
|
type rlogind_home_t;
|
|
|
|
userdom_user_home_content(rlogind_home_t)
|
|
|
|
|
2005-09-20 17:11:53 +00:00
|
|
|
type rlogind_tmp_t;
|
|
|
|
files_tmp_file(rlogind_tmp_t)
|
|
|
|
|
|
|
|
type rlogind_var_run_t;
|
|
|
|
files_pid_file(rlogind_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2010-09-24 07:33:35 +00:00
|
|
|
allow rlogind_t self:capability { fsetid chown fowner setuid setgid sys_tty_config dac_override };
|
2005-09-20 17:11:53 +00:00
|
|
|
allow rlogind_t self:process signal_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow rlogind_t self:fifo_file rw_fifo_file_perms;
|
2005-09-20 17:11:53 +00:00
|
|
|
allow rlogind_t self:tcp_socket connected_stream_socket_perms;
|
|
|
|
# for identd; cjp: this should probably only be inetd_child rules?
|
|
|
|
allow rlogind_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow rlogind_t rlogind_devpts_t:chr_file { rw_chr_file_perms setattr };
|
2008-07-23 21:38:39 +00:00
|
|
|
term_create_pty(rlogind_t, rlogind_devpts_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
# for /usr/lib/telnetlogin
|
|
|
|
can_exec(rlogind_t, rlogind_exec_t)
|
|
|
|
|
2007-09-17 14:33:40 +00:00
|
|
|
manage_dirs_pattern(rlogind_t, rlogind_tmp_t, rlogind_tmp_t)
|
|
|
|
manage_files_pattern(rlogind_t, rlogind_tmp_t, rlogind_tmp_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2007-09-17 14:33:40 +00:00
|
|
|
manage_files_pattern(rlogind_t, rlogind_var_run_t, rlogind_var_run_t)
|
|
|
|
files_pid_filetrans(rlogind_t, rlogind_var_run_t, file)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
kernel_read_system_state(rlogind_t)
|
|
|
|
kernel_read_network_state(rlogind_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(rlogind_t)
|
|
|
|
corenet_all_recvfrom_netlabel(rlogind_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(rlogind_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(rlogind_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(rlogind_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(rlogind_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(rlogind_t)
|
|
|
|
|
|
|
|
dev_read_urand(rlogind_t)
|
|
|
|
|
2008-04-04 17:08:34 +00:00
|
|
|
domain_interactive_fd(rlogind_t)
|
|
|
|
|
2005-09-20 17:11:53 +00:00
|
|
|
fs_getattr_xattr_fs(rlogind_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
fs_search_auto_mountpoints(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
auth_domtrans_chk_passwd(rlogind_t)
|
|
|
|
auth_rw_login_records(rlogind_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
auth_use_nsswitch(rlogind_t)
|
2010-09-02 17:38:00 +00:00
|
|
|
auth_login_pgm_domain(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
files_read_etc_files(rlogind_t)
|
|
|
|
files_read_etc_runtime_files(rlogind_t)
|
|
|
|
files_search_home(rlogind_t)
|
|
|
|
files_search_default(rlogind_t)
|
|
|
|
|
2006-01-18 18:08:39 +00:00
|
|
|
init_rw_utmp(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
logging_send_syslog_msg(rlogind_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(rlogind_t)
|
|
|
|
|
2008-04-04 17:08:34 +00:00
|
|
|
seutil_read_config(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_setattr_user_ptys(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
# cjp: this is egregious
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_read_user_home_content_files(rlogind_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_search_admin_dir(rlogind_t)
|
|
|
|
userdom_manage_user_tmp_files(rlogind_t)
|
|
|
|
userdom_tmp_filetrans_user_tmp(rlogind_t, file)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
|
|
|
remotelogin_domtrans(rlogind_t)
|
2008-04-04 17:08:34 +00:00
|
|
|
remotelogin_signal(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
|
2009-06-12 19:44:10 +00:00
|
|
|
rlogin_read_home_content(rlogind_t)
|
|
|
|
|
2009-03-23 14:56:43 +00:00
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_list_nfs(rlogind_t)
|
|
|
|
fs_read_nfs_files(rlogind_t)
|
|
|
|
fs_read_nfs_symlinks(rlogind_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_list_cifs(rlogind_t)
|
|
|
|
fs_read_cifs_files(rlogind_t)
|
|
|
|
fs_read_cifs_symlinks(rlogind_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2009-03-23 14:56:43 +00:00
|
|
|
kerberos_keytab_template(rlogind, rlogind_t)
|
|
|
|
kerberos_manage_host_rcache(rlogind_t)
|
2005-09-20 17:11:53 +00:00
|
|
|
')
|
|
|
|
|
2007-09-17 14:33:40 +00:00
|
|
|
optional_policy(`
|
|
|
|
tcpd_wrapped_domain(rlogind_t, rlogind_exec_t)
|
|
|
|
')
|