Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From aae163bded7e04386707fae5d14909b484a5e222 Mon Sep 17 00:00:00 2001
From: Gargi Misra <gmisra@qti.qualcomm.com>
Date: Fri, 27 Mar 2026 12:00:18 +0530
Subject: [PATCH] refpolicy-targeted: Allow mount to run with system role

type=SELINUX_ERR msg=audit(44.591:158): op=security_compute_sid invalid_context="system_u:system_r:unconfined_mount_t:s0" scontext=system_u:system_r:unconfined_t:s0 tcontext=system_u:object_r:mount_exec_t:s0 tclass=process

Upstream-Status: Inappropriate [meta-oe specific]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this meta-oe specific?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue is observed in the adb shell, which is provided by meta-oe, hence it is meta-oe specific.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GargiQcom if the change was in recipe or other metadata then it will be meta-oe for sure or if the change was just needed for OE for some reason. Since the patch is changing the original component, we have to answer question if this patch should be submitted to refpolicy-targeted component upstream or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. Since the overall approach is disputed and doesn’t seem suitable for this repo, I’ll close this PR and re-evaluate the change internally before deciding on the right upstream path.


Signed-off by: Gargi Misra <gmisra@qti.qualcomm.com>
---
policy/modules/system/unconfined.te | 1 +
1 file changed, 1 insertion(+)

diff --git a/policy/modules/system/unconfined.te b/policy/modules/system/unconfined.te
index 1c98f5e85..26085d7d8 100644
--- a/policy/modules/system/unconfined.te
+++ b/policy/modules/system/unconfined.te
@@ -39,6 +39,7 @@ logging_send_syslog_msg(unconfined_t)
logging_run_auditctl(unconfined_t, unconfined_r)

mount_run_unconfined(unconfined_t, unconfined_r)
+mount_run_unconfined(unconfined_t, system_r)

seutil_run_setfiles(unconfined_t, unconfined_r)
seutil_run_semanage(unconfined_t, unconfined_r)
--
2.43.0

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"

SRC_URI:append = " \
file://0001-Added-sepolicy-for-adb-service.patch \
file://0002-Allow-mount-to-run-with-system.patch \
"