2006-01-19 22:01:48 +00:00
|
|
|
## <summary>X Windows Server</summary>
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
########################################
|
2006-01-19 22:01:48 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Rules required for using the X Windows server
|
2009-08-28 17:29:36 +00:00
|
|
|
## and environment, for restricted users.
|
2006-01-19 22:01:48 +00:00
|
|
|
## </summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 22:01:48 +00:00
|
|
|
## </param>
|
2008-11-05 16:10:46 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 22:01:48 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2009-08-28 17:29:36 +00:00
|
|
|
interface(`xserver_restricted_role',`
|
2006-11-29 13:44:40 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t, xserver_exec_t, xserver_tmp_t, xserver_tmpfs_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
type user_fonts_t, user_fonts_cache_t, user_fonts_config_t, xdm_tmp_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
type iceauth_t, iceauth_exec_t, iceauth_home_t;
|
|
|
|
type xauth_t, xauth_exec_t, xauth_home_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
class dbus send_msg;
|
2008-11-05 16:10:46 +00:00
|
|
|
')
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
role $1 types { xserver_t xauth_t iceauth_t };
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2009-08-28 17:29:36 +00:00
|
|
|
# Xserver read/write client shm
|
|
|
|
allow xserver_t $2:fd use;
|
|
|
|
allow xserver_t $2:shm rw_shm_perms;
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern($2, xserver_exec_t, xserver_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
allow xserver_t $2:process { getpgid signal };
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xserver_t $2:shm rw_shm_perms;
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2009-08-28 17:29:36 +00:00
|
|
|
allow $2 user_fonts_t:dir list_dir_perms;
|
|
|
|
allow $2 user_fonts_t:file read_file_perms;
|
2010-09-08 16:06:20 +00:00
|
|
|
allow $2 user_fonts_t:lnk_file read_lnk_file_perms;
|
2009-08-28 17:29:36 +00:00
|
|
|
|
|
|
|
allow $2 user_fonts_config_t:dir list_dir_perms;
|
|
|
|
allow $2 user_fonts_config_t:file read_file_perms;
|
2006-03-28 18:29:52 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
manage_dirs_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
|
|
manage_files_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
2006-03-28 18:29:52 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
stream_connect_pattern($2, xserver_tmp_t, xserver_tmp_t, xserver_t)
|
2010-09-20 17:53:44 +00:00
|
|
|
allow $2 xserver_tmp_t:sock_file delete_sock_file_perms;
|
2009-08-28 17:29:36 +00:00
|
|
|
files_search_tmp($2)
|
2006-01-19 22:01:48 +00:00
|
|
|
|
|
|
|
# Communicate via System V shared memory.
|
2009-08-28 17:29:36 +00:00
|
|
|
allow $2 xserver_t:shm r_shm_perms;
|
|
|
|
allow $2 xserver_tmpfs_t:file read_file_perms;
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# allow ps to show iceauth
|
|
|
|
ps_process_pattern($2, iceauth_t)
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern($2, iceauth_exec_t, iceauth_t)
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2009-08-28 17:29:36 +00:00
|
|
|
allow $2 iceauth_home_t:file read_file_perms;
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern($2, xauth_exec_t, xauth_t)
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $2 xauth_t:process signal;
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2006-01-20 20:10:35 +00:00
|
|
|
# allow ps to show xauth
|
2009-06-26 14:40:13 +00:00
|
|
|
ps_process_pattern($2, xauth_t)
|
2009-08-28 17:29:36 +00:00
|
|
|
allow $2 xserver_t:process signal;
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2009-08-28 17:29:36 +00:00
|
|
|
allow $2 xauth_home_t:file read_file_perms;
|
|
|
|
|
|
|
|
# for when /tmp/.X11-unix is created by the system
|
|
|
|
allow $2 xdm_t:fd use;
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $2 xdm_t:fifo_file rw_inherited_fifo_file_perms;
|
2010-08-26 13:41:21 +00:00
|
|
|
allow $2 xdm_tmp_t:dir search_dir_perms;
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $2 xdm_tmp_t:sock_file rw_inherited_sock_file_perms;
|
2009-08-28 17:29:36 +00:00
|
|
|
dontaudit $2 xdm_t:tcp_socket { read write };
|
2010-09-15 20:09:15 +00:00
|
|
|
dontaudit $2 xdm_tmp_t:dir setattr_dir_perms;
|
2010-08-26 13:41:21 +00:00
|
|
|
|
|
|
|
allow $2 xdm_t:dbus send_msg;
|
|
|
|
allow xdm_t $2:dbus send_msg;
|
2009-08-28 17:29:36 +00:00
|
|
|
|
|
|
|
# Client read xserver shm
|
|
|
|
allow $2 xserver_t:fd use;
|
|
|
|
allow $2 xserver_tmpfs_t:file read_file_perms;
|
|
|
|
|
|
|
|
# Read /tmp/.X0-lock
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $2 xserver_tmp_t:file read_inherited_file_perms;
|
2009-08-28 17:29:36 +00:00
|
|
|
|
|
|
|
dev_rw_xserver_misc($2)
|
|
|
|
dev_rw_power_management($2)
|
|
|
|
dev_read_input($2)
|
|
|
|
dev_read_misc($2)
|
|
|
|
dev_write_misc($2)
|
|
|
|
# open office is looking for the following
|
|
|
|
dev_getattr_agp_dev($2)
|
2010-08-26 13:41:21 +00:00
|
|
|
|
2009-08-28 17:29:36 +00:00
|
|
|
# GNOME checks for usb and other devices:
|
|
|
|
dev_rw_usbfs($2)
|
|
|
|
|
|
|
|
miscfiles_read_fonts($2)
|
2010-08-26 13:41:21 +00:00
|
|
|
miscfiles_setattr_fonts_cache_dirs($2)
|
2010-09-22 20:42:32 +00:00
|
|
|
miscfiles_read_hwdata($2)
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_common_x_domain_template(user, $2)
|
2009-08-28 17:29:36 +00:00
|
|
|
xserver_xsession_entry_type($2)
|
|
|
|
xserver_dontaudit_write_log($2)
|
|
|
|
xserver_stream_connect_xdm($2)
|
|
|
|
# certain apps want to read xdm.pid file
|
|
|
|
xserver_read_xdm_pid($2)
|
|
|
|
# gnome-session creates socket under /tmp/.ICE-unix/
|
|
|
|
xserver_create_xdm_tmp_sockets($2)
|
|
|
|
# Needed for escd, remove if we get escd policy
|
|
|
|
xserver_manage_xdm_tmp_files($2)
|
2010-09-27 14:21:54 +00:00
|
|
|
xserver_read_xdm_etc_files($2)
|
2009-08-28 17:29:36 +00:00
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
ifdef(`hide_broken_symptoms',`
|
2010-09-15 19:48:12 +00:00
|
|
|
dontaudit iceauth_t $2:socket_class_set { read write };
|
|
|
|
')
|
|
|
|
|
2009-08-28 17:29:36 +00:00
|
|
|
# Client write xserver shm
|
|
|
|
tunable_policy(`allow_write_xshm',`
|
|
|
|
allow $2 xserver_t:shm rw_shm_perms;
|
|
|
|
allow $2 xserver_tmpfs_t:file rw_file_perms;
|
|
|
|
')
|
2010-09-15 19:48:12 +00:00
|
|
|
|
|
|
|
tunable_policy(`user_direct_dri',`
|
|
|
|
dev_rw_dri($2)
|
|
|
|
')
|
2010-09-22 20:42:32 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
gnome_read_gconf_config($2)
|
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
')
|
|
|
|
|
2009-08-28 17:29:36 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Rules required for using the X Windows server
|
|
|
|
## and environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_role',`
|
|
|
|
gen_require(`
|
|
|
|
type iceauth_home_t, xserver_t, xserver_tmpfs_t, xauth_home_t;
|
|
|
|
type user_fonts_t, user_fonts_cache_t, user_fonts_config_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
xserver_restricted_role($1, $2)
|
|
|
|
|
|
|
|
# Communicate via System V shared memory.
|
|
|
|
allow $2 xserver_t:shm rw_shm_perms;
|
|
|
|
allow $2 xserver_tmpfs_t:file rw_file_perms;
|
|
|
|
|
|
|
|
allow $2 iceauth_home_t:file manage_file_perms;
|
2010-09-16 08:45:36 +00:00
|
|
|
allow $2 iceauth_home_t:file relabel_file_perms;
|
2009-08-28 17:29:36 +00:00
|
|
|
|
|
|
|
allow $2 xauth_home_t:file manage_file_perms;
|
2010-09-16 08:45:36 +00:00
|
|
|
allow $2 xauth_home_t:file relabel_file_perms;
|
2009-08-28 17:29:36 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
mls_xwin_read_to_clearance($2)
|
2009-08-28 17:29:36 +00:00
|
|
|
manage_dirs_pattern($2, user_fonts_t, user_fonts_t)
|
|
|
|
manage_files_pattern($2, user_fonts_t, user_fonts_t)
|
2010-09-08 16:06:20 +00:00
|
|
|
allow $2 user_fonts_t:lnk_file read_lnk_file_perms;
|
2009-08-28 17:29:36 +00:00
|
|
|
relabel_dirs_pattern($2, user_fonts_t, user_fonts_t)
|
|
|
|
relabel_files_pattern($2, user_fonts_t, user_fonts_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
|
|
manage_files_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
|
|
relabel_dirs_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
|
|
relabel_files_pattern($2, user_fonts_cache_t, user_fonts_cache_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
|
|
manage_files_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
|
|
relabel_dirs_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
|
|
relabel_files_pattern($2, user_fonts_config_t, user_fonts_config_t)
|
|
|
|
')
|
|
|
|
|
2006-02-15 16:42:51 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Create sessions on the X server, with read-only
|
2006-02-15 16:42:51 +00:00
|
|
|
## access to the X server shared
|
|
|
|
## memory segments.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="tmpfs_type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the domain SYSV tmpfs files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_ro_session',`
|
2006-02-15 16:42:51 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t, xserver_tmp_t, xserver_tmpfs_t;
|
2006-02-15 16:42:51 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
# Xserver read/write client shm
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xserver_t $1:fd use;
|
|
|
|
allow xserver_t $1:shm rw_shm_perms;
|
|
|
|
allow xserver_t $2:file rw_file_perms;
|
2006-02-15 16:42:51 +00:00
|
|
|
|
|
|
|
# Connect to xserver
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xserver_t:unix_stream_socket connectto;
|
|
|
|
allow $1 xserver_t:process signal;
|
2006-02-15 16:42:51 +00:00
|
|
|
|
|
|
|
# Read /tmp/.X0-lock
|
2010-08-26 13:41:21 +00:00
|
|
|
allow $1 xserver_tmp_t:file read_file_perms;
|
2006-02-15 16:42:51 +00:00
|
|
|
|
|
|
|
# Client read xserver shm
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xserver_t:fd use;
|
|
|
|
allow $1 xserver_t:shm r_shm_perms;
|
|
|
|
allow $1 xserver_tmpfs_t:file read_file_perms;
|
2006-02-15 16:42:51 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Create sessions on the X server, with read and write
|
2006-02-15 16:42:51 +00:00
|
|
|
## access to the X server shared
|
|
|
|
## memory segments.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="tmpfs_type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the domain SYSV tmpfs files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_rw_session',`
|
2006-02-15 16:42:51 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t, xserver_tmpfs_t;
|
2006-02-15 16:42:51 +00:00
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-20 17:40:18 +00:00
|
|
|
xserver_ro_session($1, $2)
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xserver_t:shm rw_shm_perms;
|
|
|
|
allow $1 xserver_tmpfs_t:file rw_file_perms;
|
2006-02-15 16:42:51 +00:00
|
|
|
')
|
|
|
|
|
2010-02-12 15:29:00 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create non-drawing client sessions on an X server.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_non_drawing_client',`
|
|
|
|
gen_require(`
|
|
|
|
class x_drawable { getattr get_property };
|
|
|
|
class x_extension { query use };
|
|
|
|
class x_gc { create setattr };
|
|
|
|
class x_property read;
|
|
|
|
|
|
|
|
type xserver_t, xdm_var_run_t;
|
|
|
|
type xextension_t, xproperty_t, root_xdrawable_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 self:x_gc { create setattr };
|
|
|
|
|
2010-09-20 17:53:44 +00:00
|
|
|
allow $1 xdm_var_run_t:dir search_dir_perms;
|
2010-02-12 15:29:00 +00:00
|
|
|
allow $1 xserver_t:unix_stream_socket connectto;
|
|
|
|
|
|
|
|
allow $1 xextension_t:x_extension { query use };
|
|
|
|
allow $1 root_xdrawable_t:x_drawable { getattr get_property };
|
|
|
|
allow $1 xproperty_t:x_property read;
|
|
|
|
')
|
|
|
|
|
2006-02-15 16:42:51 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Create full client sessions
|
2006-02-15 16:42:51 +00:00
|
|
|
## on a user X server.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="tmpfs_type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the domain SYSV tmpfs files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_user_client',`
|
2009-08-28 17:40:29 +00:00
|
|
|
refpolicywarn(`$0() has been deprecated, please use xserver_user_x_domain_template instead.')
|
2006-02-15 16:42:51 +00:00
|
|
|
gen_require(`
|
|
|
|
type xdm_t, xdm_tmp_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
type xauth_home_t, iceauth_home_t, xserver_t, xserver_tmpfs_t;
|
2006-02-15 16:42:51 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 self:shm create_shm_perms;
|
|
|
|
allow $1 self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow $1 self:unix_stream_socket { connectto create_stream_socket_perms };
|
2006-02-15 16:42:51 +00:00
|
|
|
|
|
|
|
# Read .Xauthority file
|
2010-08-26 13:41:21 +00:00
|
|
|
allow $1 xauth_home_t:file read_file_perms;
|
|
|
|
allow $1 iceauth_home_t:file read_file_perms;
|
2006-02-15 16:42:51 +00:00
|
|
|
|
|
|
|
# for when /tmp/.X11-unix is created by the system
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xdm_t:fd use;
|
2010-08-26 13:41:21 +00:00
|
|
|
allow $1 xdm_t:fifo_file rw_inherited_fifo_file_perms;
|
2010-09-20 17:53:44 +00:00
|
|
|
allow $1 xdm_tmp_t:dir search_dir_perms;
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xdm_tmp_t:sock_file { read write };
|
|
|
|
dontaudit $1 xdm_t:tcp_socket { read write };
|
2006-02-15 16:42:51 +00:00
|
|
|
|
|
|
|
# Allow connections to X server.
|
2008-11-05 16:10:46 +00:00
|
|
|
files_search_tmp($1)
|
2006-02-15 16:42:51 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
miscfiles_read_fonts($1)
|
2006-02-15 16:42:51 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_search_user_home_dirs($1)
|
2006-02-15 16:42:51 +00:00
|
|
|
# for .xsession-errors
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_write_user_home_content_files($1)
|
2006-02-15 16:42:51 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_ro_session($1,$2)
|
|
|
|
xserver_use_user_fonts($1)
|
2006-02-15 16:42:51 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_read_xdm_tmp_files($1)
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2006-02-15 16:42:51 +00:00
|
|
|
# Client write xserver shm
|
|
|
|
tunable_policy(`allow_write_xshm',`
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xserver_t:shm rw_shm_perms;
|
|
|
|
allow $1 xserver_tmpfs_t:file rw_file_perms;
|
2006-02-15 16:42:51 +00:00
|
|
|
')
|
2006-03-28 18:29:52 +00:00
|
|
|
')
|
2006-02-15 16:42:51 +00:00
|
|
|
|
2008-04-01 20:23:23 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Interface to provide X object permissions on a given X server to
|
|
|
|
## an X client domain. Provides the minimal set required by a basic
|
|
|
|
## X client application.
|
|
|
|
## </summary>
|
|
|
|
## <param name="prefix">
|
|
|
|
## <summary>
|
|
|
|
## The prefix of the X client domain (e.g., user
|
|
|
|
## is the prefix for user_t).
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Client domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
template(`xserver_common_x_domain_template',`
|
|
|
|
gen_require(`
|
2010-09-20 17:44:58 +00:00
|
|
|
type root_xdrawable_t, xdm_t, xserver_t;
|
2009-10-28 02:19:25 +00:00
|
|
|
type xproperty_t, $1_xproperty_t;
|
2008-04-01 20:23:23 +00:00
|
|
|
type xevent_t, client_xevent_t;
|
2009-10-28 02:19:25 +00:00
|
|
|
type input_xevent_t, $1_input_xevent_t;
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2010-09-15 20:19:38 +00:00
|
|
|
attribute x_domain, input_xevent_type;
|
2009-10-28 02:19:25 +00:00
|
|
|
attribute xdrawable_type, xcolormap_type;
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
class x_drawable all_x_drawable_perms;
|
|
|
|
class x_property all_x_property_perms;
|
|
|
|
class x_event all_x_event_perms;
|
|
|
|
class x_synthetic_event all_x_synthetic_event_perms;
|
2010-08-26 13:41:21 +00:00
|
|
|
class x_client destroy;
|
|
|
|
class x_server manage;
|
|
|
|
class x_screen { saver_setattr saver_hide saver_show };
|
|
|
|
class x_pointer { get_property set_property manage };
|
|
|
|
class x_keyboard { read manage };
|
2008-04-01 20:23:23 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
##############################
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
# Local Policy
|
2008-04-01 20:23:23 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# Type attributes
|
2008-11-05 16:10:46 +00:00
|
|
|
typeattribute $2 x_domain;
|
2009-10-28 02:19:25 +00:00
|
|
|
typeattribute $2 xdrawable_type, xcolormap_type;
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# X Properties
|
2009-10-28 02:19:25 +00:00
|
|
|
# disable property transitions for the time being.
|
|
|
|
# type_transition $2 xproperty_t:x_property $1_xproperty_t;
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# X Windows
|
|
|
|
# new windows have the domain type
|
2009-10-28 02:19:25 +00:00
|
|
|
type_transition $2 root_xdrawable_t:x_drawable $2;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# X Input
|
2009-10-28 02:19:25 +00:00
|
|
|
# distinguish input events
|
|
|
|
type_transition $2 input_xevent_t:x_event $1_input_xevent_t;
|
|
|
|
# can send own events
|
|
|
|
allow $2 $1_input_xevent_t:{ x_event x_synthetic_event } send;
|
2008-11-05 16:10:46 +00:00
|
|
|
# can receive own events
|
|
|
|
allow $2 $1_input_xevent_t:{ x_event x_synthetic_event } receive;
|
2009-10-28 02:19:25 +00:00
|
|
|
# can receive default events
|
|
|
|
allow $2 client_xevent_t:{ x_event x_synthetic_event } receive;
|
|
|
|
allow $2 xevent_t:{ x_event x_synthetic_event } receive;
|
|
|
|
# dont audit send failures
|
|
|
|
dontaudit $2 input_xevent_type:x_event send;
|
2010-08-26 13:41:21 +00:00
|
|
|
|
|
|
|
allow $2 xdm_t:x_drawable { hide read add_child manage };
|
|
|
|
allow $2 xdm_t:x_client destroy;
|
|
|
|
|
|
|
|
allow $2 root_xdrawable_t:x_drawable write;
|
|
|
|
allow $2 xserver_t:x_server manage;
|
|
|
|
allow $2 xserver_t:x_screen { saver_setattr saver_hide saver_show };
|
|
|
|
allow $2 xserver_t:x_pointer { get_property set_property manage };
|
|
|
|
allow $2 xserver_t:x_keyboard { read manage };
|
2008-11-05 16:10:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Template for creating the set of types used
|
|
|
|
## in an X windows domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="prefix">
|
|
|
|
## <summary>
|
|
|
|
## The prefix of the X client domain (e.g., user
|
|
|
|
## is the prefix for user_t).
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
template(`xserver_object_types_template',`
|
|
|
|
gen_require(`
|
|
|
|
attribute xproperty_type, input_xevent_type, xevent_type;
|
|
|
|
')
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
##############################
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
# Declarations
|
2008-04-01 20:23:23 +00:00
|
|
|
#
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# Types for properties
|
2009-10-28 02:19:25 +00:00
|
|
|
type $1_xproperty_t, xproperty_type;
|
2008-11-05 16:10:46 +00:00
|
|
|
ubac_constrained($1_xproperty_t)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# Types for events
|
|
|
|
type $1_input_xevent_t, input_xevent_type, xevent_type;
|
|
|
|
ubac_constrained($1_input_xevent_t)
|
2008-04-01 20:23:23 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Interface to provide X object permissions on a given X server to
|
|
|
|
## an X client domain. Provides the minimal set required by a basic
|
|
|
|
## X client application.
|
|
|
|
## </summary>
|
|
|
|
## <param name="prefix">
|
|
|
|
## <summary>
|
|
|
|
## The prefix of the X client domain (e.g., user
|
|
|
|
## is the prefix for user_t).
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Client domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="tmpfs_type">
|
|
|
|
## <summary>
|
|
|
|
## The type of the domain SYSV tmpfs files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
template(`xserver_user_x_domain_template',`
|
|
|
|
gen_require(`
|
2010-09-20 17:44:58 +00:00
|
|
|
type xdm_t, xdm_tmp_t, xserver_tmpfs_t;
|
|
|
|
type xauth_home_t, iceauth_home_t, xserver_t;
|
2008-04-01 20:23:23 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $2 self:shm create_shm_perms;
|
|
|
|
allow $2 self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow $2 self:unix_stream_socket { connectto create_stream_socket_perms };
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
# Read .Xauthority file
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $2 xauth_home_t:file read_file_perms;
|
|
|
|
allow $2 iceauth_home_t:file read_file_perms;
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
# for when /tmp/.X11-unix is created by the system
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $2 xdm_t:fd use;
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $2 xdm_t:fifo_file rw_inherited_fifo_file_perms;
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $2 xdm_tmp_t:dir search_dir_perms;
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $2 xdm_tmp_t:sock_file rw_inherited_sock_file_perms;
|
2008-11-05 16:10:46 +00:00
|
|
|
dontaudit $2 xdm_t:tcp_socket { read write };
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
# Allow connections to X server.
|
2008-11-05 16:10:46 +00:00
|
|
|
files_search_tmp($2)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
miscfiles_read_fonts($2)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_search_user_home_dirs($2)
|
2008-04-01 20:23:23 +00:00
|
|
|
# for .xsession-errors
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_write_user_home_content_files($2)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
xserver_ro_session($2, $3)
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_use_user_fonts($2)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_read_xdm_tmp_files($2)
|
2010-08-26 13:41:21 +00:00
|
|
|
xserver_read_xdm_pid($2)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
# X object manager
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_object_types_template($1)
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
xserver_common_x_domain_template($1, $2)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
# Client write xserver shm
|
|
|
|
tunable_policy(`allow_write_xshm',`
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $2 xserver_t:shm rw_shm_perms;
|
|
|
|
allow $2 xserver_tmpfs_t:file rw_file_perms;
|
2008-04-01 20:23:23 +00:00
|
|
|
')
|
2010-09-15 19:48:12 +00:00
|
|
|
|
|
|
|
tunable_policy(`user_direct_dri',`
|
|
|
|
dev_rw_dri($2)
|
|
|
|
')
|
2008-04-01 20:23:23 +00:00
|
|
|
')
|
|
|
|
|
2006-03-28 18:29:52 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read user fonts, user font configuration,
|
|
|
|
## and manage the user font cache.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Read user fonts, user font configuration,
|
|
|
|
## and manage the user font cache.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This is a templated interface, and should only
|
|
|
|
## be called from a per-userdomain template.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_use_user_fonts',`
|
2006-03-28 18:29:52 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type user_fonts_t, user_fonts_cache_t, user_fonts_config_t;
|
2006-03-28 18:29:52 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
# Read per user fonts
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 user_fonts_t:dir list_dir_perms;
|
|
|
|
allow $1 user_fonts_t:file read_file_perms;
|
2010-09-08 16:06:20 +00:00
|
|
|
allow $1 user_fonts_t:lnk_file read_lnk_file_perms;
|
2006-03-28 18:29:52 +00:00
|
|
|
|
|
|
|
# Manipulate the global font cache
|
2008-11-05 16:10:46 +00:00
|
|
|
manage_dirs_pattern($1, user_fonts_cache_t, user_fonts_cache_t)
|
|
|
|
manage_files_pattern($1, user_fonts_cache_t, user_fonts_cache_t)
|
2006-03-28 18:29:52 +00:00
|
|
|
|
|
|
|
# Read per user font config
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 user_fonts_config_t:dir list_dir_perms;
|
|
|
|
allow $1 user_fonts_config_t:file read_file_perms;
|
2006-03-28 18:29:52 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_search_user_home_dirs($1)
|
2006-02-15 16:42:51 +00:00
|
|
|
')
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
2006-01-19 22:01:48 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Transition to the Xauthority domain.
|
2006-01-19 22:01:48 +00:00
|
|
|
## </summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-19 22:01:48 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_domtrans_xauth',`
|
2006-01-30 22:51:35 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xauth_t, xauth_exec_t;
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern($1, xauth_exec_t, xauth_t)
|
2010-09-15 19:48:12 +00:00
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
ifdef(`hide_broken_symptoms',`
|
2010-09-08 14:25:03 +00:00
|
|
|
dontaudit xauth_t $1:socket_class_set { read write };
|
|
|
|
')
|
2010-08-26 13:41:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Dontaudit exec of Xauthority program.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_dontaudit_exec_xauth',`
|
|
|
|
gen_require(`
|
|
|
|
type xauth_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 xauth_exec_t:file execute;
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Create a Xauthority file in the user home directory.
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_user_home_dir_filetrans_user_xauth',`
|
2007-02-16 23:01:42 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xauth_home_t;
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_user_home_dir_filetrans($1, xauth_home_t, file)
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2006-03-28 18:29:52 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all users fonts, user font configurations,
|
|
|
|
## and manage all users font caches.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_use_all_users_fonts',`
|
2008-11-05 16:10:46 +00:00
|
|
|
refpolicywarn(`$0() has been deprecated, please use xserver_use_user_fonts.')
|
|
|
|
xserver_use_user_fonts($1)
|
2006-03-28 18:29:52 +00:00
|
|
|
')
|
|
|
|
|
2007-05-03 14:15:38 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all users .Xauthority.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_read_user_xauth',`
|
2007-05-03 14:15:38 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xauth_home_t;
|
2007-05-03 14:15:38 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xauth_home_t:file read_file_perms;
|
|
|
|
userdom_search_user_home_dirs($1)
|
2010-08-26 13:41:21 +00:00
|
|
|
xserver_read_xdm_pid($1)
|
2007-05-03 14:15:38 +00:00
|
|
|
')
|
|
|
|
|
2006-04-06 19:27:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of the X windows console named pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_setattr_console_pipes',`
|
|
|
|
gen_require(`
|
|
|
|
type xconsole_device_t;
|
|
|
|
')
|
|
|
|
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $1 xconsole_device_t:fifo_file setattr_fifo_file_perms;
|
2006-04-06 19:27:41 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the X windows console named pipe.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_rw_console',`
|
|
|
|
gen_require(`
|
|
|
|
type xconsole_device_t;
|
|
|
|
')
|
|
|
|
|
2007-12-04 15:11:53 +00:00
|
|
|
allow $1 xconsole_device_t:fifo_file rw_fifo_file_perms;
|
2006-04-06 19:27:41 +00:00
|
|
|
')
|
|
|
|
|
2006-05-17 14:50:31 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Use file descriptors for xdm.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_use_xdm_fds',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_t;
|
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
allow $1 xdm_t:fd use;
|
2006-05-17 14:50:31 +00:00
|
|
|
')
|
|
|
|
|
2006-12-04 20:10:56 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to inherit
|
|
|
|
## XDM file descriptors.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_dontaudit_use_xdm_fds',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_t;
|
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
dontaudit $1 xdm_t:fd use;
|
2006-12-04 20:10:56 +00:00
|
|
|
')
|
|
|
|
|
2006-05-17 14:50:31 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write XDM unnamed pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2006-12-04 20:10:56 +00:00
|
|
|
## Domain allowed access.
|
2006-05-17 14:50:31 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_rw_xdm_pipes',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_t;
|
|
|
|
')
|
|
|
|
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $1 xdm_t:fifo_file rw_inherited_fifo_file_perms;
|
2006-05-17 14:50:31 +00:00
|
|
|
')
|
|
|
|
|
2006-12-04 20:10:56 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and write
|
|
|
|
## XDM unnamed pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_dontaudit_rw_xdm_pipes',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_t;
|
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
dontaudit $1 xdm_t:fifo_file rw_fifo_file_perms;
|
2006-12-04 20:10:56 +00:00
|
|
|
')
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Connect to XDM over a unix domain
|
|
|
|
## stream socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_stream_connect_xdm',`
|
|
|
|
gen_require(`
|
2010-09-15 20:19:38 +00:00
|
|
|
type xdm_t, xdm_tmp_t, xdm_var_run_t;
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
files_search_tmp($1)
|
2010-09-15 19:37:38 +00:00
|
|
|
files_search_pids($1)
|
2010-09-20 18:03:48 +00:00
|
|
|
stream_connect_pattern($1, { xdm_tmp_t xdm_var_run_t }, { xdm_tmp_t xdm_var_run_t }, xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2006-02-07 21:48:00 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read xdm-writable configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-02-07 21:48:00 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-02-07 21:48:00 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_read_xdm_rw_config',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_rw_etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 xdm_rw_etc_t:file read_file_perms;
|
2006-02-07 21:48:00 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the attributes of XDM temporary directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-02-07 21:48:00 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-02-07 21:48:00 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_setattr_xdm_tmp_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_tmp_t;
|
|
|
|
')
|
|
|
|
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $1 xdm_tmp_t:dir setattr_dir_perms;
|
2006-02-07 21:48:00 +00:00
|
|
|
')
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create a named socket in a XDM
|
|
|
|
## temporary directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`xserver_create_xdm_tmp_sockets',`
|
2006-01-30 22:51:35 +00:00
|
|
|
gen_require(`
|
|
|
|
type xdm_tmp_t;
|
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
files_search_tmp($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 xdm_tmp_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
create_sock_files_pattern($1, xdm_tmp_t, xdm_tmp_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
2006-01-20 22:02:24 +00:00
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read XDM pid files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_read_xdm_pid',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_var_run_t;
|
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
files_search_pids($1)
|
2010-08-26 13:41:21 +00:00
|
|
|
read_files_pattern($1, xdm_var_run_t, xdm_var_run_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2006-03-21 18:07:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-12-03 19:16:20 +00:00
|
|
|
## Read XDM var lib files.
|
2006-03-21 18:07:53 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2008-12-03 19:16:20 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
2006-03-21 18:07:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_read_xdm_lib_files',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_var_lib_t;
|
|
|
|
')
|
|
|
|
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 xdm_var_lib_t:file read_file_perms;
|
2006-03-21 18:07:53 +00:00
|
|
|
')
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make an X session script an entrypoint for the specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## The domain for which the shell is an entrypoint.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_xsession_entry_type',`
|
|
|
|
gen_require(`
|
|
|
|
type xsession_exec_t;
|
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
domain_entry_file($1, xsession_exec_t)
|
2006-01-19 22:01:48 +00:00
|
|
|
')
|
2006-01-20 20:10:35 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## Execute an X session in the target domain. This
|
|
|
|
## is an explicit transition, requiring the
|
|
|
|
## caller to use setexeccon().
|
2006-01-20 20:10:35 +00:00
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
2006-01-30 22:51:35 +00:00
|
|
|
## Execute an Xsession in the target domain. This
|
|
|
|
## is an explicit transition, requiring the
|
|
|
|
## caller to use setexeccon().
|
2006-01-20 20:10:35 +00:00
|
|
|
## </p>
|
|
|
|
## <p>
|
2006-01-30 22:51:35 +00:00
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
2006-01-20 20:10:35 +00:00
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-20 20:10:35 +00:00
|
|
|
## </param>
|
2006-01-30 22:51:35 +00:00
|
|
|
## <param name="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## The type of the shell process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## </param>
|
2006-01-20 20:10:35 +00:00
|
|
|
#
|
2006-01-30 22:51:35 +00:00
|
|
|
interface(`xserver_xsession_spec_domtrans',`
|
2006-01-20 20:10:35 +00:00
|
|
|
gen_require(`
|
2006-01-30 22:51:35 +00:00
|
|
|
type xsession_exec_t;
|
2006-01-20 20:10:35 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
domain_trans($1, xsession_exec_t, $2)
|
2006-01-20 20:10:35 +00:00
|
|
|
')
|
|
|
|
|
2006-04-03 19:49:47 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of X server logs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_getattr_log',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
2010-09-15 20:09:15 +00:00
|
|
|
allow $1 xserver_log_t:file getattr_file_perms;
|
2006-04-03 19:49:47 +00:00
|
|
|
')
|
|
|
|
|
2006-01-20 20:10:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2006-01-30 22:51:35 +00:00
|
|
|
## Do not audit attempts to write the X server
|
|
|
|
## log files.
|
2006-01-20 20:10:35 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-20 20:10:35 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-30 22:51:35 +00:00
|
|
|
interface(`xserver_dontaudit_write_log',`
|
2006-01-20 20:10:35 +00:00
|
|
|
gen_require(`
|
2006-01-30 22:51:35 +00:00
|
|
|
type xserver_log_t;
|
2006-01-20 20:10:35 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
dontaudit $1 xserver_log_t:file rw_inherited_file_perms;
|
2006-01-20 20:10:35 +00:00
|
|
|
')
|
2006-02-07 21:48:00 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Delete X server log files.
|
2006-02-07 21:48:00 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-02-07 21:48:00 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_delete_log',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 xserver_log_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
delete_files_pattern($1, xserver_log_t, xserver_log_t)
|
|
|
|
delete_fifo_files_pattern($1, xserver_log_t, xserver_log_t)
|
2006-02-07 21:48:00 +00:00
|
|
|
')
|
2006-03-09 19:02:29 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read X keyboard extension libraries.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2006-03-09 19:02:29 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_read_xkb_libs',`
|
|
|
|
gen_require(`
|
|
|
|
type xkb_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
allow $1 xkb_var_lib_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, xkb_var_lib_t, xkb_var_lib_t)
|
|
|
|
read_lnk_files_pattern($1, xkb_var_lib_t, xkb_var_lib_t)
|
2006-03-09 19:02:29 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read xdm config files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_read_xdm_etc_files',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_etc_t;
|
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
files_search_etc($1)
|
2010-08-26 13:41:21 +00:00
|
|
|
read_files_pattern($1, xdm_etc_t, xdm_etc_t)
|
2010-09-22 20:42:32 +00:00
|
|
|
read_lnk_files_pattern($1, xdm_etc_t, xdm_etc_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage xdm config files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_manage_xdm_etc_files',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_etc_t;
|
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
files_search_etc($1)
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_files_pattern($1, xdm_etc_t, xdm_etc_t)
|
|
|
|
')
|
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read xdm temporary files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2006-09-01 15:52:05 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_read_xdm_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_tmp_t;
|
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
files_search_tmp($1)
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, xdm_tmp_t, xdm_tmp_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read xdm temporary files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_dontaudit_read_xdm_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 xdm_tmp_t:dir search_dir_perms;
|
2007-10-09 17:29:48 +00:00
|
|
|
dontaudit $1 xdm_tmp_t:file read_file_perms;
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read write xdm temporary files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_rw_xdm_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_tmp_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 xdm_tmp_t:dir search_dir_perms;
|
|
|
|
allow $1 xdm_tmp_t:file rw_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete xdm temporary files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_manage_xdm_tmp_files',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_tmp_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, xdm_tmp_t, xdm_tmp_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## xdm temporary named sockets.
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_dontaudit_getattr_xdm_tmp_sockets',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_tmp_t;
|
|
|
|
')
|
|
|
|
|
2010-09-15 20:09:15 +00:00
|
|
|
dontaudit $1 xdm_tmp_t:sock_file getattr_sock_file_perms;
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2006-09-06 16:36:23 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Execute the X server in the X server domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2008-11-05 16:10:46 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_t, xserver_exec_t;
|
|
|
|
')
|
|
|
|
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
allow $1 xserver_t:process siginh;
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern($1, xserver_exec_t, xserver_t)
|
2010-08-31 22:36:43 +00:00
|
|
|
|
|
|
|
allow xserver_t $1:process getpgid;
|
2008-11-05 16:10:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Signal X servers
|
2006-09-06 16:36:23 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2006-09-06 16:36:23 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_signal',`
|
2006-09-06 16:36:23 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t;
|
2006-09-06 16:36:23 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xserver_t:process signal;
|
2006-09-06 16:36:23 +00:00
|
|
|
')
|
|
|
|
|
2006-03-09 19:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Kill X servers
|
2006-03-09 19:02:29 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2006-03-09 19:02:29 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_kill',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 xserver_t:process sigkill;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write X server Sys V Shared
|
|
|
|
## memory segments.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_rw_shm',`
|
2006-03-09 19:02:29 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t;
|
2006-03-09 19:02:29 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xserver_t:shm rw_shm_perms;
|
2006-03-09 19:02:29 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and write to
|
2008-11-05 16:10:46 +00:00
|
|
|
## X server sockets.
|
2006-03-09 19:02:29 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2006-03-09 19:02:29 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_dontaudit_rw_tcp_sockets',`
|
2006-03-09 19:02:29 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t;
|
2006-03-09 19:02:29 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
dontaudit $1 xserver_t:tcp_socket { read write };
|
2006-03-09 19:02:29 +00:00
|
|
|
')
|
2006-06-07 17:43:10 +00:00
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Do not audit attempts to read and write X server
|
2007-02-16 23:01:42 +00:00
|
|
|
## unix domain stream sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain to not audit.
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_dontaudit_rw_stream_sockets',`
|
2007-02-16 23:01:42 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t;
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
dontaudit $1 xserver_t:unix_stream_socket { read write };
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2006-06-07 17:43:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Connect to the X server over a unix domain
|
2006-06-07 17:43:10 +00:00
|
|
|
## stream socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-08 14:25:03 +00:00
|
|
|
interface(`xserver_stream_connect',`
|
2006-06-07 17:43:10 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t, xserver_tmp_t;
|
2006-06-07 17:43:10 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
files_search_tmp($1)
|
2008-11-05 16:10:46 +00:00
|
|
|
stream_connect_pattern($1, xserver_tmp_t, xserver_tmp_t, xserver_t)
|
2010-09-08 13:29:02 +00:00
|
|
|
allow xserver_t $1:shm rw_shm_perms;
|
2006-06-07 17:43:10 +00:00
|
|
|
')
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-09-12 15:54:11 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Read X server temporary files.
|
2008-09-12 15:54:11 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain allowed access.
|
2008-09-12 15:54:11 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
interface(`xserver_read_tmp_files',`
|
2008-09-12 15:54:11 +00:00
|
|
|
gen_require(`
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_tmp_t;
|
2008-09-12 15:54:11 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow $1 xserver_tmp_t:file read_file_perms;
|
|
|
|
files_search_tmp($1)
|
2008-09-12 15:54:11 +00:00
|
|
|
')
|
|
|
|
|
2009-10-28 02:19:25 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Interface to provide X object permissions on a given X server to
|
|
|
|
## an X client domain. Gives the domain permission to read the
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-15 19:36:17 +00:00
|
|
|
## virtual core keyboard and virtual core pointer devices.
|
2009-10-28 02:19:25 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_manage_core_devices',`
|
|
|
|
gen_require(`
|
2010-09-15 20:19:38 +00:00
|
|
|
type xserver_t, root_xdrawable_t;
|
2009-10-28 02:19:25 +00:00
|
|
|
class x_device all_x_device_perms;
|
|
|
|
class x_pointer all_x_pointer_perms;
|
|
|
|
class x_keyboard all_x_keyboard_perms;
|
2010-08-26 13:41:21 +00:00
|
|
|
class x_screen all_x_screen_perms;
|
|
|
|
class x_drawable { manage };
|
|
|
|
attribute x_domain;
|
|
|
|
class x_drawable { read manage setattr show };
|
|
|
|
class x_resource { write read };
|
2009-10-28 02:19:25 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 xserver_t:{ x_device x_pointer x_keyboard } *;
|
2010-08-26 13:41:21 +00:00
|
|
|
allow $1 xserver_t:{ x_screen } setattr;
|
|
|
|
|
|
|
|
allow $1 x_domain:x_drawable { read manage setattr show };
|
|
|
|
allow $1 x_domain:x_resource { write read };
|
|
|
|
allow $1 root_xdrawable_t:x_drawable { manage read };
|
2009-10-28 02:19:25 +00:00
|
|
|
')
|
|
|
|
|
2008-04-01 20:23:23 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Interface to provide X object permissions on a given X server to
|
|
|
|
## an X client domain. Gives the domain complete control over the
|
|
|
|
## display.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_unconfined',`
|
|
|
|
gen_require(`
|
2010-09-15 20:19:38 +00:00
|
|
|
attribute x_domain, xserver_unconfined_type;
|
2008-04-01 20:23:23 +00:00
|
|
|
')
|
|
|
|
|
2009-10-28 02:19:25 +00:00
|
|
|
typeattribute $1 x_domain;
|
2008-04-01 20:23:23 +00:00
|
|
|
typeattribute $1 xserver_unconfined_type;
|
|
|
|
')
|
2010-08-26 13:41:21 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Dontaudit append to .xsession-errors file
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_dontaudit_append_xdm_home_files',`
|
|
|
|
gen_require(`
|
2010-09-15 20:19:38 +00:00
|
|
|
type xdm_home_t, xserver_tmp_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 xdm_home_t:file rw_inherited_file_perms;
|
|
|
|
dontaudit $1 xserver_tmp_t:file rw_inherited_file_perms;
|
|
|
|
|
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_dontaudit_rw_nfs_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_dontaudit_rw_cifs_files($1)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## append to .xsession-errors file
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_append_xdm_home_files',`
|
|
|
|
gen_require(`
|
2010-09-15 20:19:38 +00:00
|
|
|
type xdm_home_t, xserver_tmp_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 xdm_home_t:file append_file_perms;
|
|
|
|
allow $1 xserver_tmp_t:file append_file_perms;
|
|
|
|
|
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_append_nfs_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_append_cifs_files($1)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage the xdm_spool files
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_xdm_manage_spool',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_spool($1)
|
|
|
|
manage_files_pattern($1, xdm_spool_t, xdm_spool_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send and receive messages from
|
|
|
|
## xdm over dbus.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_dbus_chat_xdm',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_t;
|
|
|
|
class dbus send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 xdm_t:dbus send_msg;
|
|
|
|
allow xdm_t $1:dbus send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read xserver files created in /var/run
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_read_pid',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_pids($1)
|
|
|
|
read_files_pattern($1, xserver_var_run_t, xserver_var_run_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute xserver files created in /var/run
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_exec_pid',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_pids($1)
|
|
|
|
exec_files_pattern($1, xserver_var_run_t, xserver_var_run_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Write xserver files created in /var/run
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_write_pid',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_pids($1)
|
|
|
|
write_files_pattern($1, xserver_var_run_t, xserver_var_run_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow append the xdm
|
|
|
|
## log files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_xdm_append_log',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_log_t;
|
|
|
|
attribute xdmhomewriter;
|
|
|
|
')
|
|
|
|
|
|
|
|
typeattribute $1 xdmhomewriter;
|
|
|
|
append_files_pattern($1, xdm_log_t, xdm_log_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read a user Iceauthority domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-21 07:09:43 +00:00
|
|
|
interface(`xserver_read_user_iceauth',`
|
2010-08-26 13:41:21 +00:00
|
|
|
gen_require(`
|
|
|
|
type iceauth_home_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
# Read .Iceauthority file
|
|
|
|
allow $1 iceauth_home_t:file read_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-23 19:14:34 +00:00
|
|
|
## Read/write inherited user homedir fonts.
|
2010-08-26 13:41:21 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_rw_inherited_user_fonts',`
|
|
|
|
gen_require(`
|
2010-09-15 20:19:38 +00:00
|
|
|
type user_fonts_t, user_fonts_config_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 user_fonts_t:file rw_inherited_file_perms;
|
|
|
|
allow $1 user_fonts_t:file read_lnk_file_perms;
|
|
|
|
|
|
|
|
allow $1 user_fonts_config_t:file rw_inherited_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search XDM var lib dirs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_search_xdm_lib',`
|
|
|
|
gen_require(`
|
|
|
|
type xdm_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 xdm_var_lib_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make an X executable an entrypoint for the specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The domain for which the shell is an entrypoint.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`xserver_entry_type',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domain_entry_file($1, xserver_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute xsever in the xserver domain, and
|
|
|
|
## allow the specified role the xserver domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to be allowed the xserver domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2010-09-15 19:59:34 +00:00
|
|
|
## <rolecap/>
|
2010-08-26 13:41:21 +00:00
|
|
|
#
|
|
|
|
interface(`xserver_run',`
|
|
|
|
gen_require(`
|
|
|
|
type xserver_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
xserver_domtrans($1)
|
|
|
|
role $2 types xserver_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute xsever in the xserver domain, and
|
|
|
|
## allow the specified role the xserver domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to be allowed the xserver domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2010-09-15 19:59:34 +00:00
|
|
|
## <rolecap/>
|
2010-08-26 13:41:21 +00:00
|
|
|
#
|
|
|
|
interface(`xserver_run_xauth',`
|
|
|
|
gen_require(`
|
|
|
|
type xauth_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
xserver_domtrans_xauth($1)
|
|
|
|
role $2 types xauth_t;
|
|
|
|
')
|
2010-09-23 19:14:34 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read user homedir fonts.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
2010-09-23 19:14:34 +00:00
|
|
|
interface(`xserver_read_home_fonts',`
|
|
|
|
gen_require(`
|
|
|
|
type user_fonts_t, user_fonts_config_t;
|
|
|
|
')
|
|
|
|
|
2010-09-23 21:39:31 +00:00
|
|
|
list_dirs_pattern($1, user_fonts_t, user_fonts_t)
|
2010-09-23 19:14:34 +00:00
|
|
|
read_files_pattern($1, user_fonts_t, user_fonts_t)
|
|
|
|
read_lnk_files_pattern($1, user_fonts_t, user_fonts_t)
|
|
|
|
|
|
|
|
read_files_pattern($1, user_fonts_config_t, user_fonts_config_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage user homedir fonts.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
2010-08-26 13:41:21 +00:00
|
|
|
interface(`xserver_manage_home_fonts',`
|
|
|
|
gen_require(`
|
2010-09-15 20:19:38 +00:00
|
|
|
type user_fonts_t, user_fonts_config_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
manage_dirs_pattern($1, user_fonts_t, user_fonts_t)
|
|
|
|
manage_files_pattern($1, user_fonts_t, user_fonts_t)
|
|
|
|
manage_lnk_files_pattern($1, user_fonts_t, user_fonts_t)
|
|
|
|
|
|
|
|
manage_files_pattern($1, user_fonts_config_t, user_fonts_config_t)
|
|
|
|
')
|