Chris PeBenito 17de1b
Chris PeBenito 17de1b
policy_module(remotelogin,1.2.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type remote_login_t;
Chris PeBenito 17de1b
domain_obj_id_change_exemption(remote_login_t)
Chris PeBenito 17de1b
domain_subj_id_change_exemption(remote_login_t)
Chris PeBenito 17de1b
domain_role_change_exemption(remote_login_t)
Chris PeBenito 17de1b
domain_type(remote_login_t)
Chris PeBenito 17de1b
domain_interactive_fd(remote_login_t)
Chris PeBenito 17de1b
auth_login_entry_type(remote_login_t)
Chris PeBenito 17de1b
role system_r types remote_login_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type remote_login_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(remote_login_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Remote login remote policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow remote_login_t self:capability { dac_override chown fowner fsetid kill setgid setuid net_bind_service sys_nice sys_resource sys_tty_config };
Chris PeBenito 17de1b
allow remote_login_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
Chris PeBenito 17de1b
allow remote_login_t self:process { setrlimit setexec };
Chris PeBenito 17de1b
allow remote_login_t self:fd use;
Chris PeBenito 17de1b
allow remote_login_t self:fifo_file rw_file_perms;
Chris PeBenito 17de1b
allow remote_login_t self:sock_file r_file_perms;
Chris PeBenito 17de1b
allow remote_login_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
allow remote_login_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow remote_login_t self:unix_dgram_socket sendto;
Chris PeBenito 17de1b
allow remote_login_t self:unix_stream_socket connectto;
Chris PeBenito 17de1b
allow remote_login_t self:shm create_shm_perms;
Chris PeBenito 17de1b
allow remote_login_t self:sem create_sem_perms;
Chris PeBenito 17de1b
allow remote_login_t self:msgq create_msgq_perms;
Chris PeBenito 17de1b
allow remote_login_t self:msg { send receive };
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow remote_login_t remote_login_tmp_t:dir create_dir_perms;
Chris PeBenito 17de1b
allow remote_login_t remote_login_tmp_t:file create_file_perms;
Chris PeBenito 17de1b
files_tmp_filetrans(remote_login_t, remote_login_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(remote_login_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_getattr_mouse_dev(remote_login_t)
Chris PeBenito 17de1b
dev_setattr_mouse_dev(remote_login_t)
Chris PeBenito 17de1b
dev_dontaudit_search_sysfs(remote_login_t)
Chris PeBenito 17de1b
# for SSP/ProPolice
Chris PeBenito 17de1b
dev_read_urand(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_xattr_fs(remote_login_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
selinux_get_fs_mount(remote_login_t)
Chris PeBenito 17de1b
selinux_validate_context(remote_login_t)
Chris PeBenito 17de1b
selinux_compute_access_vector(remote_login_t)
Chris PeBenito 17de1b
selinux_compute_create_context(remote_login_t)
Chris PeBenito 17de1b
selinux_compute_relabel_context(remote_login_t)
Chris PeBenito 17de1b
selinux_compute_user_contexts(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_relabel_all_user_ptys(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
auth_domtrans_chk_passwd(remote_login_t)
Chris PeBenito 17de1b
auth_dontaudit_read_shadow(remote_login_t)
Chris PeBenito 17de1b
auth_rw_login_records(remote_login_t)
Chris PeBenito 17de1b
auth_rw_lastlog(remote_login_t)
Chris PeBenito 17de1b
auth_rw_faillog(remote_login_t)
Chris PeBenito 17de1b
auth_exec_pam(remote_login_t)
Chris PeBenito 17de1b
auth_manage_pam_console_data(remote_login_t)
Chris PeBenito 17de1b
auth_domtrans_pam_console(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_list_bin(remote_login_t)
Chris PeBenito 17de1b
corecmd_list_sbin(remote_login_t)
Chris PeBenito 17de1b
corecmd_read_bin_symlinks(remote_login_t)
Chris PeBenito 17de1b
corecmd_read_sbin_symlinks(remote_login_t)
Chris PeBenito 17de1b
# cjp: these are probably not needed:
Chris PeBenito 17de1b
corecmd_read_bin_files(remote_login_t)
Chris PeBenito 17de1b
corecmd_read_bin_pipes(remote_login_t)
Chris PeBenito 17de1b
corecmd_read_bin_sockets(remote_login_t)
Chris PeBenito 17de1b
corecmd_read_sbin_files(remote_login_t)
Chris PeBenito 17de1b
corecmd_read_sbin_pipes(remote_login_t)
Chris PeBenito 17de1b
corecmd_read_sbin_sockets(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_read_all_entry_files(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(remote_login_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(remote_login_t)
Chris PeBenito 17de1b
files_list_home(remote_login_t)
Chris PeBenito 17de1b
files_read_usr_files(remote_login_t)
Chris PeBenito 17de1b
files_list_world_readable(remote_login_t)
Chris PeBenito 17de1b
files_read_world_readable_files(remote_login_t)
Chris PeBenito 17de1b
files_read_world_readable_symlinks(remote_login_t)
Chris PeBenito 17de1b
files_read_world_readable_pipes(remote_login_t)
Chris PeBenito 17de1b
files_read_world_readable_sockets(remote_login_t)
Chris PeBenito 17de1b
files_list_mnt(remote_login_t)
Chris PeBenito 17de1b
files_polyinstantiate_all(remote_login_t)
Chris PeBenito 17de1b
# for when /var/mail is a sym-link
Chris PeBenito 17de1b
files_read_var_symlinks(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_rw_utmp(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(remote_login_t)
Chris PeBenito 17de1b
libs_use_shared_libs(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
mls_file_read_up(remote_login_t)
Chris PeBenito 17de1b
mls_file_write_down(remote_login_t)
Chris PeBenito 17de1b
mls_file_upgrade(remote_login_t)
Chris PeBenito 17de1b
mls_file_downgrade(remote_login_t)
Chris PeBenito 17de1b
mls_process_set_level(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
seutil_read_config(remote_login_t)
Chris PeBenito 17de1b
seutil_read_default_contexts(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_dns_name_resolve(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_use_unpriv_users_fds(remote_login_t)
Chris PeBenito 17de1b
userdom_search_all_users_home_content(remote_login_t)
Chris PeBenito 17de1b
# Only permit unprivileged user domains to be entered via rlogin,
Chris PeBenito 17de1b
# since very weak authentication is used.
Chris PeBenito 17de1b
userdom_signal_unpriv_users(remote_login_t)
Chris PeBenito 17de1b
userdom_spec_domtrans_unpriv_users(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Search for mail spool file.
Chris PeBenito 17de1b
mta_getattr_spool(remote_login_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
ifdef(`targeted_policy',`
Chris PeBenito 17de1b
	unconfined_domain(remote_login_t)
Chris PeBenito 17de1b
	unconfined_shell_domtrans(remote_login_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
tunable_policy(`read_default_t',`
Chris PeBenito 17de1b
	files_list_default(remote_login_t)
Chris PeBenito 17de1b
	files_read_default_files(remote_login_t)
Chris PeBenito 17de1b
	files_read_default_symlinks(remote_login_t)
Chris PeBenito 17de1b
	files_read_default_sockets(remote_login_t)
Chris PeBenito 17de1b
	files_read_default_pipes(remote_login_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
tunable_policy(`use_nfs_home_dirs',`
Chris PeBenito 17de1b
	fs_read_nfs_files(remote_login_t)
Chris PeBenito 17de1b
	fs_read_nfs_symlinks(remote_login_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
tunable_policy(`use_samba_home_dirs',`
Chris PeBenito 17de1b
	fs_read_cifs_files(remote_login_t)
Chris PeBenito 17de1b
	fs_read_cifs_symlinks(remote_login_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	alsa_domtrans(remote_login_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(remote_login_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nscd_socket_use(remote_login_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	usermanage_read_crack_db(remote_login_t)
Chris PeBenito 17de1b
')