allow $1 xdm_rw_etc_t:file read_file_perms;
')
+########################################
+## <summary>
+## Search XDM temporary directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`xserver_search_xdm_tmp_dirs',`
+ gen_require(`
+ type xdm_tmp_t;
+ ')
+
+ files_search_tmp($1)
+ allow $1 xdm_tmp_t:dir search_dir_perms;
+')
+
########################################
## <summary>
## Set the attributes of XDM temporary directories.
optional_policy(`
xserver_dbus_chat_xdm(systemd_logind_t)
xserver_read_state_xdm(systemd_logind_t)
- # Only search is confirmed (/tmp/$USER/X11-unix)
- xserver_read_xdm_tmp_files(systemd_logind_t)
+ # It links /run/user/$USER/X11/display to /tmp/.X11-unix/X* sock_file
+ xserver_search_xdm_tmp_dirs(systemd_logind_t)
')
#######################################