[meta-selinux][PATCH] seatd: allow seatd to use unallocated TTYs

Sasi Kumar Maddineni <[email protected]>
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <[email protected]>
seatd requires access to unallocated TTY devices such as /dev/tty0
to manage seat activation and VT handling for Wayland compositors.

Added policies to allow seatd to access unallocated TTY devices.

Signed-off-by: Jaihind Yadav <[email protected]>
Signed-off-by: Sasi Kumar Maddineni <[email protected]>
---
 ...-allow-seatd-to-use-unallocated-TTYs.patch | 33 +++++++++++++++++++
 .../refpolicy/refpolicy_common.inc            |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 recipes-security/refpolicy/refpolicy/0062-selinux-allow-seatd-to-use-unallocated-TTYs.patch

diff --git a/recipes-security/refpolicy/refpolicy/0062-selinux-allow-seatd-to-use-unallocated-TTYs.patch b/recipes-security/refpolicy/refpolicy/0062-selinux-allow-seatd-to-use-unallocated-TTYs.patch
new file mode 100644
index 0000000..3554295
--- /dev/null
+++ b/recipes-security/refpolicy/refpolicy/0062-selinux-allow-seatd-to-use-unallocated-TTYs.patch
@@ -0,0 +1,33 @@
+From ebafd639e8d3847d0c8c2313c71994c4ea5e1501 Mon Sep 17 00:00:00 2001
+From: Jaihind Yadav <[email protected]>
+Date: Tue, 12 May 2026 11:23:17 +0530
+Subject: [PATCH] selinux: allow seatd to use unallocated TTYs
+
+seatd requires access to unallocated TTY devices such as /dev/tty0
+to manage seat activation and VT handling for Wayland compositors.
+
+Added policies to allow seatd to access unallocated TTY devices.
+
+Upstream-Status: Backport [https://github.com/SELinuxProject/refpolicy/pull/1114]
+
+Signed-off-by: Jaihind Yadav <[email protected]>
+Signed-off-by: Sasi Kumar Maddineni <[email protected]>
+---
+ policy/modules/services/seatd.te | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/policy/modules/services/seatd.te b/policy/modules/services/seatd.te
+index 44ba85ee7..d539dc446 100644
+--- a/policy/modules/services/seatd.te
++++ b/policy/modules/services/seatd.te
+@@ -32,3 +32,7 @@ auth_use_nsswitch(seatd_t)
+ 
+ dev_rw_dri(seatd_t)
+ dev_rw_input_dev(seatd_t)
++
++# seatd requires access to unallocated TTYs (e.g. /dev/tty0) to manage
++# seat activation and VT handling for Wayland compositors.
++term_use_unallocated_ttys(seatd_t)
+-- 
+2.43.0
+
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc
index 014714c..87c9e39 100644
--- a/recipes-security/refpolicy/refpolicy_common.inc
+++ b/recipes-security/refpolicy/refpolicy_common.inc
@@ -74,6 +74,7 @@ SRC_URI += " \
         file://0056-policy-modules-system-setrans-allow-setrans_t-use-fd.patch \
         file://0057-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \
         file://0058-policy-modules-system-logging-make-syslogd_runtime_t.patch \
+        file://0062-selinux-allow-seatd-to-use-unallocated-TTYs.patch \
         "
 
 S = "${UNPACKDIR}/refpolicy"
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.