## SELinux policy module ## ##

## SELinux policy module for Eclipse-platform. ##

##
####################################### ## ## The per role template for the Eclipse-platform module. ## ## ##

## This template creates derived domains which are used ## for Eclipse-platfom. ##

##

## This template is invoked automatically for each user, and ## generally does not need to be invoked directly ## by policy writers. ##

##
## ## ## The prefix of the user domain (e.g., user ## is the prefix for user_t). ## ## ## ## ## The type of the user domain. ## ## ## ## ## The role associated with the user domain. ## ## # template(`eclipse_per_role_template',` gen_require(` type eclipse_exec_t,java_exec_t; ') ######################################## # # Declarations # type $1_eclipse_t; application_domain($1_eclipse_t,eclipse_exec_t) role $3 types $1_eclipse_t; type $1_eclipse_home_t alias $1_eclipse_rw_t; files_poly_member($1_eclipse_home_t) userdom_user_home_content($1,$1_eclipse_home_t) type $1_eclipse_tmp_t; files_poly_member_tmp($1_eclipse_t,$1_eclipse_tmp_t) files_tmp_file($1_eclipse_tmp_t) type $1_eclipse_tmpfs_t; files_tmpfs_file($1_eclipse_tmpfs_t) ######################################## # # Local Policy # allow $1_eclipse_t self:fifo_file { read getattr write ioctl }; allow $1_eclipse_t self:process getsched; allow $1_eclipse_t self:process signal; allow $1_eclipse_t self:process setsched; allow $1_eclipse_t self:shm create_shm_perms; allow $1_eclipse_t self:tcp_socket create_stream_socket_perms; allow $1_eclipse_t self:process { execstack execmem }; allow $1_eclipse_t self:netlink_route_socket { write getattr read bind create nlmsg_read }; # process this allow $1_eclipse_t bin_t:file execute_no_trans; allow $1_eclipse_t $1_eclipse_home_t:file { execute execute_no_trans }; logging_send_syslog_msg($1_eclipse_t) dbus_connect_system_bus($1_eclipse_t) cups_stream_connect($1_eclipse_t) allow $1_eclipse_t java_exec_t:file { execute execute_no_trans }; storage_raw_read_removable_device($1_eclipse_t) dev_read_rand($1_eclipse_t) dev_write_rand($1_eclipse_t) dev_read_urand($1_eclipse_t) allow $1_eclipse_t $2:fd use; allow $1_eclipse_t $2:process sigchld; allow $1_eclipse_t $2:unix_stream_socket connectto; allow $2 $1_eclipse_t:fd use; allow $2 $1_eclipse_t:shm { associate getattr }; allow $2 $1_eclipse_t:shm { unix_read unix_write }; allow $2 $1_eclipse_t:unix_stream_socket connectto; corecmd_search_bin($1_eclipse_t) corecmd_bin_entry_type($1_eclipse_t) manage_dirs_pattern($1_eclipse_t,$1_eclipse_home_t,$1_eclipse_home_t) manage_files_pattern($1_eclipse_t,$1_eclipse_home_t,$1_eclipse_home_t) manage_lnk_files_pattern($1_eclipse_t,$1_eclipse_home_t,$1_eclipse_home_t) manage_sock_files_pattern($1_eclipse_t,$1_eclipse_home_t,$1_eclipse_home_t) userdom_user_home_dir_filetrans($1,$1_eclipse_t,$1_eclipse_home_t,{ dir file lnk_file sock_file }) userdom_search_user_home_dirs($1,$1_eclipse_t) manage_dirs_pattern($1_eclipse_t,$1_eclipse_tmp_t,$1_eclipse_tmp_t) manage_files_pattern($1_eclipse_t,$1_eclipse_tmp_t,$1_eclipse_tmp_t) manage_sock_files_pattern($1_eclipse_t,$1_eclipse_tmp_t,$1_eclipse_tmp_t) manage_lnk_files_pattern($1_eclipse_t,$1_eclipse_tmp_t,$1_eclipse_tmp_t) files_tmp_filetrans($1_eclipse_t, $1_eclipse_tmp_t, { dir file sock_file lnk_file }) userdom_manage_user_home_content_dirs($1,$1_eclipse_t) userdom_manage_user_home_content_files($1,$1_eclipse_t) userdom_manage_user_home_content_symlinks($1,$1_eclipse_t) userdom_manage_user_tmp_dirs($1,$1_eclipse_t) userdom_manage_user_tmp_files($1,$1_eclipse_t) userdom_manage_user_tmp_sockets($1,$1_eclipse_t) manage_files_pattern($1_eclipse_t,$1_eclipse_tmpfs_t,$1_eclipse_tmpfs_t) manage_lnk_files_pattern($1_eclipse_t,$1_eclipse_tmpfs_t,$1_eclipse_tmpfs_t) manage_fifo_files_pattern($1_eclipse_t,$1_eclipse_tmpfs_t,$1_eclipse_tmpfs_t) manage_sock_files_pattern($1_eclipse_t,$1_eclipse_tmpfs_t,$1_eclipse_tmpfs_t) fs_tmpfs_filetrans($1_eclipse_t,$1_eclipse_tmpfs_t,{ file lnk_file sock_file fifo_file }) manage_dirs_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) manage_files_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) manage_lnk_files_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) manage_sock_files_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) relabel_dirs_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) relabel_files_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) relabel_lnk_files_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) relabel_sock_files_pattern($2,$1_eclipse_home_t,$1_eclipse_home_t) corenet_tcp_sendrecv_all_ports($1_eclipse_t) corenet_tcp_connect_all_ports($1_eclipse_t) corenet_all_recvfrom_unlabeled($1_eclipse_t) corenet_tcp_sendrecv_all_if($1_eclipse_t) corenet_tcp_sendrecv_all_nodes($1_eclipse_t) corenet_tcp_bind_all_nodes($1_eclipse_t) corenet_dontaudit_tcp_sendrecv_generic_port($1_eclipse_t) corenet_dontaudit_tcp_bind_generic_port($1_eclipse_t) allow $1_eclipse_t $2:process signull; kernel_dontaudit_list_unlabeled($1_eclipse_t) kernel_dontaudit_getattr_unlabeled_files($1_eclipse_t) kernel_dontaudit_read_unlabeled_files($1_eclipse_t) domain_auto_trans($2, eclipse_exec_t, $1_eclipse_t) allow $2 $1_eclipse_t:process { noatsecure siginh rlimitinh }; ps_process_pattern($2,$1_eclipse_t) allow $2 $1_eclipse_t:process signal_perms; sysnet_dns_name_resolve($1_eclipse_t) miscfiles_read_localization($1_eclipse_t) libs_use_ld_so($1_eclipse_t) libs_use_shared_libs($1_eclipse_t) files_read_etc_files($1_eclipse_t) files_read_usr_files($1_eclipse_t) kernel_read_system_state($1_eclipse_t) kernel_read_network_state($1_eclipse_t) xserver_user_client_template($1,$1_eclipse_t,$1_eclipse_tmpfs_t) xserver_dontaudit_read_xdm_tmp_files($1_eclipse_t) xserver_dontaudit_getattr_xdm_tmp_sockets($1_eclipse_t) fs_rw_tmpfs_files($1_eclipse_t) miscfiles_read_fonts($1_eclipse_t) files_dontaudit_list_non_security($1_eclipse_t) files_dontaudit_getattr_non_security_files($1_eclipse_t) files_read_non_security_files($1_eclipse_t) fs_dontaudit_getattr_all_fs($1_eclipse_t) fs_search_auto_mountpoints($1_eclipse_t) fs_list_inotifyfs($1_eclipse_t) dev_getattr_sysfs_dirs($1_eclipse_t) fs_search_auto_mountpoints($1_eclipse_t) userdom_use_user_terminals($1,$1_eclipse_t) corecmd_exec_shell($1_eclipse_t) gnome_exec_gconf($1_eclipse_t) seutil_exec_checkpolicy($1_eclipse_t) tunable_policy(`use_nfs_home_dirs',` fs_manage_nfs_dirs($1_eclipse_t) fs_manage_nfs_files($1_eclipse_t) fs_manage_nfs_symlinks($1_eclipse_t) ') tunable_policy(`use_samba_home_dirs',` fs_manage_cifs_dirs($1_eclipse_t) fs_manage_cifs_files($1_eclipse_t) fs_manage_cifs_symlinks($1_eclipse_t) ') optional_policy(` automount_dontaudit_getattr_tmp_dirs($1_eclipse_t) ') optional_policy(` nscd_socket_use($1_eclipse_t) ') ') ######################################## ## ## Read Eclipse-platform per user homedir ## ## ##

