From 78bf2493bf2b92a12636a4ec64ded21e33644441 Mon Sep 17 00:00:00 2001 From: Wang Han <1701210638@pku.edu.cn> Date: Mon, 3 Jun 2024 21:21:39 +0800 Subject: [PATCH] Convert devpts domain to ksu_file (#1801) AOSP sepolicy does not allow appdomain to open pts. Hence, convert devpts domain to ksu_file to allow any access. --- kernel/selinux/selinux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/selinux/selinux.c b/kernel/selinux/selinux.c index 74095362089c..17a25dae5c70 100644 --- a/kernel/selinux/selinux.c +++ b/kernel/selinux/selinux.c @@ -116,7 +116,7 @@ bool is_zygote(void *sec) return result; } -#define DEVPTS_DOMAIN "u:object_r:devpts:s0" +#define DEVPTS_DOMAIN "u:object_r:ksu_file:s0" u32 ksu_get_devpts_sid() { @@ -127,4 +127,4 @@ u32 ksu_get_devpts_sid() pr_info("get devpts sid err %d\n", err); } return devpts_sid; -} \ No newline at end of file +}