summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGargi Misra <gmisra@qti.qualcomm.com>2026-04-08 11:03:06 +0530
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-04-10 08:03:23 -0700
commitdd96b8a81e34b211b916258049c20717c2bb2478 (patch)
treeb94a508b6734ac647644e9af9741826e992c26a1
parentb9399b33ef09ef9724f77efc423ae48101fb5a93 (diff)
downloadmeta-openembedded-dd96b8a81e34b211b916258049c20717c2bb2478.tar.gz
Revert "refpolicy-targeted: Added sepolicy for adb service"
This reverts commit 00616ccdaf0ce9e54ac7c75fabdb2d8f079c7578. Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
-rw-r--r--meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted/0001-Added-sepolicy-for-adb-service.patch76
-rw-r--r--meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted_git.bbappend5
2 files changed, 0 insertions, 81 deletions
diff --git a/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted/0001-Added-sepolicy-for-adb-service.patch b/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted/0001-Added-sepolicy-for-adb-service.patch
deleted file mode 100644
index f766bc3123..0000000000
--- a/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted/0001-Added-sepolicy-for-adb-service.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1From c110d893be565ade574ee2933c6e89197f833006 Mon Sep 17 00:00:00 2001
2From: Gargi Misra <gmisra@qti.qualcomm.com>
3Date: Thu, 5 Mar 2026 12:39:42 +0530
4Subject: [PATCH] refpolicy-targeted: Added sepolicy for adb service
5
6 - Labeled adb binary
7 - Moved adb shell from initrc_t to unconfined_t
8
9Upstream-Status: Inappropriate [meta-oe Specific]
10
11Signed-off-by: Gargi Misra <gmisra@qti.qualcomm.com>
12---
13 policy/modules/services/adbd.fc | 5 +++++
14 policy/modules/services/adbd.if | 5 +++++
15 policy/modules/services/adbd.te | 25 +++++++++++++++++++++++++
16 3 files changed, 35 insertions(+)
17 create mode 100644 policy/modules/services/adbd.fc
18 create mode 100644 policy/modules/services/adbd.if
19 create mode 100644 policy/modules/services/adbd.te
20
21diff --git a/policy/modules/services/adbd.fc b/policy/modules/services/adbd.fc
22new file mode 100644
23index 000000000..6f5bb9269
24--- /dev/null
25+++ b/policy/modules/services/adbd.fc
26@@ -0,0 +1,5 @@
27+/usr/bin/adbd -- gen_context(system_u:object_r:adbd_exec_t,s0)
28+
29+
30+
31+
32diff --git a/policy/modules/services/adbd.if b/policy/modules/services/adbd.if
33new file mode 100644
34index 000000000..612fc0106
35--- /dev/null
36+++ b/policy/modules/services/adbd.if
37@@ -0,0 +1,5 @@
38+## <summary>adb service.</summary>
39+
40+
41+
42+
43diff --git a/policy/modules/services/adbd.te b/policy/modules/services/adbd.te
44new file mode 100644
45index 000000000..f7e8ac7d0
46--- /dev/null
47+++ b/policy/modules/services/adbd.te
48@@ -0,0 +1,25 @@
49+policy_module(adbd)
50+
51+########################################
52+#
53+# Declarations
54+#
55+
56+type adbd_t;
57+type adbd_exec_t;
58+
59+init_daemon_domain(adbd_t, adbd_exec_t)
60+
61+# Move adb from system_r:initrc_t to unconfined_r:unconfined_t
62+unconfined_shell_domtrans(adbd_t)
63+
64+# Minimal Rules Required for adbd service
65+allow adbd_t self:capability sys_resource;
66+
67+dev_rw_usbfs(adbd_t)
68+files_read_etc_files(adbd_t)
69+term_use_ptmx(adbd_t)
70+term_use_generic_ptys(adbd_t)
71+
72+
73+
74--
752.43.0
76
diff --git a/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted_git.bbappend b/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted_git.bbappend
deleted file mode 100644
index 429b3ea9b5..0000000000
--- a/meta-oe/dynamic-layers/selinux/recipes-security/refpolicy/refpolicy-targeted_git.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
1FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
2
3SRC_URI:append = " \
4 file://0001-Added-sepolicy-for-adb-service.patch \
5 "