-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds just enough for sys-gui-vnc to work, specifically to allow X server access to /run/qubes/shm.id.0. And make sure the X server is running as xserver_t type, even when it's started via X-wrapper-qubes. The actual GUI daemon remains unconfined at this time. QubesOS/qubes-issues#9276
- Loading branch information
Showing
4 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/usr/bin/X-wrapper-qubes -- gen_context(system_u:object_r:xserver_exec_t) | ||
/run/qubes/shm\.id\.[0-9]+ -- gen_context(system_u:object_r:qubes_gui_shmid_t) | ||
/var/run/qubes/shm\.id\.[0-9]+ -- gen_context(system_u:object_r:qubes_gui_shmid_t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
policy_module(qubes-gui-daemon, 0.0.1) | ||
|
||
require { | ||
type xserver_t, qubes_var_run_t; | ||
type tmpfs_t; | ||
type unconfined_t; | ||
} | ||
|
||
type qubes_gui_shmid_t; | ||
|
||
# Allow /run/qubes/shm.id.* | ||
filetrans_pattern(xserver_t, qubes_var_run_t, qubes_gui_shmid_t, file, "shm.id.0") | ||
filetrans_pattern(xserver_t, qubes_var_run_t, qubes_gui_shmid_t, file, "shm.id.1") | ||
filetrans_pattern(xserver_t, qubes_var_run_t, qubes_gui_shmid_t, file, "shm.id.2") | ||
filetrans_pattern(xserver_t, qubes_var_run_t, qubes_gui_shmid_t, file, "shm.id.3") | ||
filetrans_pattern(xserver_t, qubes_var_run_t, qubes_gui_shmid_t, file, "shm.id.4") | ||
allow xserver_t qubes_gui_shmid_t:file { create lock open read write map unlink getattr setattr }; | ||
allow qubes_gui_shmid_t tmpfs_t:filesystem { associate }; | ||
|
||
# until qubes-guid gets its own type | ||
allow unconfined_t qubes_gui_shmid_t:file mmap_rw_file_perms; |