2005-05-05 17:44:36 +00:00
|
|
|
|
2006-03-07 14:12:39 +00:00
|
|
|
policy_module(remotelogin,1.2.0)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
2005-09-26 20:26:32 +00:00
|
|
|
type remote_login_t;
|
2006-02-02 21:08:12 +00:00
|
|
|
domain_obj_id_change_exemption(remote_login_t)
|
|
|
|
domain_subj_id_change_exemption(remote_login_t)
|
|
|
|
domain_role_change_exemption(remote_login_t)
|
2005-06-13 17:35:46 +00:00
|
|
|
domain_type(remote_login_t)
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_interactive_fd(remote_login_t)
|
2005-06-13 17:35:46 +00:00
|
|
|
auth_login_entry_type(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
role system_r types remote_login_t;
|
|
|
|
|
|
|
|
type remote_login_tmp_t;
|
2005-06-13 17:35:46 +00:00
|
|
|
files_tmp_file(remote_login_tmp_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Remote login remote policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow remote_login_t self:capability { dac_override chown fowner fsetid kill setgid setuid net_bind_service sys_nice sys_resource sys_tty_config };
|
2005-09-01 20:13:42 +00:00
|
|
|
allow remote_login_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
2005-05-05 17:44:36 +00:00
|
|
|
allow remote_login_t self:process { setrlimit setexec };
|
|
|
|
allow remote_login_t self:fd use;
|
2005-06-09 15:32:23 +00:00
|
|
|
allow remote_login_t self:fifo_file rw_file_perms;
|
2005-10-31 22:19:16 +00:00
|
|
|
allow remote_login_t self:sock_file r_file_perms;
|
2005-06-09 15:32:23 +00:00
|
|
|
allow remote_login_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow remote_login_t self:unix_stream_socket create_stream_socket_perms;
|
2005-05-05 17:44:36 +00:00
|
|
|
allow remote_login_t self:unix_dgram_socket sendto;
|
|
|
|
allow remote_login_t self:unix_stream_socket connectto;
|
2005-06-09 15:32:23 +00:00
|
|
|
allow remote_login_t self:shm create_shm_perms;
|
|
|
|
allow remote_login_t self:sem create_sem_perms;
|
|
|
|
allow remote_login_t self:msgq create_msgq_perms;
|
2005-05-05 17:44:36 +00:00
|
|
|
allow remote_login_t self:msg { send receive };
|
|
|
|
|
2005-06-09 15:32:23 +00:00
|
|
|
allow remote_login_t remote_login_tmp_t:dir create_dir_perms;
|
|
|
|
allow remote_login_t remote_login_tmp_t:file create_file_perms;
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(remote_login_t, remote_login_tmp_t, { file dir })
|
2005-05-05 17:44:36 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(remote_login_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_getattr_mouse_dev(remote_login_t)
|
|
|
|
dev_setattr_mouse_dev(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
dev_dontaudit_search_sysfs(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
# for SSP/ProPolice
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_read_urand(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
fs_getattr_xattr_fs(remote_login_t)
|
2005-06-27 16:30:55 +00:00
|
|
|
fs_search_auto_mountpoints(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2005-07-13 18:29:08 +00:00
|
|
|
selinux_get_fs_mount(remote_login_t)
|
|
|
|
selinux_validate_context(remote_login_t)
|
|
|
|
selinux_compute_access_vector(remote_login_t)
|
|
|
|
selinux_compute_create_context(remote_login_t)
|
|
|
|
selinux_compute_relabel_context(remote_login_t)
|
|
|
|
selinux_compute_user_contexts(remote_login_t)
|
|
|
|
|
|
|
|
term_relabel_all_user_ptys(remote_login_t)
|
|
|
|
|
2005-06-27 16:30:55 +00:00
|
|
|
auth_domtrans_chk_passwd(remote_login_t)
|
|
|
|
auth_dontaudit_read_shadow(remote_login_t)
|
|
|
|
auth_rw_login_records(remote_login_t)
|
|
|
|
auth_rw_lastlog(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
auth_rw_faillog(remote_login_t)
|
2005-06-27 16:30:55 +00:00
|
|
|
auth_exec_pam(remote_login_t)
|
|
|
|
auth_manage_pam_console_data(remote_login_t)
|
2005-10-14 17:55:40 +00:00
|
|
|
auth_domtrans_pam_console(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2005-07-12 20:34:24 +00:00
|
|
|
corecmd_list_bin(remote_login_t)
|
|
|
|
corecmd_list_sbin(remote_login_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
corecmd_read_bin_symlinks(remote_login_t)
|
|
|
|
corecmd_read_sbin_symlinks(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
# cjp: these are probably not needed:
|
2006-02-02 21:08:12 +00:00
|
|
|
corecmd_read_bin_files(remote_login_t)
|
|
|
|
corecmd_read_bin_pipes(remote_login_t)
|
|
|
|
corecmd_read_bin_sockets(remote_login_t)
|
|
|
|
corecmd_read_sbin_files(remote_login_t)
|
|
|
|
corecmd_read_sbin_pipes(remote_login_t)
|
|
|
|
corecmd_read_sbin_sockets(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
domain_read_all_entry_files(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2005-06-29 14:26:41 +00:00
|
|
|
files_read_etc_files(remote_login_t)
|
2005-06-13 17:35:46 +00:00
|
|
|
files_read_etc_runtime_files(remote_login_t)
|
|
|
|
files_list_home(remote_login_t)
|
|
|
|
files_read_usr_files(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
files_list_world_readable(remote_login_t)
|
|
|
|
files_read_world_readable_files(remote_login_t)
|
|
|
|
files_read_world_readable_symlinks(remote_login_t)
|
|
|
|
files_read_world_readable_pipes(remote_login_t)
|
|
|
|
files_read_world_readable_sockets(remote_login_t)
|
|
|
|
files_list_mnt(remote_login_t)
|
2006-02-13 22:05:08 +00:00
|
|
|
files_polyinstantiate_all(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
# for when /var/mail is a sym-link
|
2006-01-31 19:21:01 +00:00
|
|
|
files_read_var_symlinks(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2006-01-18 18:08:39 +00:00
|
|
|
init_rw_utmp(remote_login_t)
|
2005-06-27 16:30:55 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
libs_use_ld_so(remote_login_t)
|
|
|
|
libs_use_shared_libs(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_send_syslog_msg(remote_login_t)
|
2005-09-26 20:26:32 +00:00
|
|
|
|
2006-01-06 22:51:40 +00:00
|
|
|
mls_file_read_up(remote_login_t)
|
2005-09-26 20:26:32 +00:00
|
|
|
mls_file_write_down(remote_login_t)
|
|
|
|
mls_file_upgrade(remote_login_t)
|
|
|
|
mls_file_downgrade(remote_login_t)
|
|
|
|
mls_process_set_level(remote_login_t)
|
2005-05-09 18:50:20 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_read_config(remote_login_t)
|
|
|
|
seutil_read_default_contexts(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
|
2005-09-15 21:03:29 +00:00
|
|
|
sysnet_dns_name_resolve(remote_login_t)
|
|
|
|
|
2005-05-05 17:44:36 +00:00
|
|
|
miscfiles_read_localization(remote_login_t)
|
|
|
|
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_use_unpriv_users_fds(remote_login_t)
|
|
|
|
userdom_search_all_users_home_content(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
# Only permit unprivileged user domains to be entered via rlogin,
|
|
|
|
# since very weak authentication is used.
|
|
|
|
userdom_signal_unpriv_users(remote_login_t)
|
|
|
|
userdom_spec_domtrans_unpriv_users(remote_login_t)
|
|
|
|
|
|
|
|
# Search for mail spool file.
|
|
|
|
mta_getattr_spool(remote_login_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-02-06 22:47:46 +00:00
|
|
|
unconfined_domain(remote_login_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
unconfined_shell_domtrans(remote_login_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`read_default_t',`
|
|
|
|
files_list_default(remote_login_t)
|
|
|
|
files_read_default_files(remote_login_t)
|
|
|
|
files_read_default_symlinks(remote_login_t)
|
|
|
|
files_read_default_sockets(remote_login_t)
|
|
|
|
files_read_default_pipes(remote_login_t)
|
|
|
|
')
|
|
|
|
|
2005-06-16 20:33:51 +00:00
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_read_nfs_files(remote_login_t)
|
|
|
|
fs_read_nfs_symlinks(remote_login_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_read_cifs_files(remote_login_t)
|
|
|
|
fs_read_cifs_symlinks(remote_login_t)
|
|
|
|
')
|
|
|
|
|
2006-02-13 22:05:08 +00:00
|
|
|
optional_policy(`alsa',`
|
|
|
|
alsa_domtrans(remote_login_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nis',`
|
2005-06-27 16:30:55 +00:00
|
|
|
nis_use_ypbind(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(remote_login_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`usermanage',`
|
2005-07-12 20:34:24 +00:00
|
|
|
usermanage_read_crack_db(remote_login_t)
|
2005-05-05 17:44:36 +00:00
|
|
|
')
|