From a6c2ba7c1e2302ce642b8d65bc1c7cf3000fc14c Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sun, 15 Dec 2024 20:41:50 +0800 Subject: [PATCH] Allow kernel to relabel --- native/src/sepolicy/rules.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/native/src/sepolicy/rules.rs b/native/src/sepolicy/rules.rs index f34c315cb..c4007a197 100644 --- a/native/src/sepolicy/rules.rs +++ b/native/src/sepolicy/rules.rs @@ -111,6 +111,8 @@ impl SepolicyMagisk for sepolicy { // For relabelling files allow(["rootfs"], ["labeledfs", "tmpfs"], ["filesystem"], ["associate"]); allow([file], ["pipefs", "devpts"], ["filesystem"], ["associate"]); + allow(["kernel"], all, ["file"], ["relabelto"]); + allow(["kernel"], ["tmpfs"], ["file"], ["relabelfrom"]); // Let init transit to SEPOL_PROC_DOMAIN allow(["kernel"], ["kernel"], ["process"], ["setcurrent"]);