|
Chris PeBenito |
17de1b |
## <summary>X Windows Server</summary>
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Rules required for using the X Windows server
|
|
Chris PeBenito |
93c49b |
## and environment, for restricted users.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
93c49b |
interface(`xserver_restricted_role',`
|
|
Chris PeBenito |
563e58 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t, xserver_exec_t, xserver_tmp_t, xserver_tmpfs_t;
|
|
Chris PeBenito |
296273 |
type user_fonts_t, user_fonts_cache_t, user_fonts_config_t;
|
|
Chris PeBenito |
296273 |
type iceauth_t, iceauth_exec_t, iceauth_home_t;
|
|
Chris PeBenito |
296273 |
type xauth_t, xauth_exec_t, xauth_home_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
type info_xproperty_t, rootwindow_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
class x_drawable all_x_drawable_perms;
|
|
Chris PeBenito |
296273 |
class x_screen all_x_screen_perms;
|
|
Chris PeBenito |
296273 |
class x_gc all_x_gc_perms;
|
|
Chris PeBenito |
296273 |
class x_font all_x_font_perms;
|
|
Chris PeBenito |
296273 |
class x_colormap all_x_colormap_perms;
|
|
Chris PeBenito |
296273 |
class x_property all_x_property_perms;
|
|
Chris PeBenito |
296273 |
class x_selection all_x_selection_perms;
|
|
Chris PeBenito |
296273 |
class x_cursor all_x_cursor_perms;
|
|
Chris PeBenito |
296273 |
class x_client all_x_client_perms;
|
|
Chris PeBenito |
296273 |
class x_device all_x_device_perms;
|
|
Chris PeBenito |
296273 |
class x_server all_x_server_perms;
|
|
Chris PeBenito |
296273 |
class x_extension all_x_extension_perms;
|
|
Chris PeBenito |
296273 |
class x_resource all_x_resource_perms;
|
|
Chris PeBenito |
296273 |
class x_event all_x_event_perms;
|
|
Chris PeBenito |
296273 |
class x_synthetic_event all_x_synthetic_event_perms;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
role $1 types { xserver_t xauth_t iceauth_t };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
93c49b |
# Xserver read/write client shm
|
|
Chris PeBenito |
93c49b |
allow xserver_t $2:fd use;
|
|
Chris PeBenito |
93c49b |
allow xserver_t $2:shm rw_shm_perms;
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
296273 |
domtrans_pattern($2, xserver_exec_t, xserver_t)
|
|
Chris PeBenito |
296273 |
allow xserver_t $2:process signal;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
allow xserver_t $2:shm rw_shm_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
93c49b |
allow $2 user_fonts_t:dir list_dir_perms;
|
|
Chris PeBenito |
93c49b |
allow $2 user_fonts_t:file read_file_perms;
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
allow $2 user_fonts_config_t:dir list_dir_perms;
|
|
Chris PeBenito |
93c49b |
allow $2 user_fonts_config_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
stream_connect_pattern($2, xserver_tmp_t, xserver_tmp_t, xserver_t)
|
|
Chris PeBenito |
93c49b |
files_search_tmp($2)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Communicate via System V shared memory.
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_t:shm r_shm_perms;
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_tmpfs_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
# allow ps to show iceauth
|
|
Chris PeBenito |
296273 |
ps_process_pattern($2, iceauth_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
domtrans_pattern($2, iceauth_exec_t, iceauth_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
93c49b |
allow $2 iceauth_home_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
domtrans_pattern($2, xauth_exec_t, xauth_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
allow $2 xauth_t:process signal;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# allow ps to show xauth
|
|
Chris PeBenito |
3f67f7 |
ps_process_pattern($2, xauth_t)
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_t:process signal;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
93c49b |
allow $2 xauth_home_t:file read_file_perms;
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
# for when /tmp/.X11-unix is created by the system
|
|
Chris PeBenito |
93c49b |
allow $2 xdm_t:fd use;
|
|
Chris PeBenito |
93c49b |
allow $2 xdm_t:fifo_file { getattr read write ioctl };
|
|
Chris PeBenito |
93c49b |
allow $2 xdm_tmp_t:dir search;
|
|
Chris PeBenito |
93c49b |
allow $2 xdm_tmp_t:sock_file { read write };
|
|
Chris PeBenito |
93c49b |
dontaudit $2 xdm_t:tcp_socket { read write };
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
# Client read xserver shm
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_t:fd use;
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_tmpfs_t:file read_file_perms;
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
# Read /tmp/.X0-lock
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_tmp_t:file { getattr read };
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
dev_rw_xserver_misc($2)
|
|
Chris PeBenito |
93c49b |
dev_rw_power_management($2)
|
|
Chris PeBenito |
93c49b |
dev_read_input($2)
|
|
Chris PeBenito |
93c49b |
dev_read_misc($2)
|
|
Chris PeBenito |
93c49b |
dev_write_misc($2)
|
|
Chris PeBenito |
93c49b |
# open office is looking for the following
|
|
Chris PeBenito |
93c49b |
dev_getattr_agp_dev($2)
|
|
Chris PeBenito |
93c49b |
dev_dontaudit_rw_dri($2)
|
|
Chris PeBenito |
93c49b |
# GNOME checks for usb and other devices:
|
|
Chris PeBenito |
93c49b |
dev_rw_usbfs($2)
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
miscfiles_read_fonts($2)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
xserver_common_x_domain_template(user, $2)
|
|
Chris PeBenito |
93c49b |
xserver_xsession_entry_type($2)
|
|
Chris PeBenito |
93c49b |
xserver_dontaudit_write_log($2)
|
|
Chris PeBenito |
93c49b |
xserver_stream_connect_xdm($2)
|
|
Chris PeBenito |
93c49b |
# certain apps want to read xdm.pid file
|
|
Chris PeBenito |
93c49b |
xserver_read_xdm_pid($2)
|
|
Chris PeBenito |
93c49b |
# gnome-session creates socket under /tmp/.ICE-unix/
|
|
Chris PeBenito |
93c49b |
xserver_create_xdm_tmp_sockets($2)
|
|
Chris PeBenito |
93c49b |
# Needed for escd, remove if we get escd policy
|
|
Chris PeBenito |
93c49b |
xserver_manage_xdm_tmp_files($2)
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
# Client write xserver shm
|
|
Chris PeBenito |
93c49b |
tunable_policy(`allow_write_xshm',`
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_t:shm rw_shm_perms;
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_tmpfs_t:file rw_file_perms;
|
|
Chris PeBenito |
93c49b |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
##############################
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
2c12b4 |
# User X object manager local policy
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# manage: xhost X11:ChangeHosts
|
|
Chris PeBenito |
2c12b4 |
# freeze: metacity X11:GrabKey
|
|
Chris PeBenito |
2c12b4 |
# force_cursor: metacity X11:GrabPointer
|
|
Chris PeBenito |
296273 |
allow $2 xserver_t:x_device { manage freeze force_cursor };
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# gnome-settings-daemon XKEYBOARD:SetControls
|
|
Chris PeBenito |
296273 |
allow $2 xserver_t:x_server manage;
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# gnome-settings-daemon RANDR:SelectInput
|
|
Chris PeBenito |
296273 |
allow $2 xserver_t:x_resource write;
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# metacity X11:InstallColormap X11:UninstallColormap
|
|
Chris PeBenito |
296273 |
allow $2 rootwindow_t:x_colormap { install uninstall };
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# read: gnome-settings-daemon RANDR:GetScreenSizeRange
|
|
Chris PeBenito |
2c12b4 |
# write: gnome-settings-daemon RANDR:SelectInput
|
|
Chris PeBenito |
2c12b4 |
# setattr: gnome-settings-daemon X11:GrabKey
|
|
Chris PeBenito |
2c12b4 |
# manage: metacity X11:ChangeWindowAttributes
|
|
Chris PeBenito |
296273 |
allow $2 rootwindow_t:x_drawable { read write manage setattr };
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# setattr: metacity X11:InstallColormap
|
|
Chris PeBenito |
296273 |
allow $2 xserver_t:x_screen { saver_getattr saver_setattr setattr };
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# xrdb X11:ChangeProperty prop=RESOURCE_MANAGER
|
|
Chris PeBenito |
296273 |
allow $2 info_xproperty_t:x_property { create append write };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
93c49b |
########################################
|
|
Chris PeBenito |
93c49b |
## <summary>
|
|
Chris PeBenito |
93c49b |
## Rules required for using the X Windows server
|
|
Chris PeBenito |
93c49b |
## and environment.
|
|
Chris PeBenito |
93c49b |
## </summary>
|
|
Chris PeBenito |
93c49b |
## <param name="role">
|
|
Chris PeBenito |
93c49b |
## <summary>
|
|
Chris PeBenito |
93c49b |
## Role allowed access.
|
|
Chris PeBenito |
93c49b |
## </summary>
|
|
Chris PeBenito |
93c49b |
## </param>
|
|
Chris PeBenito |
93c49b |
## <param name="domain">
|
|
Chris PeBenito |
93c49b |
## <summary>
|
|
Chris PeBenito |
93c49b |
## Domain allowed access.
|
|
Chris PeBenito |
93c49b |
## </summary>
|
|
Chris PeBenito |
93c49b |
## </param>
|
|
Chris PeBenito |
93c49b |
#
|
|
Chris PeBenito |
93c49b |
interface(`xserver_role',`
|
|
Chris PeBenito |
93c49b |
gen_require(`
|
|
Chris PeBenito |
93c49b |
type iceauth_home_t, xserver_t, xserver_tmpfs_t, xauth_home_t;
|
|
Chris PeBenito |
93c49b |
type user_fonts_t, user_fonts_cache_t, user_fonts_config_t;
|
|
Chris PeBenito |
93c49b |
')
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
xserver_restricted_role($1, $2)
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
# Communicate via System V shared memory.
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_t:shm rw_shm_perms;
|
|
Chris PeBenito |
93c49b |
allow $2 xserver_tmpfs_t:file rw_file_perms;
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
allow $2 iceauth_home_t:file manage_file_perms;
|
|
Chris PeBenito |
93c49b |
allow $2 iceauth_home_t:file { relabelfrom relabelto };
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
allow $2 xauth_home_t:file manage_file_perms;
|
|
Chris PeBenito |
93c49b |
allow $2 xauth_home_t:file { relabelfrom relabelto };
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
manage_dirs_pattern($2, user_fonts_t, user_fonts_t)
|
|
Chris PeBenito |
93c49b |
manage_files_pattern($2, user_fonts_t, user_fonts_t)
|
|
Chris PeBenito |
93c49b |
relabel_dirs_pattern($2, user_fonts_t, user_fonts_t)
|
|
Chris PeBenito |
93c49b |
relabel_files_pattern($2, user_fonts_t, user_fonts_t)
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
manage_dirs_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
93c49b |
manage_files_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
93c49b |
relabel_dirs_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
93c49b |
relabel_files_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
manage_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
Chris PeBenito |
93c49b |
manage_files_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
Chris PeBenito |
93c49b |
relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
Chris PeBenito |
93c49b |
relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
93c49b |
')
|
|
Chris PeBenito |
93c49b |
|
|
Chris PeBenito |
17de1b |
#######################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create sessions on the X server, with read-only
|
|
Chris PeBenito |
17de1b |
## access to the X server shared
|
|
Chris PeBenito |
17de1b |
## memory segments.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
## <param name="tmpfs_type">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the domain SYSV tmpfs files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_ro_session',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t, xserver_tmp_t, xserver_tmpfs_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Xserver read/write client shm
|
|
Chris PeBenito |
296273 |
allow xserver_t $1:fd use;
|
|
Chris PeBenito |
296273 |
allow xserver_t $1:shm rw_shm_perms;
|
|
Chris PeBenito |
296273 |
allow xserver_t $2:file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Connect to xserver
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:process signal;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Read /tmp/.X0-lock
|
|
Chris PeBenito |
296273 |
allow $1 xserver_tmp_t:file { getattr read };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Client read xserver shm
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:fd use;
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:shm r_shm_perms;
|
|
Chris PeBenito |
296273 |
allow $1 xserver_tmpfs_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
#######################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create sessions on the X server, with read and write
|
|
Chris PeBenito |
17de1b |
## access to the X server shared
|
|
Chris PeBenito |
17de1b |
## memory segments.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
## <param name="tmpfs_type">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the domain SYSV tmpfs files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_rw_session',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t, xserver_tmpfs_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
xserver_ro_session($1,$2)
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:shm rw_shm_perms;
|
|
Chris PeBenito |
296273 |
allow $1 xserver_tmpfs_t:file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
#######################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create full client sessions
|
|
Chris PeBenito |
17de1b |
## on a user X server.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
## <param name="tmpfs_type">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the domain SYSV tmpfs files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_user_client',`
|
|
Chris PeBenito |
427989 |
refpolicywarn(`$0() has been deprecated, please use xserver_user_x_domain_template instead.')
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_t, xdm_tmp_t;
|
|
Chris PeBenito |
296273 |
type xauth_home_t, iceauth_home_t, xserver_t, xserver_tmpfs_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
allow $1 self:shm create_shm_perms;
|
|
Chris PeBenito |
296273 |
allow $1 self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
allow $1 self:unix_stream_socket { connectto create_stream_socket_perms };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Read .Xauthority file
|
|
Chris PeBenito |
296273 |
allow $1 xauth_home_t:file { getattr read };
|
|
Chris PeBenito |
296273 |
allow $1 iceauth_home_t:file { getattr read };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# for when /tmp/.X11-unix is created by the system
|
|
Chris PeBenito |
296273 |
allow $1 xdm_t:fd use;
|
|
Chris PeBenito |
296273 |
allow $1 xdm_t:fifo_file { getattr read write ioctl };
|
|
Chris PeBenito |
296273 |
allow $1 xdm_tmp_t:dir search;
|
|
Chris PeBenito |
296273 |
allow $1 xdm_tmp_t:sock_file { read write };
|
|
Chris PeBenito |
296273 |
dontaudit $1 xdm_t:tcp_socket { read write };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow connections to X server.
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
miscfiles_read_fonts($1)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs($1)
|
|
Chris PeBenito |
17de1b |
# for .xsession-errors
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_write_user_home_content_files($1)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
xserver_ro_session($1,$2)
|
|
Chris PeBenito |
296273 |
xserver_use_user_fonts($1)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
xserver_read_xdm_tmp_files($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
17de1b |
# Client write xserver shm
|
|
Chris PeBenito |
17de1b |
tunable_policy(`allow_write_xshm',`
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:shm rw_shm_perms;
|
|
Chris PeBenito |
296273 |
allow $1 xserver_tmpfs_t:file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
2c12b4 |
#######################################
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## Interface to provide X object permissions on a given X server to
|
|
Chris PeBenito |
2c12b4 |
## an X client domain. Provides the minimal set required by a basic
|
|
Chris PeBenito |
2c12b4 |
## X client application.
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## <param name="prefix">
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## The prefix of the X client domain (e.g., user
|
|
Chris PeBenito |
2c12b4 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## </param>
|
|
Chris PeBenito |
2c12b4 |
## <param name="domain">
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## Client domain allowed access.
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## </param>
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
2c12b4 |
template(`xserver_common_x_domain_template',`
|
|
Chris PeBenito |
2c12b4 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type $1_xproperty_t, $1_input_xevent_t, $1_property_xevent_t;
|
|
Chris PeBenito |
296273 |
type $1_focus_xevent_t, $1_manage_xevent_t, $1_default_xevent_t;
|
|
Chris PeBenito |
296273 |
type $1_client_xevent_t;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type rootwindow_t, xproperty_t;
|
|
Chris PeBenito |
2c12b4 |
type input_xevent_t, focus_xevent_t, property_xevent_t, manage_xevent_t;
|
|
Chris PeBenito |
2c12b4 |
type xevent_t, client_xevent_t;
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
attribute x_domain;
|
|
Chris PeBenito |
2c12b4 |
attribute xproperty_type;
|
|
Chris PeBenito |
296273 |
attribute xevent_type;
|
|
Chris PeBenito |
296273 |
attribute input_xevent_type;
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
class x_drawable all_x_drawable_perms;
|
|
Chris PeBenito |
2c12b4 |
class x_property all_x_property_perms;
|
|
Chris PeBenito |
2c12b4 |
class x_event all_x_event_perms;
|
|
Chris PeBenito |
2c12b4 |
class x_synthetic_event all_x_synthetic_event_perms;
|
|
Chris PeBenito |
2c12b4 |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
##############################
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
296273 |
# Local Policy
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# Type attributes
|
|
Chris PeBenito |
296273 |
typeattribute $2 x_domain;
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
# X Properties
|
|
Chris PeBenito |
296273 |
# can read and write client properties
|
|
Chris PeBenito |
296273 |
allow $2 $1_xproperty_t:x_property { create destroy read write append };
|
|
Chris PeBenito |
296273 |
type_transition $2 xproperty_t:x_property $1_xproperty_t;
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
# X Windows
|
|
Chris PeBenito |
296273 |
# new windows have the domain type
|
|
Chris PeBenito |
296273 |
type_transition $2 rootwindow_t:x_drawable $2;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# X Input
|
|
Chris PeBenito |
296273 |
# can receive own events
|
|
Chris PeBenito |
296273 |
allow $2 $1_input_xevent_t:{ x_event x_synthetic_event } receive;
|
|
Chris PeBenito |
296273 |
allow $2 $1_property_xevent_t:{ x_event x_synthetic_event } receive;
|
|
Chris PeBenito |
296273 |
allow $2 $1_focus_xevent_t:{ x_event x_synthetic_event } receive;
|
|
Chris PeBenito |
296273 |
allow $2 $1_manage_xevent_t:{ x_event x_synthetic_event } receive;
|
|
Chris PeBenito |
296273 |
allow $2 $1_default_xevent_t:{ x_event x_synthetic_event } receive;
|
|
Chris PeBenito |
296273 |
allow $2 $1_client_xevent_t:{ x_event x_synthetic_event } receive;
|
|
Chris PeBenito |
296273 |
type_transition $2 input_xevent_t:x_event $1_input_xevent_t;
|
|
Chris PeBenito |
296273 |
type_transition $2 property_xevent_t:x_event $1_property_xevent_t;
|
|
Chris PeBenito |
296273 |
type_transition $2 focus_xevent_t:x_event $1_focus_xevent_t;
|
|
Chris PeBenito |
296273 |
type_transition $2 manage_xevent_t:x_event $1_manage_xevent_t;
|
|
Chris PeBenito |
296273 |
type_transition $2 client_xevent_t:x_event $1_client_xevent_t;
|
|
Chris PeBenito |
296273 |
type_transition $2 xevent_t:x_event $1_default_xevent_t;
|
|
Chris PeBenito |
296273 |
# can send ICCCM events to myself
|
|
Chris PeBenito |
296273 |
allow $2 $1_manage_xevent_t:x_synthetic_event send;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
#######################################
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Template for creating the set of types used
|
|
Chris PeBenito |
296273 |
## in an X windows domain.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="prefix">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The prefix of the X client domain (e.g., user
|
|
Chris PeBenito |
296273 |
## is the prefix for user_t).
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
template(`xserver_object_types_template',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute xproperty_type, input_xevent_type, xevent_type;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
##############################
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
296273 |
# Declarations
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
# Types for properties
|
|
Chris PeBenito |
296273 |
type $1_xproperty_t alias $1_default_xproperty_t, xproperty_type;
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_xproperty_t)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
# Types for events
|
|
Chris PeBenito |
296273 |
type $1_input_xevent_t, input_xevent_type, xevent_type;
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_input_xevent_t)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
type $1_property_xevent_t, xevent_type;
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_property_xevent_t)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
type $1_focus_xevent_t, xevent_type;
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_focus_xevent_t)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
type $1_manage_xevent_t, xevent_type;
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_manage_xevent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type $1_default_xevent_t, xevent_type;
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_default_xevent_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type $1_client_xevent_t, xevent_type;
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_client_xevent_t)
|
|
Chris PeBenito |
2c12b4 |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
#######################################
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## Interface to provide X object permissions on a given X server to
|
|
Chris PeBenito |
2c12b4 |
## an X client domain. Provides the minimal set required by a basic
|
|
Chris PeBenito |
2c12b4 |
## X client application.
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## <param name="prefix">
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## The prefix of the X client domain (e.g., user
|
|
Chris PeBenito |
2c12b4 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## </param>
|
|
Chris PeBenito |
2c12b4 |
## <param name="domain">
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## Client domain allowed access.
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## </param>
|
|
Chris PeBenito |
2c12b4 |
## <param name="tmpfs_type">
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## The type of the domain SYSV tmpfs files.
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## </param>
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
2c12b4 |
template(`xserver_user_x_domain_template',`
|
|
Chris PeBenito |
2c12b4 |
gen_require(`
|
|
Chris PeBenito |
2c12b4 |
type xdm_t, xdm_tmp_t;
|
|
Chris PeBenito |
296273 |
type xauth_home_t, iceauth_home_t, xserver_t, xserver_tmpfs_t;
|
|
Chris PeBenito |
2c12b4 |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
allow $2 self:shm create_shm_perms;
|
|
Chris PeBenito |
296273 |
allow $2 self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
allow $2 self:unix_stream_socket { connectto create_stream_socket_perms };
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# Read .Xauthority file
|
|
Chris PeBenito |
296273 |
allow $2 xauth_home_t:file read_file_perms;
|
|
Chris PeBenito |
296273 |
allow $2 iceauth_home_t:file read_file_perms;
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# for when /tmp/.X11-unix is created by the system
|
|
Chris PeBenito |
296273 |
allow $2 xdm_t:fd use;
|
|
Chris PeBenito |
296273 |
allow $2 xdm_t:fifo_file { getattr read write ioctl };
|
|
Chris PeBenito |
296273 |
allow $2 xdm_tmp_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
allow $2 xdm_tmp_t:sock_file { read write };
|
|
Chris PeBenito |
296273 |
dontaudit $2 xdm_t:tcp_socket { read write };
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# Allow connections to X server.
|
|
Chris PeBenito |
296273 |
files_search_tmp($2)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
miscfiles_read_fonts($2)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs($2)
|
|
Chris PeBenito |
2c12b4 |
# for .xsession-errors
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_write_user_home_content_files($2)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
xserver_ro_session($2,$3)
|
|
Chris PeBenito |
296273 |
xserver_use_user_fonts($2)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
296273 |
xserver_read_xdm_tmp_files($2)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# X object manager
|
|
Chris PeBenito |
296273 |
xserver_object_types_template($1)
|
|
Chris PeBenito |
296273 |
xserver_common_x_domain_template($1,$2)
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
# Client write xserver shm
|
|
Chris PeBenito |
2c12b4 |
tunable_policy(`allow_write_xshm',`
|
|
Chris PeBenito |
296273 |
allow $2 xserver_t:shm rw_shm_perms;
|
|
Chris PeBenito |
296273 |
allow $2 xserver_tmpfs_t:file rw_file_perms;
|
|
Chris PeBenito |
2c12b4 |
')
|
|
Chris PeBenito |
2c12b4 |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read user fonts, user font configuration,
|
|
Chris PeBenito |
17de1b |
## and manage the user font cache.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <desc>
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## Read user fonts, user font configuration,
|
|
Chris PeBenito |
17de1b |
## and manage the user font cache.
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## This is a templated interface, and should only
|
|
Chris PeBenito |
17de1b |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## </desc>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_use_user_fonts',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_fonts_t, user_fonts_cache_t, user_fonts_config_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Read per user fonts
|
|
Chris PeBenito |
296273 |
allow $1 user_fonts_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
allow $1 user_fonts_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Manipulate the global font cache
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($1, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern($1, user_fonts_cache_t, user_fonts_cache_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Read per user font config
|
|
Chris PeBenito |
296273 |
allow $1 user_fonts_config_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
allow $1 user_fonts_config_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs($1)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Transition to the Xauthority domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_domtrans_xauth',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xauth_t, xauth_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
domtrans_pattern($1, xauth_exec_t, xauth_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create a Xauthority file in the user home directory.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_user_home_dir_filetrans_user_xauth',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xauth_home_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans($1, xauth_home_t, file)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read all users fonts, user font configurations,
|
|
Chris PeBenito |
17de1b |
## and manage all users font caches.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_use_all_users_fonts',`
|
|
Chris PeBenito |
296273 |
refpolicywarn(`$0() has been deprecated, please use xserver_use_user_fonts.')
|
|
Chris PeBenito |
296273 |
xserver_use_user_fonts($1)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
4967aa |
## Read all users .Xauthority.
|
|
Chris PeBenito |
4967aa |
## </summary>
|
|
Chris PeBenito |
4967aa |
## <param name="domain">
|
|
Chris PeBenito |
4967aa |
## <summary>
|
|
Chris PeBenito |
4967aa |
## Domain allowed access.
|
|
Chris PeBenito |
4967aa |
## </summary>
|
|
Chris PeBenito |
4967aa |
## </param>
|
|
Chris PeBenito |
4967aa |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_read_user_xauth',`
|
|
Chris PeBenito |
4967aa |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xauth_home_t;
|
|
Chris PeBenito |
4967aa |
')
|
|
Chris PeBenito |
4967aa |
|
|
Chris PeBenito |
296273 |
allow $1 xauth_home_t:file read_file_perms;
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs($1)
|
|
Chris PeBenito |
4967aa |
')
|
|
Chris PeBenito |
4967aa |
|
|
Chris PeBenito |
4967aa |
########################################
|
|
Chris PeBenito |
4967aa |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Set the attributes of the X windows console named pipes.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_setattr_console_pipes',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xconsole_device_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 xconsole_device_t:fifo_file setattr;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read and write the X windows console named pipe.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_rw_console',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xconsole_device_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
5f63dd |
allow $1 xconsole_device_t:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Use file descriptors for xdm.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_use_xdm_fds',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 xdm_t:fd use;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Do not audit attempts to inherit
|
|
Chris PeBenito |
d6d16b |
## XDM file descriptors.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## <param name="domain">
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Domain to not audit.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## </param>
|
|
Chris PeBenito |
d6d16b |
#
|
|
Chris PeBenito |
d6d16b |
interface(`xserver_dontaudit_use_xdm_fds',`
|
|
Chris PeBenito |
d6d16b |
gen_require(`
|
|
Chris PeBenito |
d6d16b |
type xdm_t;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
dontaudit $1 xdm_t:fd use;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
########################################
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read and write XDM unnamed pipes.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_rw_xdm_pipes',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 xdm_t:fifo_file { getattr read write };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Do not audit attempts to read and write
|
|
Chris PeBenito |
d6d16b |
## XDM unnamed pipes.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## <param name="domain">
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Domain to not audit.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## </param>
|
|
Chris PeBenito |
d6d16b |
#
|
|
Chris PeBenito |
d6d16b |
interface(`xserver_dontaudit_rw_xdm_pipes',`
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
gen_require(`
|
|
Chris PeBenito |
d6d16b |
type xdm_t;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
e66689 |
dontaudit $1 xdm_t:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
########################################
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Connect to XDM over a unix domain
|
|
Chris PeBenito |
17de1b |
## stream socket.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_stream_connect_xdm',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
eac818 |
type xdm_t, xdm_tmp_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
eac818 |
files_search_tmp($1)
|
|
Chris PeBenito |
0bfccd |
stream_connect_pattern($1, xdm_tmp_t, xdm_tmp_t, xdm_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read xdm-writable configuration files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_read_xdm_rw_config',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_rw_etc_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_etc($1)
|
|
Chris PeBenito |
82d277 |
allow $1 xdm_rw_etc_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Set the attributes of XDM temporary directories.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_setattr_xdm_tmp_dirs',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_tmp_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow $1 xdm_tmp_t:dir setattr;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Create a named socket in a XDM
|
|
Chris PeBenito |
17de1b |
## temporary directory.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_create_xdm_tmp_sockets',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_tmp_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_tmp($1)
|
|
Chris PeBenito |
c0868a |
allow $1 xdm_tmp_t:dir list_dir_perms;
|
|
Chris PeBenito |
0bfccd |
create_sock_files_pattern($1, xdm_tmp_t, xdm_tmp_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read XDM pid files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_read_xdm_pid',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_var_run_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_pids($1)
|
|
Chris PeBenito |
c0868a |
allow $1 xdm_var_run_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
ff8f0a |
## Read XDM var lib files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
ff8f0a |
## <summary>
|
|
Chris PeBenito |
ff8f0a |
## Domain allowed access.
|
|
Chris PeBenito |
ff8f0a |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_read_xdm_lib_files',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xdm_var_lib_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
82d277 |
allow $1 xdm_var_lib_t:file read_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Make an X session script an entrypoint for the specified domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The domain for which the shell is an entrypoint.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_xsession_entry_type',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xsession_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
domain_entry_file($1, xsession_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute an X session in the target domain. This
|
|
Chris PeBenito |
17de1b |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
17de1b |
## caller to use setexeccon().
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <desc>
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## Execute an Xsession in the target domain. This
|
|
Chris PeBenito |
17de1b |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
17de1b |
## caller to use setexeccon().
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## No interprocess communication (signals, pipes,
|
|
Chris PeBenito |
17de1b |
## etc.) is provided by this interface since
|
|
Chris PeBenito |
17de1b |
## the domains are not owned by this module.
|
|
Chris PeBenito |
17de1b |
##
|
|
Chris PeBenito |
17de1b |
## </desc>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
## <param name="target_domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The type of the shell process.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_xsession_spec_domtrans',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xsession_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
domain_trans($1, xsession_exec_t, $2)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Get the attributes of X server logs.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_getattr_log',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xserver_log_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_search_logs($1)
|
|
Chris PeBenito |
17de1b |
allow $1 xserver_log_t:file getattr;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Do not audit attempts to write the X server
|
|
Chris PeBenito |
17de1b |
## log files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_dontaudit_write_log',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xserver_log_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dontaudit $1 xserver_log_t:file { append write };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Do not audit attempts to write the X server
|
|
Chris PeBenito |
17de1b |
## log files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_delete_log',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xserver_log_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_search_logs($1)
|
|
Chris PeBenito |
c0868a |
allow $1 xserver_log_t:dir list_dir_perms;
|
|
Chris PeBenito |
0bfccd |
delete_files_pattern($1, xserver_log_t, xserver_log_t)
|
|
Chris PeBenito |
0bfccd |
delete_fifo_files_pattern($1, xserver_log_t, xserver_log_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read X keyboard extension libraries.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`xserver_read_xkb_libs',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type xkb_var_lib_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_var_lib($1)
|
|
Chris PeBenito |
17de1b |
allow $1 xkb_var_lib_t:dir list_dir_perms;
|
|
Chris PeBenito |
0bfccd |
read_files_pattern($1, xkb_var_lib_t, xkb_var_lib_t)
|
|
Chris PeBenito |
0bfccd |
read_lnk_files_pattern($1, xkb_var_lib_t, xkb_var_lib_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Read xdm temporary files.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
eac818 |
interface(`xserver_read_xdm_tmp_files',`
|
|
Chris PeBenito |
eac818 |
gen_require(`
|
|
Chris PeBenito |
eac818 |
type xdm_tmp_t;
|
|
Chris PeBenito |
eac818 |
')
|
|
Chris PeBenito |
eac818 |
|
|
Chris PeBenito |
6b19be |
files_search_tmp($1)
|
|
Chris PeBenito |
0bfccd |
read_files_pattern($1, xdm_tmp_t, xdm_tmp_t)
|
|
Chris PeBenito |
eac818 |
')
|
|
Chris PeBenito |
eac818 |
|
|
Chris PeBenito |
eac818 |
########################################
|
|
Chris PeBenito |
eac818 |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Do not audit attempts to read xdm temporary files.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain to not audit
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
interface(`xserver_dontaudit_read_xdm_tmp_files',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type xdm_tmp_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
dontaudit $1 xdm_tmp_t:dir search_dir_perms;
|
|
Chris PeBenito |
ef659a |
dontaudit $1 xdm_tmp_t:file read_file_perms;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Read write xdm temporary files.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain to not audit
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
interface(`xserver_rw_xdm_tmp_files',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type xdm_tmp_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
allow $1 xdm_tmp_t:dir search_dir_perms;
|
|
Chris PeBenito |
6b19be |
allow $1 xdm_tmp_t:file rw_file_perms;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Create, read, write, and delete xdm temporary files.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain to not audit
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
interface(`xserver_manage_xdm_tmp_files',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type xdm_tmp_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern($1, xdm_tmp_t, xdm_tmp_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## dontaudit getattr xdm temporary named sockets.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain to not audit
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
interface(`xserver_dontaudit_getattr_xdm_tmp_sockets',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type xdm_tmp_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
dontaudit $1 xdm_tmp_t:sock_file getattr;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute the X server in the X server domain.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_domtrans',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t, xserver_exec_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:process siginh;
|
|
Chris PeBenito |
296273 |
domtrans_pattern($1, xserver_exec_t, xserver_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Signal X servers
|
|
Chris PeBenito |
75beb9 |
## </summary>
|
|
Chris PeBenito |
75beb9 |
## <param name="domain">
|
|
Chris PeBenito |
75beb9 |
## <summary>
|
|
Chris PeBenito |
75beb9 |
## Domain to not audit
|
|
Chris PeBenito |
75beb9 |
## </summary>
|
|
Chris PeBenito |
75beb9 |
## </param>
|
|
Chris PeBenito |
75beb9 |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_signal',`
|
|
Chris PeBenito |
75beb9 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t;
|
|
Chris PeBenito |
75beb9 |
')
|
|
Chris PeBenito |
75beb9 |
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:process signal;
|
|
Chris PeBenito |
75beb9 |
')
|
|
Chris PeBenito |
75beb9 |
|
|
Chris PeBenito |
75beb9 |
########################################
|
|
Chris PeBenito |
75beb9 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Kill X servers
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_kill',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:process sigkill;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read and write X server Sys V Shared
|
|
Chris PeBenito |
296273 |
## memory segments.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_rw_shm',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
allow $1 xserver_t:shm rw_shm_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Do not audit attempts to read and write to
|
|
Chris PeBenito |
296273 |
## X server sockets.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to not audit
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_dontaudit_rw_tcp_sockets',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
dontaudit $1 xserver_t:tcp_socket { read write };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to read and write X server
|
|
Chris PeBenito |
6b19be |
## unix domain stream sockets.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_dontaudit_rw_stream_sockets',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
296273 |
dontaudit $1 xserver_t:unix_stream_socket { read write };
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
296273 |
## Connect to the X server over a unix domain
|
|
Chris PeBenito |
17de1b |
## stream socket.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_stream_connect',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_t, xserver_tmp_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_tmp($1)
|
|
Chris PeBenito |
296273 |
stream_connect_pattern($1, xserver_tmp_t, xserver_tmp_t, xserver_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
########################################
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read X server temporary files.
|
|
Chris PeBenito |
21ea2b |
## </summary>
|
|
Chris PeBenito |
21ea2b |
## <param name="domain">
|
|
Chris PeBenito |
21ea2b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit
|
|
Chris PeBenito |
21ea2b |
## </summary>
|
|
Chris PeBenito |
21ea2b |
## </param>
|
|
Chris PeBenito |
21ea2b |
#
|
|
Chris PeBenito |
296273 |
interface(`xserver_read_tmp_files',`
|
|
Chris PeBenito |
21ea2b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type xserver_tmp_t;
|
|
Chris PeBenito |
21ea2b |
')
|
|
Chris PeBenito |
21ea2b |
|
|
Chris PeBenito |
296273 |
allow $1 xserver_tmp_t:file read_file_perms;
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
21ea2b |
')
|
|
Chris PeBenito |
21ea2b |
|
|
Chris PeBenito |
21ea2b |
########################################
|
|
Chris PeBenito |
21ea2b |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## Interface to provide X object permissions on a given X server to
|
|
Chris PeBenito |
2c12b4 |
## an X client domain. Gives the domain complete control over the
|
|
Chris PeBenito |
2c12b4 |
## display.
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## <param name="domain">
|
|
Chris PeBenito |
2c12b4 |
## <summary>
|
|
Chris PeBenito |
2c12b4 |
## Domain allowed access.
|
|
Chris PeBenito |
2c12b4 |
## </summary>
|
|
Chris PeBenito |
2c12b4 |
## </param>
|
|
Chris PeBenito |
2c12b4 |
#
|
|
Chris PeBenito |
2c12b4 |
interface(`xserver_unconfined',`
|
|
Chris PeBenito |
2c12b4 |
gen_require(`
|
|
Chris PeBenito |
2c12b4 |
attribute xserver_unconfined_type;
|
|
Chris PeBenito |
2c12b4 |
')
|
|
Chris PeBenito |
2c12b4 |
|
|
Chris PeBenito |
2c12b4 |
typeattribute $1 xserver_unconfined_type;
|
|
Chris PeBenito |
2c12b4 |
')
|