## SELinux policy module for Ekiga ## ##

## Applies SELinux security to Ekiga ##

##
####################################### ## ## The per role template for the Ekiga module. ## ## ##

## This template creates derived domains which are used ## for Ekiga. ##

##

## 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(`ekiga_per_role_template',` gen_require(` type ekiga_exec_t, user_ekiga_tmp_t; ') ######################################## # # Declarations # type $1_ekiga_t; application_domain($1_ekiga_t,ekiga_exec_t) role $3 types $1_ekiga_t; type $1_ekiga_tmpfs_t; files_tmpfs_file($1_ekiga_tmpfs_t) ## ##

## Confine Ekiga per user domain ##

##
gen_tunable(ekiga_confine_$1,false) ifelse(`$1',`user',`',` typealias user_ekiga_tmp_t alias $1_ekiga_tmp_t; ') ######################################## # # Ekiga local policy # allow $1_ekiga_t self:fifo_file rw_fifo_file_perms; allow $1_ekiga_t self:process { signal_perms getsched ptrace }; allow $1_ekiga_t self:shm { write unix_read unix_write read destroy create }; allow $1_ekiga_t self:tcp_socket { setopt read bind create write getattr connect getopt listen }; allow $1_ekiga_t self:udp_socket { setopt read bind create getattr write ioctl connect shutdown }; allow $1_ekiga_t $2:process signal_perms; allow $1_ekiga_t $2:unix_stream_socket connectto; allow $2 $1_ekiga_t:process { signal_perms ptrace }; allow $2 $1_ekiga_t:unix_stream_socket connectto; manage_dirs_pattern($1_ekiga_t,user_ekiga_tmp_t,user_ekiga_tmp_t) manage_sock_files_pattern($1_ekiga_t,user_ekiga_tmp_t,user_ekiga_tmp_t) userdom_user_tmp_filetrans($1,$1_ekiga_t,user_ekiga_tmp_t,{ dir sock_file }) files_list_tmp($1_ekiga_t) ps_process_pattern($2,$1_ekiga_t) # Mainly for PA and no suitable interfaces gen_require(` type user_home_t, user_tmp_t; ') allow $1_ekiga_t user_home_t:file append; allow $1_ekiga_t user_tmp_t:dir setattr; allow $1_ekiga_t user_tmp_t:sock_file { write read }; # Mainly for PA userdom_manage_unpriv_users_tmp_files($1_ekiga_t) userdom_read_generic_user_home_content_files($1_ekiga_t) userdom_read_user_tmpfs_files($1,$1_ekiga_t) # Should create interface and user domain should call that allow $2 user_ekiga_tmp_t:sock_file write; fs_getattr_tmpfs($1_ekiga_t) fs_manage_tmpfs_files($1_ekiga_t) fs_manage_tmpfs_dirs($1_ekiga_t) fs_search_inotifyfs($1_ekiga_t) fs_search_auto_mountpoints($1_ekiga_t) fs_read_noxattr_fs_files($1_ekiga_t) dev_dontaudit_getattr_all_blk_files($1_ekiga_t) dev_dontaudit_getattr_all_chr_files($1_ekiga_t) logging_send_syslog_msg($1_ekiga_t) libs_use_ld_so($1_ekiga_t) libs_use_shared_libs($1_ekiga_t) miscfiles_read_localization($1_ekiga_t) files_read_etc_files($1_ekiga_t) files_read_etc_runtime_files($1_ekiga_t) files_read_etc_symlinks($1_ekiga_t) files_read_usr_files($1_ekiga_t) files_read_usr_symlinks($1_ekiga_t) sysnet_read_config($1_ekiga_t) kernel_getattr_core_if($1_ekiga_t) kernel_read_system_state($1_ekiga_t) miscfiles_read_fonts($1_ekiga_t) term_getattr_unallocated_ttys($1_ekiga_t) term_list_ptys($1_ekiga_t) term_read_console($1_ekiga_t) corecmd_exec_bin($1_ekiga_t) application_exec($1_ekiga_t) udev_read_db($1_ekiga_t) dev_list_sysfs($1_ekiga_t) dev_read_input($1_ekiga_t) dev_read_lvm_control($1_ekiga_t) dev_read_rand($1_ekiga_t) dev_read_raw_memory($1_ekiga_t) dev_read_realtime_clock($1_ekiga_t) dev_read_sysfs($1_ekiga_t) dev_read_urand($1_ekiga_t) dev_write_sound($1_ekiga_t) dev_read_sound($1_ekiga_t) dev_read_video_dev($1_ekiga_t) dev_write_video_dev($1_ekiga_t) xserver_user_x_domain_template($1,$1_ekiga,$1_ekiga_t,$1_ekiga_tmpfs_t) xserver_read_xdm_pid($1_ekiga_t) xserver_dontaudit_read_xdm_tmp_files($1_ekiga_t) xserver_dontaudit_getattr_xdm_tmp_sockets($1_ekiga_t) corenet_all_recvfrom_unlabeled($1_ekiga_t) corenet_all_recvfrom_netlabel($1_ekiga_t) corenet_tcp_sendrecv_generic_if($1_ekiga_t) corenet_udp_sendrecv_generic_if($1_ekiga_t) corenet_tcp_sendrecv_all_nodes($1_ekiga_t) corenet_udp_sendrecv_all_nodes($1_ekiga_t) corenet_tcp_bind_generic_node($1_ekiga_t) corenet_udp_bind_generic_node($1_ekiga_t) corenet_udp_bind_inaddr_any_node($1_ekiga_t) corenet_tcp_connect_http_port($1_ekiga_t) corenet_tcp_bind_asterisk_port($1_ekiga_t) corenet_udp_bind_asterisk_port($1_ekiga_t) # semanage port -a -t ekiga_port_t -p udp 5061-5063 allow $1_ekiga_t ekiga_port_t:udp_socket name_bind; corenet_dontaudit_udp_bind_all_ports($1_ekiga_t) optional_policy(` avahi_dbus_chat($1_ekiga_t) ') optional_policy(` alsa_read_rw_config($1_ekiga_t) ') optional_policy(` automount_dontaudit_getattr_tmp_dirs($1_ekiga_t) ') optional_policy(` cups_read_rw_config($1_ekiga_t) cups_dbus_chat($1_ekiga_t) cups_stream_connect($1_ekiga_t) ') optional_policy(` dbus_system_bus_client_template($1_ekiga,$1_ekiga_t) dbus_user_bus_client_template($1,$1_ekiga,$1_ekiga_t) dbus_connectto_user_bus($1,$1_ekiga_t) ') optional_policy(` gnome_exec_gconf($1_ekiga_t) gnome_manage_user_gnome_config($1,$1_ekiga_t) ') optional_policy(` gnome_domtrans_user_gconf($1,$1_ekiga_t) gnome_stream_connect_gconf_template($1,$1_ekiga_t) ') tunable_policy(`use_nfs_home_dirs',` fs_manage_nfs_dirs($1_ekiga_t) fs_manage_nfs_files($1_ekiga_t) fs_manage_nfs_symlinks($1_ekiga_t) ') tunable_policy(`use_samba_home_dirs',` fs_manage_cifs_dirs($1_ekiga_t) fs_manage_cifs_files($1_ekiga_t) fs_manage_cifs_symlinks($1_ekiga_t) ') tunable_policy(`ekiga_can_bind_udp_generic_port',` corenet_udp_bind_generic_port($1_ekiga_t) ') tunable_policy(`ekiga_confine_$1',` domain_auto_trans($2,ekiga_exec_t,$1_ekiga_t) ',` can_exec($2,ekiga_exec_t) ') ')