Implement X Desktop Group
PATCH v3 1/1 Implement X Desktop Group
Creates 4 types for generic xdg cache, config, data and local home content
Create the various basic interfaces that will be needed:
1. xserver_create_generic_xdg_cache, config, data and local home_dirs:
This will be used together with xserver_user_home_dir_filetrans_cache, config, local_home_content, xserver_xdg_local_home_content_filetrans_xdg_data_home_content and allows the caller to create ~/.cache, ~/.config, ~/.local and ~/.local/share directories. Each XDG aware program needs to be able to create these.
2. xserver_read|manage_generic_xdg_cache, config, data and local_home_content:
By default content is created with a generic type and these broad interfaces allow the caller to read of manage content with these generic types
3. xserver_xdg_cache, config, data and local_home_content_filetrans:
Allows callers to create specified objects in these location with a private type
Add file context specifications for ~/.cache(/.*)? (xdg_cache_home_t), ~/.config(/.*)? (xdg_config_home_t) ~/.local (xdg_local_home_t) and ~/.local/share(/.*)? (xdg_data_home_t)
policy/modules/services/xserver.fc +5 -0
@@ -1,11 +1,16 @@ # # HOME_DIR # + +HOME_DIR/\.cache(/.*)? gen_context(system_u:object_r:xdg_cache_home_t,s0) +HOME_DIR/\.config(/.*)? gen_context(system_u:object_r:xdg_config_home_t,s0) HOME_DIR/\.fonts\.conf -- gen_context(system_u:object_r:user_fonts_config_t,s0) HOME_DIR/\.fonts(/.*)? gen_context(system_u:object_r:user_fonts_t,s0) HOME_DIR/\.fonts/auto(/.*)? gen_context(system_u:object_r:user_fonts_cache_t,s0) HOME_DIR/\.fonts\.cache-.* -- gen_context(system_u:object_r:user_fonts_cache_t,s0) HOME_DIR/\.ICEauthority.* -- gen_context(system_u:object_r:iceauth_home_t,s0) +HOME_DIR/\.local -d gen_context(system_u:object_r:xdg_local_home_t,s0) +HOME_DIR/\.local/share(/.*)? gen_context(system_u:object_r:xdg_data_home_t,s0) HOME_DIR/\.serverauth.* -- gen_context(system_u:object_r:xauth_home_t,s0) HOME_DIR/\.xauth.* -- gen_context(system_u:object_r:xauth_home_t,s0) HOME_DIR/\.Xauthority.* -- gen_context(system_u:object_r:xauth_home_t,s0)
policy/modules/services/xserver.if +621 -0
639 lines not on this page · raw message
policy/modules/services/xserver.te +12 -0
@@ -154,6 +154,18 @@ fs_associate_tmpfs(xconsole_device_t) files_associate_tmp(xconsole_device_t) +type xdg_cache_home_t; +userdom_user_home_content(xdg_cache_home_t) + +type xdg_config_home_t; +userdom_user_home_content(xdg_config_home_t) + +type xdg_data_home_t; +userdom_user_home_content(xdg_data_home_t) + +type xdg_local_home_t; +userdom_user_home_content(xdg_local_home_t) + type xdm_t; type xdm_exec_t; auth_login_pgm_domain(xdm_t)