## Read Eclipse-platform per user homedir ##

##

## This is a templated interface, and should only ## be called from a per-userdomain template. ##

##
## ## ## The prefix of the user domain (e.g., user ## is the prefix for user_t). ## ## ## ## ## Domain allowed access. ## ## # template(`eclipse_read_user_home_files',` gen_require(` type $1_eclipse_home_t; ') allow $2 $1_eclipse_home_t:dir list_dir_perms; allow $2 $1_eclipse_home_t:file read_file_perms; ') ######################################## ## ## Write Eclipse-platform per user homedir ## ## ##

## Write Eclipse-platform per user homedir ##

##

## This is a templated interface, and should only ## be called from a per-userdomain template. ##

##
## ## ## The prefix of the user domain (e.g., user ## is the prefix for user_t). ## ## ## ## ## Domain allowed access. ## ## # template(`eclipse_write_user_home_files',` gen_require(` type $1_eclipse_home_t; ') allow $2 $1_eclipse_home_t:dir list_dir_perms; allow $2 $1_eclipse_home_t:file write; ') ######################################## ## ## Run Eclipse-platform in user Eclipse-platform domain. ## ## ##

## Run Eclipse-platform in user Eclipse-platform domain. ##

##

## This is a templated interface, and should only ## be called from a per-userdomain template. ##

##
## ## ## The prefix of the user domain (e.g., user ## is the prefix for user_t). ## ## ## ## ## Domain allowed access. ## ## # template(`eclipse_domtrans_user_eclipse',` gen_require(` type $1_eclipse_t, eclipse_exec_t; ') domtrans_pattern($2, eclipse_exec_t,$1_eclipse_t) ') ######################################## ## ## Read/write Eclipse-platform per user tcp_socket ## ## ##

## Read/write Eclipse-platform per user tcp_socket ##

##

## This is a templated interface, and should only ## be called from a per-userdomain template. ##

##
## ## ## The prefix of the user domain (e.g., user ## is the prefix for user_t). ## ## ## ## ## Domain allowed access. ## ## # template(`eclipse_rw_user_tcp_sockets',` gen_require(` type $1_eclipse_t; ') allow $2 $1_eclipse_t:tcp_socket rw_socket_perms; ')