commit: c5fa13989512397b4ae3c75feb99a8f4cf4c5376
Author: Russell Coker <russell <AT> coker <DOT> com <DOT> au>
AuthorDate: Sun Mar 27 12:15:11 2022 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Thu Mar 31 03:11:59 2022 +0000
URL:
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=c5fa1398
new sddm V2
This patch addresses all previous issues and I think it's ready to merge.
Signed-off-by: Russell Coker <russell <AT> coker.com.au>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
config/appconfig-mcs/seusers | 1 +
config/appconfig-mcs/xdm_default_contexts | 1 +
config/appconfig-mls/seusers | 1 +
config/appconfig-mls/xdm_default_contexts | 1 +
config/appconfig-standard/seusers | 1 +
config/appconfig-standard/xdm_default_contexts | 1 +
policy/modules/services/xserver.te | 11 +++++++++++
7 files changed, 17 insertions(+)
diff --git a/config/appconfig-mcs/seusers b/config/appconfig-mcs/seusers
index ce614b41..e87000a5 100644
--- a/config/appconfig-mcs/seusers
+++ b/config/appconfig-mcs/seusers
@@ -1,2 +1,3 @@
root:root:s0-mcs_systemhigh
__default__:user_u:s0
+sddm:xdm:s0
diff --git a/config/appconfig-mcs/xdm_default_contexts
b/config/appconfig-mcs/xdm_default_contexts
new file mode 100644
index 00000000..08c88c0f
--- /dev/null
+++ b/config/appconfig-mcs/xdm_default_contexts
@@ -0,0 +1 @@
+system_r:xdm_t:s0 system_r:xdm_t:s0
diff --git a/config/appconfig-mls/seusers b/config/appconfig-mls/seusers
index 4e500b09..38414fee 100644
--- a/config/appconfig-mls/seusers
+++ b/config/appconfig-mls/seusers
@@ -1,2 +1,3 @@
root:root:s0-mls_systemhigh
__default__:user_u:s0
+sddm:xdm:s0
diff --git a/config/appconfig-mls/xdm_default_contexts
b/config/appconfig-mls/xdm_default_contexts
new file mode 100644
index 00000000..08c88c0f
--- /dev/null
+++ b/config/appconfig-mls/xdm_default_contexts
@@ -0,0 +1 @@
+system_r:xdm_t:s0 system_r:xdm_t:s0
diff --git a/config/appconfig-standard/seusers
b/config/appconfig-standard/seusers
index f7c5bd27..f6066b50 100644
--- a/config/appconfig-standard/seusers
+++ b/config/appconfig-standard/seusers
@@ -1,2 +1,3 @@
root:root
__default__:user_u
+sddm:xdm:s0
diff --git a/config/appconfig-standard/xdm_default_contexts
b/config/appconfig-standard/xdm_default_contexts
new file mode 100644
index 00000000..af1cb2e7
--- /dev/null
+++ b/config/appconfig-standard/xdm_default_contexts
@@ -0,0 +1 @@
+system_r:xdm_t system_r:xdm_t
diff --git a/policy/modules/services/xserver.te
b/policy/modules/services/xserver.te
index 347e96c2..24cea45b 100644
--- a/policy/modules/services/xserver.te
+++ b/policy/modules/services/xserver.te
@@ -62,6 +62,10 @@ gen_tunable(xserver_object_manager, false)
## </desc>
gen_tunable(xserver_allow_dri, false)
+# for sddm to use pam for greeter
+role xdm_r;
+allow system_r xdm_r;
+
attribute x_domain;
# X Events
@@ -145,6 +149,7 @@ fs_associate_tmpfs(xconsole_device_t)
files_associate_tmp(xconsole_device_t)
type xdm_t;
+role xdm_r types xdm_t;
type xdm_exec_t;
auth_login_pgm_domain(xdm_t)
init_domain(xdm_t, xdm_exec_t)
@@ -843,6 +848,9 @@ 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)
+# for sddm to use pam for greeter, sddm greeter needs execmod
+allow xdm_t xdm_tmpfs_t:file execmod;
+
# Run Xorg.wrap
can_exec(xserver_t, xserver_exec_t)
@@ -1046,3 +1054,6 @@ ifdef(`distro_gentoo',`
cgmanager_stream_connect(xdm_t)
')
')
+
+# for sddm to use pam for greeter
+gen_user(xdm,, xdm_r, s0, s0)