2019-01-12 20:03:59 +00:00
|
|
|
policy_module(xserver, 3.16.5)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
gen_require(`
|
|
|
|
class x_drawable all_x_drawable_perms;
|
|
|
|
class x_screen all_x_screen_perms;
|
|
|
|
class x_gc all_x_gc_perms;
|
|
|
|
class x_font all_x_font_perms;
|
|
|
|
class x_colormap all_x_colormap_perms;
|
|
|
|
class x_property all_x_property_perms;
|
|
|
|
class x_selection all_x_selection_perms;
|
|
|
|
class x_cursor all_x_cursor_perms;
|
|
|
|
class x_client all_x_client_perms;
|
|
|
|
class x_device all_x_device_perms;
|
2009-10-28 02:18:14 +00:00
|
|
|
class x_pointer all_x_pointer_perms;
|
|
|
|
class x_keyboard all_x_keyboard_perms;
|
2008-11-05 16:10:46 +00:00
|
|
|
class x_server all_x_server_perms;
|
|
|
|
class x_extension all_x_extension_perms;
|
|
|
|
class x_resource all_x_resource_perms;
|
|
|
|
class x_event all_x_event_perms;
|
|
|
|
class x_synthetic_event all_x_synthetic_event_perms;
|
|
|
|
')
|
2006-01-19 22:01:48 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
2007-03-26 18:41:45 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allows clients to write to the X server shared
|
|
|
|
## memory segments.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2008-07-23 21:38:39 +00:00
|
|
|
gen_tunable(allow_write_xshm, false)
|
2007-03-26 18:41:45 +00:00
|
|
|
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allow xdm logins as sysadm
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2008-07-23 21:38:39 +00:00
|
|
|
gen_tunable(xdm_sysadm_login, false)
|
2007-03-26 18:41:45 +00:00
|
|
|
|
2016-12-31 16:43:46 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Use gnome-shell in gdm mode as the
|
|
|
|
## X Display Manager (XDM)
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
gen_tunable(xserver_gnome_xdm, false)
|
|
|
|
|
2008-04-01 20:23:23 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Support X userspace object manager
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2008-07-23 21:38:39 +00:00
|
|
|
gen_tunable(xserver_object_manager, false)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
|
|
|
attribute x_domain;
|
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
# X Events
|
|
|
|
attribute xevent_type;
|
|
|
|
attribute input_xevent_type;
|
|
|
|
type xevent_t, xevent_type;
|
2009-11-02 13:48:58 +00:00
|
|
|
typealias xevent_t alias { user_property_xevent_t staff_property_xevent_t sysadm_property_xevent_t };
|
|
|
|
typealias xevent_t alias { auditadm_property_xevent_t secadm_property_xevent_t };
|
|
|
|
typealias xevent_t alias { user_focus_xevent_t staff_focus_xevent_t sysadm_focus_xevent_t };
|
|
|
|
typealias xevent_t alias { auditadm_focus_xevent_t secadm_focus_xevent_t };
|
|
|
|
typealias xevent_t alias { user_manage_xevent_t staff_manage_xevent_t sysadm_manage_xevent_t };
|
|
|
|
typealias xevent_t alias { auditadm_manage_xevent_t secadm_manage_xevent_t };
|
|
|
|
typealias xevent_t alias { user_default_xevent_t staff_default_xevent_t sysadm_default_xevent_t };
|
|
|
|
typealias xevent_t alias { auditadm_default_xevent_t secadm_default_xevent_t };
|
|
|
|
|
2008-04-01 20:23:23 +00:00
|
|
|
type client_xevent_t, xevent_type;
|
2009-11-02 13:48:58 +00:00
|
|
|
typealias client_xevent_t alias { user_client_xevent_t staff_client_xevent_t sysadm_client_xevent_t };
|
|
|
|
typealias client_xevent_t alias { auditadm_client_xevent_t secadm_client_xevent_t };
|
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
type input_xevent_t, xevent_type, input_xevent_type;
|
|
|
|
|
|
|
|
# X Extensions
|
|
|
|
attribute xextension_type;
|
|
|
|
type xextension_t, xextension_type;
|
|
|
|
type security_xextension_t, xextension_type;
|
|
|
|
|
|
|
|
# X Properties
|
|
|
|
attribute xproperty_type;
|
|
|
|
type xproperty_t, xproperty_type;
|
|
|
|
type seclabel_xproperty_t, xproperty_type;
|
2008-04-01 20:23:23 +00:00
|
|
|
type clipboard_xproperty_t, xproperty_type;
|
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
# X Selections
|
|
|
|
attribute xselection_type;
|
|
|
|
type xselection_t, xselection_type;
|
|
|
|
type clipboard_xselection_t, xselection_type;
|
|
|
|
#type settings_xselection_t, xselection_type;
|
|
|
|
#type dbus_xselection_t, xselection_type;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
# X Drawables
|
|
|
|
attribute xdrawable_type;
|
|
|
|
attribute xcolormap_type;
|
|
|
|
type root_xdrawable_t, xdrawable_type;
|
|
|
|
type root_xcolormap_t, xcolormap_type;
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
attribute xserver_unconfined_type;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
xserver_object_types_template(root)
|
2008-11-05 16:10:46 +00:00
|
|
|
xserver_object_types_template(user)
|
2009-10-28 02:18:14 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
typealias user_xproperty_t alias { staff_xproperty_t sysadm_xproperty_t };
|
|
|
|
typealias user_xproperty_t alias { auditadm_xproperty_t secadm_xproperty_t };
|
|
|
|
typealias user_input_xevent_t alias { staff_input_xevent_t sysadm_input_xevent_t };
|
|
|
|
typealias user_input_xevent_t alias { auditadm_input_xevent_t secadm_input_xevent_t };
|
2009-10-28 02:18:14 +00:00
|
|
|
|
2016-12-04 14:10:25 +00:00
|
|
|
type dmrc_home_t;
|
|
|
|
userdom_user_home_content(dmrc_home_t)
|
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
type remote_t;
|
|
|
|
xserver_object_types_template(remote)
|
2011-02-22 16:23:42 +00:00
|
|
|
xserver_common_x_domain_template(remote, remote_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
type user_fonts_t;
|
|
|
|
typealias user_fonts_t alias { staff_fonts_t sysadm_fonts_t };
|
|
|
|
typealias user_fonts_t alias { auditadm_fonts_t secadm_fonts_t };
|
|
|
|
userdom_user_home_content(user_fonts_t)
|
|
|
|
|
|
|
|
type user_fonts_cache_t;
|
|
|
|
typealias user_fonts_cache_t alias { staff_fonts_cache_t sysadm_fonts_cache_t };
|
|
|
|
typealias user_fonts_cache_t alias { auditadm_fonts_cache_t secadm_fonts_cache_t };
|
2018-07-10 15:03:16 +00:00
|
|
|
xdg_cache_content(user_fonts_cache_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
type user_fonts_config_t;
|
|
|
|
typealias user_fonts_config_t alias { staff_fonts_config_t sysadm_fonts_config_t };
|
|
|
|
typealias user_fonts_config_t alias { auditadm_fonts_config_t secadm_fonts_config_t };
|
2008-11-13 18:44:23 +00:00
|
|
|
userdom_user_home_content(user_fonts_config_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
type iceauth_t;
|
|
|
|
type iceauth_exec_t;
|
|
|
|
typealias iceauth_t alias { user_iceauth_t staff_iceauth_t sysadm_iceauth_t };
|
|
|
|
typealias iceauth_t alias { auditadm_iceauth_t secadm_iceauth_t };
|
2011-10-28 12:48:10 +00:00
|
|
|
userdom_user_application_domain(iceauth_t, iceauth_exec_t)
|
2009-10-28 02:18:14 +00:00
|
|
|
|
|
|
|
type iceauth_home_t;
|
|
|
|
typealias iceauth_home_t alias { user_iceauth_home_t staff_iceauth_home_t sysadm_iceauth_home_t };
|
|
|
|
typealias iceauth_home_t alias { auditadm_iceauth_home_t secadm_iceauth_home_t };
|
|
|
|
userdom_user_home_content(iceauth_home_t)
|
2008-04-01 20:23:23 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
type xauth_t;
|
2006-01-20 19:36:54 +00:00
|
|
|
type xauth_exec_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
typealias xauth_t alias { user_xauth_t staff_xauth_t sysadm_xauth_t };
|
|
|
|
typealias xauth_t alias { auditadm_xauth_t secadm_xauth_t };
|
2011-10-28 12:48:10 +00:00
|
|
|
userdom_user_application_domain(xauth_t, xauth_exec_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
type xauth_home_t;
|
|
|
|
typealias xauth_home_t alias { user_xauth_home_t staff_xauth_home_t sysadm_xauth_home_t };
|
|
|
|
typealias xauth_home_t alias { auditadm_xauth_home_t secadm_xauth_home_t };
|
|
|
|
userdom_user_home_content(xauth_home_t)
|
|
|
|
|
|
|
|
type xauth_tmp_t;
|
|
|
|
typealias xauth_tmp_t alias { user_xauth_tmp_t staff_xauth_tmp_t sysadm_xauth_tmp_t };
|
|
|
|
typealias xauth_tmp_t alias { auditadm_xauth_tmp_t secadm_xauth_tmp_t };
|
2011-10-28 12:48:10 +00:00
|
|
|
userdom_user_tmp_file(xauth_tmp_t)
|
2006-01-20 19:36:54 +00:00
|
|
|
|
2006-04-06 19:27:41 +00:00
|
|
|
# this is not actually a device, its a pipe
|
|
|
|
type xconsole_device_t;
|
|
|
|
files_type(xconsole_device_t)
|
2013-09-27 16:31:26 +00:00
|
|
|
dev_associate(xconsole_device_t)
|
2006-04-06 19:27:41 +00:00
|
|
|
fs_associate_tmpfs(xconsole_device_t)
|
|
|
|
files_associate_tmp(xconsole_device_t)
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
type xdm_t;
|
2006-10-04 17:25:34 +00:00
|
|
|
type xdm_exec_t;
|
2006-07-31 22:26:59 +00:00
|
|
|
auth_login_pgm_domain(xdm_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
init_domain(xdm_t, xdm_exec_t)
|
|
|
|
init_daemon_domain(xdm_t, xdm_exec_t)
|
2009-10-28 02:18:14 +00:00
|
|
|
xserver_object_types_template(xdm)
|
|
|
|
xserver_common_x_domain_template(xdm, xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
|
|
|
type xdm_lock_t;
|
|
|
|
files_lock_file(xdm_lock_t)
|
|
|
|
|
|
|
|
type xdm_rw_etc_t;
|
|
|
|
files_type(xdm_rw_etc_t)
|
|
|
|
|
|
|
|
type xdm_var_lib_t;
|
|
|
|
files_type(xdm_var_lib_t)
|
|
|
|
|
|
|
|
type xdm_var_run_t;
|
|
|
|
files_pid_file(xdm_var_run_t)
|
|
|
|
|
2017-12-12 02:15:24 +00:00
|
|
|
# type for /run/user/%{USERID}/*
|
|
|
|
type xdm_runtime_t;
|
|
|
|
userdom_user_runtime_content(xdm_runtime_t)
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
type xdm_tmp_t;
|
|
|
|
files_tmp_file(xdm_tmp_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
typealias xdm_tmp_t alias ice_tmp_t;
|
2006-01-30 22:51:35 +00:00
|
|
|
|
|
|
|
type xdm_tmpfs_t;
|
|
|
|
files_tmpfs_file(xdm_tmpfs_t)
|
|
|
|
|
2006-01-19 22:01:48 +00:00
|
|
|
# type for /var/lib/xkb
|
|
|
|
type xkb_var_lib_t;
|
2006-06-14 20:52:45 +00:00
|
|
|
files_type(xkb_var_lib_t)
|
2006-01-19 22:01:48 +00:00
|
|
|
|
|
|
|
# Type for the executable used to start the X server, e.g. Xwrapper.
|
2008-11-05 16:10:46 +00:00
|
|
|
type xserver_t;
|
2006-01-19 22:01:48 +00:00
|
|
|
type xserver_exec_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
typealias xserver_t alias { user_xserver_t staff_xserver_t sysadm_xserver_t };
|
2009-08-05 15:01:37 +00:00
|
|
|
typealias xserver_t alias { auditadm_xserver_t secadm_xserver_t xdm_xserver_t };
|
2008-11-05 16:10:46 +00:00
|
|
|
init_system_domain(xserver_t, xserver_exec_t)
|
|
|
|
ubac_constrained(xserver_t)
|
|
|
|
|
|
|
|
type xserver_tmp_t;
|
|
|
|
typealias xserver_tmp_t alias { user_xserver_tmp_t staff_xserver_tmp_t sysadm_xserver_tmp_t };
|
2009-08-05 15:01:37 +00:00
|
|
|
typealias xserver_tmp_t alias { auditadm_xserver_tmp_t secadm_xserver_tmp_t xdm_xserver_tmp_t };
|
2011-10-28 12:48:10 +00:00
|
|
|
userdom_user_tmp_file(xserver_tmp_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
type xserver_tmpfs_t;
|
|
|
|
typealias xserver_tmpfs_t alias { user_xserver_tmpfs_t staff_xserver_tmpfs_t sysadm_xserver_tmpfs_t };
|
2009-08-05 15:01:37 +00:00
|
|
|
typealias xserver_tmpfs_t alias { auditadm_xserver_tmpfs_t secadm_xserver_tmpfs_t xdm_xserver_tmpfs_t };
|
2011-10-28 12:48:10 +00:00
|
|
|
userdom_user_tmpfs_file(xserver_tmpfs_t)
|
2006-01-19 22:01:48 +00:00
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
type xsession_exec_t;
|
2006-04-19 21:43:02 +00:00
|
|
|
corecmd_executable_file(xsession_exec_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2016-12-28 19:43:23 +00:00
|
|
|
type xsession_log_t;
|
|
|
|
userdom_user_home_content(xsession_log_t)
|
|
|
|
|
2006-01-19 22:01:48 +00:00
|
|
|
# Type for the X server log file.
|
|
|
|
type xserver_log_t;
|
|
|
|
logging_log_file(xserver_log_t)
|
2006-01-20 22:02:24 +00:00
|
|
|
|
2018-06-24 09:56:10 +00:00
|
|
|
type mesa_shader_cache_t;
|
|
|
|
xdg_cache_content(mesa_shader_cache_t)
|
|
|
|
|
2006-10-04 17:25:34 +00:00
|
|
|
ifdef(`enable_mcs',`
|
2009-06-26 14:40:13 +00:00
|
|
|
init_ranged_domain(xdm_t, xdm_exec_t, s0 - mcs_systemhigh)
|
|
|
|
init_ranged_daemon_domain(xdm_t, xdm_exec_t, s0 - mcs_systemhigh)
|
2006-10-04 17:25:34 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-20 22:02:24 +00:00
|
|
|
prelink_object_file(xkb_var_lib_t)
|
|
|
|
')
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Iceauth local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow iceauth_t iceauth_home_t:file manage_file_perms;
|
|
|
|
userdom_user_home_dir_filetrans(iceauth_t, iceauth_home_t, file)
|
|
|
|
|
|
|
|
allow xdm_t iceauth_home_t:file read_file_perms;
|
|
|
|
|
|
|
|
fs_search_auto_mountpoints(iceauth_t)
|
|
|
|
|
|
|
|
userdom_use_user_terminals(iceauth_t)
|
2011-02-06 15:14:46 +00:00
|
|
|
userdom_read_user_tmp_files(iceauth_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_manage_nfs_files(iceauth_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_manage_cifs_files(iceauth_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Xauth local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow xauth_t self:process signal;
|
|
|
|
allow xauth_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
allow xauth_t xauth_home_t:file manage_file_perms;
|
|
|
|
userdom_user_home_dir_filetrans(xauth_t, xauth_home_t, file)
|
|
|
|
|
|
|
|
manage_dirs_pattern(xauth_t, xauth_tmp_t, xauth_tmp_t)
|
|
|
|
manage_files_pattern(xauth_t, xauth_tmp_t, xauth_tmp_t)
|
|
|
|
files_tmp_filetrans(xauth_t, xauth_tmp_t, { file dir })
|
|
|
|
|
|
|
|
allow xdm_t xauth_home_t:file manage_file_perms;
|
2017-04-29 15:25:13 +00:00
|
|
|
userdom_user_home_dir_filetrans(xdm_t, xauth_home_t, file, ".Xauthority")
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2017-04-19 01:28:16 +00:00
|
|
|
allow xauth_t xdm_t:process sigchld;
|
2017-04-06 21:37:50 +00:00
|
|
|
allow xauth_t xdm_t:fd use;
|
|
|
|
allow xauth_t xdm_t:fifo_file { getattr read };
|
|
|
|
allow xauth_t xdm_t:unix_stream_socket { read write };
|
|
|
|
|
2011-03-16 12:47:40 +00:00
|
|
|
kernel_request_load_module(xauth_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
domain_use_interactive_fds(xauth_t)
|
|
|
|
|
2019-01-19 12:04:44 +00:00
|
|
|
dev_read_sysfs(xauth_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
files_read_etc_files(xauth_t)
|
|
|
|
files_search_pids(xauth_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(xauth_t)
|
|
|
|
fs_search_auto_mountpoints(xauth_t)
|
|
|
|
|
|
|
|
# cjp: why?
|
|
|
|
term_use_ptmx(xauth_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(xauth_t)
|
|
|
|
|
|
|
|
userdom_use_user_terminals(xauth_t)
|
|
|
|
userdom_read_user_tmp_files(xauth_t)
|
|
|
|
|
|
|
|
xserver_rw_xdm_tmp_files(xauth_t)
|
|
|
|
|
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_manage_nfs_files(xauth_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_manage_cifs_files(xauth_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
ssh_sigchld(xauth_t)
|
|
|
|
ssh_read_pipes(xauth_t)
|
|
|
|
ssh_dontaudit_rw_tcp_sockets(xauth_t)
|
|
|
|
')
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# XDM Local policy
|
|
|
|
#
|
|
|
|
|
2017-02-15 23:47:33 +00:00
|
|
|
allow xdm_t self:capability { chown dac_override dac_read_search fowner fsetid ipc_owner kill mknod net_bind_service setgid setuid sys_nice sys_rawio sys_resource sys_tty_config };
|
2016-12-31 16:43:46 +00:00
|
|
|
dontaudit xdm_t self:capability sys_admin;
|
2013-11-09 09:45:18 +00:00
|
|
|
allow xdm_t self:process { setexec setpgid getsched setsched setrlimit signal_perms };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow xdm_t self:fifo_file rw_fifo_file_perms;
|
2006-01-30 22:51:35 +00:00
|
|
|
allow xdm_t self:shm create_shm_perms;
|
|
|
|
allow xdm_t self:sem create_sem_perms;
|
|
|
|
allow xdm_t self:unix_stream_socket { connectto create_stream_socket_perms };
|
|
|
|
allow xdm_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow xdm_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow xdm_t self:udp_socket create_socket_perms;
|
2006-08-29 02:41:00 +00:00
|
|
|
allow xdm_t self:socket create_socket_perms;
|
|
|
|
allow xdm_t self:appletalk_socket create_socket_perms;
|
|
|
|
allow xdm_t self:key { search link write };
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2016-12-31 16:43:46 +00:00
|
|
|
allow xdm_t xconsole_device_t:fifo_file { read_fifo_file_perms setattr_fifo_file_perms };
|
2006-04-06 19:27:41 +00:00
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
# Allow gdm to run gdm-binary
|
|
|
|
can_exec(xdm_t, xdm_exec_t)
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
allow xdm_t xdm_lock_t:file manage_file_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
files_lock_filetrans(xdm_t, xdm_lock_t, file)
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
# wdm has its own config dir /etc/X11/wdm
|
|
|
|
# this is ugly, daemons should not create files under /etc!
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(xdm_t, xdm_rw_etc_t, xdm_rw_etc_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2017-12-12 02:15:24 +00:00
|
|
|
# files in /run/user/%{USERID}/*
|
|
|
|
manage_dirs_pattern(xdm_t, xdm_runtime_t, xdm_runtime_t)
|
|
|
|
manage_files_pattern(xdm_t, xdm_runtime_t, xdm_runtime_t)
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(xdm_t, xdm_tmp_t, xdm_tmp_t)
|
|
|
|
manage_files_pattern(xdm_t, xdm_tmp_t, xdm_tmp_t)
|
|
|
|
manage_sock_files_pattern(xdm_t, xdm_tmp_t, xdm_tmp_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
files_tmp_filetrans(xdm_t, xdm_tmp_t, { file dir sock_file })
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(xdm_t, xdm_tmpfs_t, xdm_tmpfs_t)
|
|
|
|
manage_files_pattern(xdm_t, xdm_tmpfs_t, xdm_tmpfs_t)
|
|
|
|
manage_lnk_files_pattern(xdm_t, xdm_tmpfs_t, xdm_tmpfs_t)
|
|
|
|
manage_fifo_files_pattern(xdm_t, xdm_tmpfs_t, xdm_tmpfs_t)
|
|
|
|
manage_sock_files_pattern(xdm_t, xdm_tmpfs_t, xdm_tmpfs_t)
|
2011-02-22 16:23:42 +00:00
|
|
|
fs_tmpfs_filetrans(xdm_t, xdm_tmpfs_t, { dir file lnk_file sock_file fifo_file })
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2011-02-22 16:23:42 +00:00
|
|
|
manage_dirs_pattern(xdm_t, xdm_var_lib_t, xdm_var_lib_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(xdm_t, xdm_var_lib_t, xdm_var_lib_t)
|
|
|
|
files_var_lib_filetrans(xdm_t, xdm_var_lib_t, file)
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(xdm_t, xdm_var_run_t, xdm_var_run_t)
|
|
|
|
manage_files_pattern(xdm_t, xdm_var_run_t, xdm_var_run_t)
|
|
|
|
manage_fifo_files_pattern(xdm_t, xdm_var_run_t, xdm_var_run_t)
|
|
|
|
files_pid_filetrans(xdm_t, xdm_var_run_t, { dir file fifo_file })
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xdm_t xserver_t:process signal;
|
|
|
|
allow xdm_t xserver_t:unix_stream_socket connectto;
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xdm_t xserver_tmp_t:sock_file rw_sock_file_perms;
|
|
|
|
allow xdm_t xserver_tmp_t:dir { setattr list_dir_perms };
|
2007-02-16 23:01:42 +00:00
|
|
|
|
|
|
|
# transition to the xdm xserver
|
2008-11-05 16:10:46 +00:00
|
|
|
domtrans_pattern(xdm_t, xserver_exec_t, xserver_t)
|
|
|
|
allow xserver_t xdm_t:process signal;
|
|
|
|
allow xdm_t xserver_t:process { noatsecure siginh rlimitinh signal sigkill };
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xdm_t xserver_t:shm rw_shm_perms;
|
2007-02-16 23:01:42 +00:00
|
|
|
|
|
|
|
# connect to xdm xserver over stream socket
|
2009-06-26 14:40:13 +00:00
|
|
|
stream_connect_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t, xserver_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
|
|
|
|
# Remove /tmp/.X11-unix/X0.
|
2009-06-26 14:40:13 +00:00
|
|
|
delete_files_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t)
|
|
|
|
delete_sock_files_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(xdm_t, xserver_log_t, xserver_log_t)
|
|
|
|
manage_files_pattern(xdm_t, xserver_log_t, xserver_log_t)
|
|
|
|
manage_fifo_files_pattern(xdm_t, xserver_log_t, xserver_log_t)
|
|
|
|
logging_log_filetrans(xdm_t, xserver_log_t, file)
|
2007-02-16 23:01:42 +00:00
|
|
|
|
2017-12-06 18:24:44 +00:00
|
|
|
kernel_read_crypto_sysctls(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
kernel_read_system_state(xdm_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(xdm_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
kernel_read_net_sysctls(xdm_t)
|
|
|
|
kernel_read_network_state(xdm_t)
|
2017-11-02 17:30:46 +00:00
|
|
|
kernel_view_key(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
|
|
|
corecmd_exec_shell(xdm_t)
|
|
|
|
corecmd_exec_bin(xdm_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(xdm_t)
|
|
|
|
corenet_all_recvfrom_netlabel(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(xdm_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(xdm_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(xdm_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(xdm_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(xdm_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(xdm_t)
|
|
|
|
corenet_udp_bind_generic_node(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
corenet_tcp_connect_all_ports(xdm_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_all_client_packets(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
# xdm tries to bind to biff_port_t
|
|
|
|
corenet_dontaudit_tcp_bind_all_ports(xdm_t)
|
|
|
|
|
|
|
|
dev_read_rand(xdm_t)
|
|
|
|
dev_read_sysfs(xdm_t)
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_getattr_framebuffer_dev(xdm_t)
|
|
|
|
dev_setattr_framebuffer_dev(xdm_t)
|
|
|
|
dev_getattr_mouse_dev(xdm_t)
|
|
|
|
dev_setattr_mouse_dev(xdm_t)
|
2017-04-26 10:36:20 +00:00
|
|
|
dev_rw_acpi_bios(xdm_t)
|
|
|
|
dev_setattr_acpi_bios_dev(xdm_t)
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_rw_dri(xdm_t)
|
|
|
|
dev_rw_agp(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
dev_getattr_xserver_misc_dev(xdm_t)
|
|
|
|
dev_setattr_xserver_misc_dev(xdm_t)
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_getattr_misc_dev(xdm_t)
|
|
|
|
dev_setattr_misc_dev(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
dev_dontaudit_rw_misc(xdm_t)
|
|
|
|
dev_getattr_video_dev(xdm_t)
|
|
|
|
dev_setattr_video_dev(xdm_t)
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_getattr_scanner_dev(xdm_t)
|
|
|
|
dev_setattr_scanner_dev(xdm_t)
|
|
|
|
dev_getattr_sound_dev(xdm_t)
|
|
|
|
dev_setattr_sound_dev(xdm_t)
|
|
|
|
dev_getattr_power_mgmt_dev(xdm_t)
|
|
|
|
dev_setattr_power_mgmt_dev(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
# Do not audit denied probes of /proc.
|
|
|
|
domain_dontaudit_read_all_domains_state(xdm_t)
|
|
|
|
|
|
|
|
files_read_etc_files(xdm_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
files_read_var_files(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
files_read_etc_runtime_files(xdm_t)
|
|
|
|
files_exec_etc_files(xdm_t)
|
|
|
|
files_list_mnt(xdm_t)
|
|
|
|
# Read /usr/share/terminfo/l/linux and /usr/share/icons/default/index.theme...
|
2017-11-14 02:03:53 +00:00
|
|
|
files_map_usr_files(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
files_read_usr_files(xdm_t)
|
|
|
|
# Poweroff wants to create the /poweroff file when run from xdm
|
|
|
|
files_create_boot_flag(xdm_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(xdm_t)
|
|
|
|
fs_search_auto_mountpoints(xdm_t)
|
|
|
|
|
|
|
|
storage_dontaudit_read_fixed_disk(xdm_t)
|
|
|
|
storage_dontaudit_write_fixed_disk(xdm_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
storage_dontaudit_setattr_fixed_disk_dev(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
storage_dontaudit_raw_read_removable_device(xdm_t)
|
|
|
|
storage_dontaudit_raw_write_removable_device(xdm_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
storage_dontaudit_setattr_removable_dev(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
storage_dontaudit_rw_scsi_generic(xdm_t)
|
|
|
|
|
|
|
|
term_setattr_console(xdm_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
term_use_unallocated_ttys(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
term_setattr_unallocated_ttys(xdm_t)
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
auth_domtrans_pam_console(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
auth_manage_pam_pid(xdm_t)
|
|
|
|
auth_manage_pam_console_data(xdm_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
auth_write_login_records(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
|
|
|
# Run telinit->init to shutdown.
|
2007-03-20 18:47:18 +00:00
|
|
|
init_telinit(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
|
|
|
libs_exec_lib_files(xdm_t)
|
|
|
|
|
|
|
|
logging_read_generic_logs(xdm_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(xdm_t)
|
|
|
|
miscfiles_read_fonts(xdm_t)
|
|
|
|
|
|
|
|
sysnet_read_config(xdm_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(xdm_t)
|
2006-06-21 21:02:49 +00:00
|
|
|
userdom_create_all_users_keys(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
# Search /proc for any user domain processes.
|
2006-02-02 21:08:12 +00:00
|
|
|
userdom_read_all_users_state(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
userdom_signal_all_users(xdm_t)
|
2017-12-12 02:15:24 +00:00
|
|
|
userdom_user_runtime_filetrans(xdm_t, xdm_runtime_t, dir)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2016-12-02 13:44:07 +00:00
|
|
|
# for .dmrc: this was used by the Gnome Display Manager (gdm)
|
|
|
|
# and it is now obsolete in Gnome3
|
|
|
|
xserver_read_user_dmrc(xdm_t)
|
|
|
|
|
2017-11-30 23:04:44 +00:00
|
|
|
xserver_manage_xsession_log(xdm_t)
|
2009-06-26 14:40:13 +00:00
|
|
|
xserver_rw_session(xdm_t, xdm_tmpfs_t)
|
2008-04-01 20:23:23 +00:00
|
|
|
xserver_unconfined(xdm_t)
|
2017-11-30 23:04:44 +00:00
|
|
|
xserver_user_home_dir_filetrans_user_xsession_log(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
|
|
fs_manage_nfs_dirs(xdm_t)
|
|
|
|
fs_manage_nfs_files(xdm_t)
|
|
|
|
fs_manage_nfs_symlinks(xdm_t)
|
2006-01-31 20:29:27 +00:00
|
|
|
fs_exec_nfs_files(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_manage_cifs_dirs(xdm_t)
|
|
|
|
fs_manage_cifs_files(xdm_t)
|
|
|
|
fs_manage_cifs_symlinks(xdm_t)
|
2006-01-31 20:29:27 +00:00
|
|
|
fs_exec_cifs_files(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
tunable_policy(`xdm_sysadm_login',`
|
|
|
|
userdom_xsession_spec_domtrans_all_users(xdm_t)
|
|
|
|
# FIXME:
|
|
|
|
# xserver_rw_session_template(xdm,userdomain)
|
|
|
|
',`
|
|
|
|
userdom_xsession_spec_domtrans_unpriv_users(xdm_t)
|
|
|
|
# FIXME:
|
|
|
|
# xserver_rw_session_template(xdm,unpriv_userdomain)
|
2008-11-05 16:10:46 +00:00
|
|
|
# dontaudit xserver_t sysadm_t:shm { unix_read unix_write };
|
|
|
|
# allow xserver_t xdm_tmpfs_t:file rw_file_perms;
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
2016-12-31 16:43:46 +00:00
|
|
|
tunable_policy(`xserver_gnome_xdm',`
|
|
|
|
allow xdm_t self:process execmem;
|
|
|
|
')
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
optional_policy(`
|
|
|
|
alsa_domtrans(xdm_t)
|
|
|
|
')
|
|
|
|
|
2016-08-14 18:34:19 +00:00
|
|
|
optional_policy(`
|
|
|
|
colord_dbus_chat(xdm_t)
|
|
|
|
')
|
|
|
|
|
2016-08-14 19:13:24 +00:00
|
|
|
optional_policy(`
|
|
|
|
colord_dbus_chat(xdm_t)
|
|
|
|
')
|
|
|
|
|
2007-03-19 18:36:36 +00:00
|
|
|
optional_policy(`
|
|
|
|
consolekit_dbus_chat(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-04-03 19:49:47 +00:00
|
|
|
optional_policy(`
|
2006-07-28 15:13:58 +00:00
|
|
|
consoletype_exec(xdm_t)
|
2006-04-03 19:49:47 +00:00
|
|
|
')
|
|
|
|
|
2013-09-26 13:35:49 +00:00
|
|
|
optional_policy(`
|
2019-01-06 18:31:42 +00:00
|
|
|
allow xdm_t self:process getcap;
|
|
|
|
|
|
|
|
dbus_exec(xdm_t)
|
2013-09-26 13:35:49 +00:00
|
|
|
dbus_system_bus_client(xdm_t)
|
|
|
|
dbus_connect_system_bus(xdm_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
accountsd_dbus_chat(xdm_t)
|
|
|
|
')
|
2019-01-06 18:31:42 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
systemd_read_logind_pids(xdm_t)
|
|
|
|
')
|
2013-09-26 13:35:49 +00:00
|
|
|
')
|
|
|
|
|
2016-12-14 00:14:32 +00:00
|
|
|
optional_policy(`
|
|
|
|
devicekit_dbus_chat_power(xdm_t)
|
|
|
|
')
|
|
|
|
|
2014-04-11 17:28:27 +00:00
|
|
|
optional_policy(`
|
|
|
|
gnome_spec_domtrans_all_gkeyringd(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
# Talk to the console mouse server.
|
|
|
|
gpm_stream_connect(xdm_t)
|
|
|
|
gpm_setattr_gpmctl(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
hostname_exec(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
loadkeys_exec(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
locallogin_signull(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
# Do not audit attempts to check whether user root has email
|
2006-02-02 21:08:12 +00:00
|
|
|
mta_dontaudit_getattr_spool_files(xdm_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
optional_policy(`
|
|
|
|
resmgr_stream_connect(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
seutil_sigchld_newrole(xdm_t)
|
|
|
|
')
|
|
|
|
|
2014-06-04 15:12:40 +00:00
|
|
|
optional_policy(`
|
|
|
|
shutdown_domtrans(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
udev_read_db(xdm_t)
|
|
|
|
')
|
|
|
|
|
2007-10-02 16:04:50 +00:00
|
|
|
optional_policy(`
|
|
|
|
unconfined_domain(xdm_t)
|
|
|
|
unconfined_domtrans(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
userhelper_dontaudit_search_config(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
usermanage_read_crack_db(xdm_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-30 22:51:35 +00:00
|
|
|
xfs_stream_connect(xdm_t)
|
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# X server local policy
|
|
|
|
#
|
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
# X Object Manager rules
|
|
|
|
type_transition xserver_t xserver_t:x_drawable root_xdrawable_t;
|
|
|
|
type_transition xserver_t xserver_t:x_colormap root_xcolormap_t;
|
|
|
|
type_transition root_xdrawable_t input_xevent_t:x_event root_input_xevent_t;
|
|
|
|
|
|
|
|
allow xserver_t { root_xdrawable_t x_domain }:x_drawable send;
|
|
|
|
allow xserver_t input_xevent_t:x_event send;
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# setuid/setgid for the wrapper program to change UID
|
|
|
|
# sys_rawio is for iopl access - should not be needed for frame-buffer
|
|
|
|
# sys_admin, locking shared mem? chowning IPC message queues or semaphores?
|
|
|
|
# admin of APM bios?
|
|
|
|
# sys_nice is so that the X server can set a negative nice value
|
|
|
|
# execheap needed until the X module loader is fixed.
|
|
|
|
# NVIDIA Needs execstack
|
|
|
|
|
2017-02-15 23:47:33 +00:00
|
|
|
allow xserver_t self:capability { dac_override fowner fsetid ipc_owner mknod net_bind_service setgid setuid sys_admin sys_nice sys_rawio sys_tty_config };
|
2008-11-05 16:10:46 +00:00
|
|
|
dontaudit xserver_t self:capability chown;
|
2017-04-19 01:28:16 +00:00
|
|
|
allow xserver_t self:capability2 wake_alarm;
|
2017-08-13 20:21:44 +00:00
|
|
|
allow xserver_t self:process { fork transition signal_perms getsched setsched getsession getpgid setpgid getcap setcap share getattr noatsecure siginh rlimitinh dyntransition setkeycreate setsockcreate getrlimit };
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xserver_t self:fd use;
|
|
|
|
allow xserver_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow xserver_t self:sock_file read_sock_file_perms;
|
|
|
|
allow xserver_t self:shm create_shm_perms;
|
|
|
|
allow xserver_t self:sem create_sem_perms;
|
|
|
|
allow xserver_t self:msgq create_msgq_perms;
|
|
|
|
allow xserver_t self:msg { send receive };
|
|
|
|
allow xserver_t self:unix_dgram_socket { create_socket_perms sendto };
|
|
|
|
allow xserver_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
|
|
allow xserver_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow xserver_t self:udp_socket create_socket_perms;
|
2011-02-06 15:09:18 +00:00
|
|
|
allow xserver_t self:netlink_kobject_uevent_socket create_socket_perms;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
manage_dirs_pattern(xserver_t, xserver_tmp_t, xserver_tmp_t)
|
|
|
|
manage_files_pattern(xserver_t, xserver_tmp_t, xserver_tmp_t)
|
|
|
|
manage_sock_files_pattern(xserver_t, xserver_tmp_t, xserver_tmp_t)
|
|
|
|
files_tmp_filetrans(xserver_t, xserver_tmp_t, { file dir sock_file })
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
filetrans_pattern(xserver_t, xserver_tmp_t, xserver_tmp_t, sock_file)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
manage_dirs_pattern(xserver_t, xserver_tmpfs_t, xserver_tmpfs_t)
|
|
|
|
manage_files_pattern(xserver_t, xserver_tmpfs_t, xserver_tmpfs_t)
|
|
|
|
manage_lnk_files_pattern(xserver_t, xserver_tmpfs_t, xserver_tmpfs_t)
|
|
|
|
manage_fifo_files_pattern(xserver_t, xserver_tmpfs_t, xserver_tmpfs_t)
|
|
|
|
manage_sock_files_pattern(xserver_t, xserver_tmpfs_t, xserver_tmpfs_t)
|
|
|
|
fs_tmpfs_filetrans(xserver_t, xserver_tmpfs_t, { dir file lnk_file sock_file fifo_file })
|
2017-09-12 02:11:15 +00:00
|
|
|
allow xserver_t xserver_tmpfs_t:file map;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2016-12-31 16:43:46 +00:00
|
|
|
# Run xkbcomp
|
2008-11-05 16:10:46 +00:00
|
|
|
manage_files_pattern(xserver_t, xkb_var_lib_t, xkb_var_lib_t)
|
|
|
|
manage_lnk_files_pattern(xserver_t, xkb_var_lib_t, xkb_var_lib_t)
|
|
|
|
files_search_var_lib(xserver_t)
|
|
|
|
|
2018-06-24 09:56:10 +00:00
|
|
|
manage_dirs_pattern(xserver_t, mesa_shader_cache_t, mesa_shader_cache_t)
|
|
|
|
manage_files_pattern(xserver_t, mesa_shader_cache_t, mesa_shader_cache_t)
|
|
|
|
allow xserver_t mesa_shader_cache_t:file map;
|
|
|
|
xdg_cache_filetrans(xserver_t, mesa_shader_cache_t, dir, "mesa_shader_cache")
|
|
|
|
xdg_generic_user_home_dir_filetrans_cache(xserver_t, dir, ".cache")
|
|
|
|
|
2019-01-11 10:30:43 +00:00
|
|
|
# for writing to ~/.local/share/sddm/xorg-session.log
|
|
|
|
xdg_manage_data(xauth_t)
|
|
|
|
|
2009-10-28 02:18:14 +00:00
|
|
|
domtrans_pattern(xserver_t, xauth_exec_t, xauth_t)
|
|
|
|
allow xserver_t xauth_home_t:file read_file_perms;
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# Create files in /var/log with the xserver_log_t type.
|
|
|
|
manage_files_pattern(xserver_t, xserver_log_t, xserver_log_t)
|
2009-06-26 14:40:13 +00:00
|
|
|
logging_log_filetrans(xserver_t, xserver_log_t, file)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2018-12-08 18:45:12 +00:00
|
|
|
kernel_read_crypto_sysctls(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
kernel_read_system_state(xserver_t)
|
|
|
|
kernel_read_device_sysctls(xserver_t)
|
|
|
|
kernel_read_modprobe_sysctls(xserver_t)
|
|
|
|
# Xorg wants to check if kernel is tainted
|
|
|
|
kernel_read_kernel_sysctls(xserver_t)
|
|
|
|
kernel_write_proc_files(xserver_t)
|
|
|
|
|
|
|
|
# Run helper programs in xserver_t.
|
|
|
|
corecmd_exec_bin(xserver_t)
|
|
|
|
corecmd_exec_shell(xserver_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_unlabeled(xserver_t)
|
|
|
|
corenet_all_recvfrom_netlabel(xserver_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(xserver_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(xserver_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(xserver_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(xserver_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(xserver_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
corenet_tcp_bind_xserver_port(xserver_t)
|
|
|
|
corenet_tcp_connect_all_ports(xserver_t)
|
|
|
|
corenet_sendrecv_xserver_server_packets(xserver_t)
|
|
|
|
corenet_sendrecv_all_client_packets(xserver_t)
|
|
|
|
|
|
|
|
dev_rw_sysfs(xserver_t)
|
|
|
|
dev_rw_mouse(xserver_t)
|
|
|
|
dev_rw_mtrr(xserver_t)
|
2017-04-26 10:36:20 +00:00
|
|
|
dev_rw_acpi_bios(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
dev_rw_agp(xserver_t)
|
|
|
|
dev_rw_framebuffer(xserver_t)
|
|
|
|
dev_manage_dri_dev(xserver_t)
|
2009-08-25 13:43:38 +00:00
|
|
|
dev_filetrans_dri(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
dev_create_generic_dirs(xserver_t)
|
|
|
|
dev_setattr_generic_dirs(xserver_t)
|
|
|
|
# raw memory access is needed if not using the frame buffer
|
|
|
|
dev_read_raw_memory(xserver_t)
|
|
|
|
dev_wx_raw_memory(xserver_t)
|
|
|
|
# for other device nodes such as the NVidia binary-only driver
|
|
|
|
dev_rw_xserver_misc(xserver_t)
|
2018-07-10 15:03:17 +00:00
|
|
|
dev_map_xserver_misc(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
# read events - the synaptics touchpad driver reads raw events
|
|
|
|
dev_rw_input_dev(xserver_t)
|
|
|
|
dev_rwx_zero(xserver_t)
|
|
|
|
|
2012-05-04 12:35:24 +00:00
|
|
|
domain_dontaudit_search_all_domains_state(xserver_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
files_read_etc_files(xserver_t)
|
|
|
|
files_read_etc_runtime_files(xserver_t)
|
|
|
|
files_read_usr_files(xserver_t)
|
|
|
|
|
|
|
|
# brought on by rhgb
|
|
|
|
files_search_mnt(xserver_t)
|
|
|
|
# for nscd
|
|
|
|
files_dontaudit_search_pids(xserver_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(xserver_t)
|
|
|
|
fs_search_nfs(xserver_t)
|
|
|
|
fs_search_auto_mountpoints(xserver_t)
|
|
|
|
fs_search_ramfs(xserver_t)
|
|
|
|
|
|
|
|
mls_xwin_read_to_clearance(xserver_t)
|
|
|
|
|
|
|
|
selinux_validate_context(xserver_t)
|
|
|
|
selinux_compute_access_vector(xserver_t)
|
|
|
|
selinux_compute_create_context(xserver_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(xserver_t)
|
|
|
|
|
|
|
|
init_getpgid(xserver_t)
|
|
|
|
|
|
|
|
term_setattr_unallocated_ttys(xserver_t)
|
|
|
|
term_use_unallocated_ttys(xserver_t)
|
|
|
|
|
|
|
|
getty_use_fds(xserver_t)
|
|
|
|
|
|
|
|
locallogin_use_fds(xserver_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(xserver_t)
|
|
|
|
logging_send_audit_msgs(xserver_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(xserver_t)
|
|
|
|
miscfiles_read_fonts(xserver_t)
|
|
|
|
|
2017-02-18 21:35:45 +00:00
|
|
|
modutils_domtrans(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# read x_contexts
|
|
|
|
seutil_read_default_contexts(xserver_t)
|
|
|
|
|
|
|
|
userdom_search_user_home_dirs(xserver_t)
|
|
|
|
userdom_use_user_ttys(xserver_t)
|
|
|
|
userdom_setattr_user_ttys(xserver_t)
|
2011-02-06 15:14:46 +00:00
|
|
|
userdom_read_user_tmp_files(xserver_t)
|
2017-09-12 02:11:15 +00:00
|
|
|
userdom_map_user_tmpfs_files(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_rw_user_tmpfs_files(xserver_t)
|
|
|
|
|
|
|
|
xserver_use_user_fonts(xserver_t)
|
|
|
|
|
|
|
|
ifdef(`enable_mls',`
|
|
|
|
range_transition xserver_t xserver_tmp_t:sock_file s0 - mls_systemhigh;
|
2008-11-17 13:49:19 +00:00
|
|
|
range_transition xserver_t xserver_t:x_drawable s0 - mls_systemhigh;
|
2008-11-05 16:10:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`!xserver_object_manager',`
|
|
|
|
# should be xserver_unconfined(xserver_t),
|
|
|
|
# but typeattribute doesnt work in conditionals
|
|
|
|
|
2017-08-13 20:21:44 +00:00
|
|
|
allow xserver_t xserver_t:x_server { getattr setattr record debug grab manage };
|
|
|
|
allow xserver_t { x_domain root_xdrawable_t }:x_drawable { create destroy read write blend getattr setattr list_child add_child remove_child list_property get_property set_property manage override show hide send receive };
|
|
|
|
allow xserver_t xserver_t:x_screen { getattr setattr hide_cursor show_cursor saver_getattr saver_setattr saver_hide saver_show };
|
|
|
|
allow xserver_t x_domain:x_gc { create destroy getattr setattr use };
|
|
|
|
allow xserver_t { x_domain root_xcolormap_t }:x_colormap { create destroy read write getattr add_color remove_color install uninstall use };
|
|
|
|
allow xserver_t xproperty_type:x_property { create destroy read write append getattr setattr };
|
|
|
|
allow xserver_t xselection_type:x_selection { read write getattr setattr };
|
|
|
|
allow xserver_t x_domain:x_cursor { create destroy read write getattr setattr use };
|
|
|
|
allow xserver_t x_domain:x_client { destroy getattr setattr manage };
|
|
|
|
allow xserver_t { x_domain xserver_t }:x_device { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow xserver_t { x_domain xserver_t }:x_pointer { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow xserver_t { x_domain xserver_t }:x_keyboard { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow xserver_t xextension_type:x_extension { query use };
|
|
|
|
allow xserver_t { x_domain xserver_t }:x_resource { read write };
|
|
|
|
allow xserver_t xevent_type:{ x_event x_synthetic_event } { send receive };
|
2008-11-05 16:10:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
2017-04-26 10:36:20 +00:00
|
|
|
acpi_stream_connect(xserver_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
auth_search_pam_console_data(xserver_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
rhgb_getpgid(xserver_t)
|
|
|
|
rhgb_signal(xserver_t)
|
|
|
|
')
|
|
|
|
|
2011-02-06 15:09:18 +00:00
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(xserver_t)
|
2016-12-31 16:43:46 +00:00
|
|
|
udev_read_pid_files(xserver_t)
|
2011-02-06 15:09:18 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
optional_policy(`
|
|
|
|
unconfined_domain_noaudit(xserver_t)
|
|
|
|
unconfined_domtrans(xserver_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
userhelper_search_config(xserver_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
xfs_stream_connect(xserver_t)
|
|
|
|
')
|
|
|
|
|
2006-01-30 22:51:35 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# XDM Xserver local policy
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
# cjp: when xdm is configurable via tunable these
|
|
|
|
# rules will be enabled only when xdm is enabled
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xserver_t xdm_t:process { signal getpgid };
|
|
|
|
allow xserver_t xdm_t:shm rw_shm_perms;
|
2006-02-07 21:48:00 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# NB we do NOT allow xserver_t xdm_var_lib_t:dir, only access to an open
|
2006-02-07 21:48:00 +00:00
|
|
|
# handle of a file inside the dir!!!
|
2008-11-05 16:10:46 +00:00
|
|
|
allow xserver_t xdm_var_lib_t:file { getattr read };
|
|
|
|
dontaudit xserver_t xdm_var_lib_t:dir search;
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2014-05-28 15:25:49 +00:00
|
|
|
read_files_pattern(xserver_t, xdm_var_run_t, xdm_var_run_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2006-02-07 21:48:00 +00:00
|
|
|
# Label pid and temporary files with derived types.
|
2008-11-05 16:10:46 +00:00
|
|
|
manage_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t)
|
|
|
|
manage_lnk_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t)
|
|
|
|
manage_sock_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2015-12-20 15:28:48 +00:00
|
|
|
# Run Xorg.wrap
|
|
|
|
can_exec(xserver_t, xserver_exec_t)
|
|
|
|
|
2006-02-07 21:48:00 +00:00
|
|
|
# VNC v4 module in X server
|
2008-11-05 16:10:46 +00:00
|
|
|
corenet_tcp_bind_vnc_port(xserver_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
init_use_fds(xserver_t)
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2006-02-07 21:48:00 +00:00
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
2008-11-05 16:10:46 +00:00
|
|
|
fs_manage_nfs_dirs(xserver_t)
|
|
|
|
fs_manage_nfs_files(xserver_t)
|
|
|
|
fs_manage_nfs_symlinks(xserver_t)
|
2006-02-07 21:48:00 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
2008-11-05 16:10:46 +00:00
|
|
|
fs_manage_cifs_dirs(xserver_t)
|
|
|
|
fs_manage_cifs_files(xserver_t)
|
|
|
|
fs_manage_cifs_symlinks(xserver_t)
|
2006-02-07 21:48:00 +00:00
|
|
|
')
|
2006-01-30 22:51:35 +00:00
|
|
|
|
2008-06-07 13:31:48 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
dbus_system_bus_client(xserver_t)
|
|
|
|
hal_dbus_chat(xserver_t)
|
2008-06-07 13:31:48 +00:00
|
|
|
')
|
|
|
|
|
2007-10-02 16:04:50 +00:00
|
|
|
optional_policy(`
|
|
|
|
resmgr_stream_connect(xdm_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
rhgb_rw_shm(xserver_t)
|
|
|
|
rhgb_rw_tmpfs_files(xserver_t)
|
2007-10-02 16:04:50 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Rules common to all X window domains
|
|
|
|
#
|
2006-09-01 15:52:05 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# Hacks
|
|
|
|
# everyone can do override-redirect windows.
|
|
|
|
# this could be used to spoof labels
|
|
|
|
allow x_domain self:x_drawable override;
|
2009-10-28 02:18:14 +00:00
|
|
|
# firefox gets nosy with other people's windows
|
|
|
|
allow x_domain x_domain:x_drawable { list_child receive };
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# X Server
|
2009-10-28 02:18:14 +00:00
|
|
|
# can get X server attributes
|
|
|
|
allow x_domain xserver_t:x_server getattr;
|
|
|
|
# can grab the server
|
|
|
|
allow x_domain xserver_t:x_server grab;
|
|
|
|
# can read and write server-owned generic resources
|
|
|
|
allow x_domain xserver_t:x_resource { read write };
|
2008-11-05 16:10:46 +00:00
|
|
|
# can mess with own clients
|
2009-10-28 02:18:14 +00:00
|
|
|
allow x_domain self:x_client { getattr manage destroy };
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# X Protocol Extensions
|
2009-10-28 02:18:14 +00:00
|
|
|
allow x_domain xextension_t:x_extension { query use };
|
|
|
|
allow x_domain security_xextension_t:x_extension { query use };
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# X Properties
|
|
|
|
# can change properties of root window
|
2009-10-28 02:18:14 +00:00
|
|
|
allow x_domain root_xdrawable_t:x_drawable { list_property get_property set_property };
|
|
|
|
# can change properties of my own windows
|
2008-11-05 16:10:46 +00:00
|
|
|
allow x_domain self:x_drawable { list_property get_property set_property };
|
2009-10-28 02:18:14 +00:00
|
|
|
# can read and write cut buffers
|
|
|
|
allow x_domain clipboard_xproperty_t:x_property { create read write append };
|
|
|
|
# can read security labels
|
|
|
|
allow x_domain seclabel_xproperty_t:x_property { getattr read };
|
|
|
|
# can change all other properties
|
|
|
|
allow x_domain xproperty_t:x_property { getattr create read write append destroy };
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# X Windows
|
|
|
|
# operations allowed on root windows
|
2009-10-28 02:18:14 +00:00
|
|
|
allow x_domain root_xdrawable_t:x_drawable { getattr setattr list_child add_child remove_child send receive hide show };
|
2008-11-05 16:10:46 +00:00
|
|
|
# operations allowed on my windows
|
|
|
|
allow x_domain self:x_drawable { create destroy getattr setattr read write show hide list_child add_child remove_child manage send receive };
|
2009-10-28 02:18:14 +00:00
|
|
|
allow x_domain self:x_drawable { blend };
|
|
|
|
# operations allowed on all windows
|
|
|
|
allow x_domain x_domain:x_drawable { getattr get_property set_property remove_child };
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# X Colormaps
|
|
|
|
# can use the default colormap
|
2009-10-28 02:18:14 +00:00
|
|
|
allow x_domain root_xcolormap_t:x_colormap { read use add_color remove_color install uninstall };
|
|
|
|
# can create and use colormaps
|
2017-08-13 20:21:44 +00:00
|
|
|
allow x_domain self:x_colormap { create destroy read write getattr add_color remove_color install uninstall use };
|
2009-10-28 02:18:14 +00:00
|
|
|
|
|
|
|
# X Devices
|
|
|
|
# operations allowed on my own devices
|
2017-08-13 20:21:44 +00:00
|
|
|
allow x_domain self:{ x_device x_pointer x_keyboard } { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
2009-10-28 02:18:14 +00:00
|
|
|
# operations allowed on generic devices
|
|
|
|
allow x_domain xserver_t:x_device { use getattr setattr getfocus setfocus bell grab freeze force_cursor };
|
|
|
|
# operations allowed on core keyboard
|
|
|
|
allow x_domain xserver_t:x_keyboard { use getattr setattr getfocus setfocus bell grab };
|
|
|
|
# operations allowed on core pointer
|
|
|
|
allow x_domain xserver_t:x_pointer { read use getattr setattr getfocus setfocus bell grab freeze force_cursor };
|
|
|
|
|
|
|
|
# all devices can generate input events
|
|
|
|
allow x_domain root_xdrawable_t:x_drawable send;
|
|
|
|
allow x_domain x_domain:x_drawable send;
|
|
|
|
allow x_domain input_xevent_t:x_event send;
|
|
|
|
|
|
|
|
# dontaudit keyloggers repeatedly polling
|
|
|
|
#dontaudit x_domain xserver_t:x_keyboard read;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# X Input
|
2009-10-28 02:18:14 +00:00
|
|
|
# can receive default events
|
|
|
|
allow x_domain xevent_t:{ x_event x_synthetic_event } receive;
|
|
|
|
# can receive ICCCM events
|
|
|
|
allow x_domain client_xevent_t:{ x_event x_synthetic_event } receive;
|
2008-11-05 16:10:46 +00:00
|
|
|
# can send ICCCM events to the root window
|
|
|
|
allow x_domain client_xevent_t:x_synthetic_event send;
|
2009-10-28 02:18:14 +00:00
|
|
|
# can receive root window input events
|
|
|
|
allow x_domain root_input_xevent_t:x_event receive;
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
# X Selections
|
|
|
|
# can use the clipboard
|
|
|
|
allow x_domain clipboard_xselection_t:x_selection { getattr setattr read };
|
2009-10-28 02:18:14 +00:00
|
|
|
# can use default selections
|
|
|
|
allow x_domain xselection_t:x_selection { getattr setattr read };
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
# Other X Objects
|
|
|
|
# can create and use cursors
|
2017-08-13 20:21:44 +00:00
|
|
|
allow x_domain self:x_cursor { create destroy read write getattr setattr use };
|
2008-11-05 16:10:46 +00:00
|
|
|
# can create and use graphics contexts
|
2017-08-13 20:21:44 +00:00
|
|
|
allow x_domain self:x_gc { create destroy getattr setattr use };
|
2008-11-05 16:10:46 +00:00
|
|
|
# can read and write own objects
|
|
|
|
allow x_domain self:x_resource { read write };
|
2009-10-28 02:18:14 +00:00
|
|
|
# can mess with the screensaver
|
|
|
|
allow x_domain xserver_t:x_screen { getattr saver_getattr };
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Rules for unconfined access to this module
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
|
|
|
|
tunable_policy(`! xserver_object_manager',`
|
|
|
|
# should be xserver_unconfined(x_domain),
|
|
|
|
# but typeattribute doesnt work in conditionals
|
|
|
|
|
2017-08-13 20:21:44 +00:00
|
|
|
allow x_domain xserver_t:x_server { getattr setattr record debug grab manage };
|
|
|
|
allow x_domain xdrawable_type:x_drawable { create destroy read write blend getattr setattr list_child add_child remove_child list_property get_property set_property manage override show hide send receive };
|
|
|
|
allow x_domain xserver_t:x_screen { getattr setattr hide_cursor show_cursor saver_getattr saver_setattr saver_hide saver_show };
|
|
|
|
allow x_domain x_domain:x_gc { create destroy getattr setattr use };
|
|
|
|
allow x_domain xcolormap_type:x_colormap { create destroy read write getattr add_color remove_color install uninstall use };
|
|
|
|
allow x_domain xproperty_type:x_property { create destroy read write append getattr setattr };
|
|
|
|
allow x_domain xselection_type:x_selection { read write getattr setattr };
|
|
|
|
allow x_domain x_domain:x_cursor { create destroy read write getattr setattr use };
|
|
|
|
allow x_domain x_domain:x_client { destroy getattr setattr manage };
|
|
|
|
allow x_domain { x_domain xserver_t }:x_device { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow x_domain { x_domain xserver_t }:x_pointer { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow x_domain { x_domain xserver_t }:x_keyboard { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow x_domain xextension_type:x_extension { query use };
|
|
|
|
allow x_domain { x_domain xserver_t }:x_resource { read write };
|
|
|
|
allow x_domain xevent_type:{ x_event x_synthetic_event } { send receive };
|
2006-02-06 22:47:46 +00:00
|
|
|
')
|
|
|
|
|
2017-08-13 20:21:44 +00:00
|
|
|
allow xserver_unconfined_type xserver_t:x_server { getattr setattr record debug grab manage };
|
|
|
|
allow xserver_unconfined_type xdrawable_type:x_drawable { create destroy read write blend getattr setattr list_child add_child remove_child list_property get_property set_property manage override show hide send receive };
|
|
|
|
allow xserver_unconfined_type xserver_t:x_screen { getattr setattr hide_cursor show_cursor saver_getattr saver_setattr saver_hide saver_show };
|
|
|
|
allow xserver_unconfined_type x_domain:x_gc { create destroy getattr setattr use };
|
|
|
|
allow xserver_unconfined_type xcolormap_type:x_colormap { create destroy read write getattr add_color remove_color install uninstall use };
|
|
|
|
allow xserver_unconfined_type xproperty_type:x_property { create destroy read write append getattr setattr };
|
|
|
|
allow xserver_unconfined_type xselection_type:x_selection { read write getattr setattr };
|
|
|
|
allow xserver_unconfined_type x_domain:x_cursor { create destroy read write getattr setattr use };
|
|
|
|
allow xserver_unconfined_type x_domain:x_client { destroy getattr setattr manage };
|
|
|
|
allow xserver_unconfined_type { x_domain xserver_t }:x_device { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow xserver_unconfined_type { x_domain xserver_t }:x_pointer { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow xserver_unconfined_type { x_domain xserver_t }:x_keyboard { getattr setattr use read write getfocus setfocus bell force_cursor freeze grab manage list_property get_property set_property add remove create destroy };
|
|
|
|
allow xserver_unconfined_type xextension_type:x_extension { query use };
|
|
|
|
allow xserver_unconfined_type { x_domain xserver_t }:x_resource { read write };
|
|
|
|
allow xserver_unconfined_type xevent_type:{ x_event x_synthetic_event } { send receive };
|