Commit 8ee9984e authored by topjohnwu's avatar topjohnwu

Add rules for magiskinit daemon

parent e5b6121d
...@@ -163,11 +163,12 @@ void sepol_min_rules() { ...@@ -163,11 +163,12 @@ void sepol_min_rules() {
sepol_attradd("su", "mlstrustedsubject"); sepol_attradd("su", "mlstrustedsubject");
sepol_attradd("su_device", "mlstrustedobject"); sepol_attradd("su_device", "mlstrustedobject");
// Let pre-init do stuffs // Let magiskinit daemon monitor and transit to su
sepol_allow("kernel", "kernel", "security", "load_policy");
sepol_allow("kernel", "kernel", "capability", "dac_override");
sepol_allow("kernel", "device", "dir", ALL); sepol_allow("kernel", "device", "dir", ALL);
sepol_allow("kernel", "device", "file", ALL); sepol_allow("kernel", "device", "file", ALL);
sepol_allow("kernel", "su", "unix_stream_socket", "connectto");
sepol_allow("kernel", "kernel", "process", "setcurrent");
sepol_allow("kernel", "su", "process", "dyntransition");
// Let init run stuffs in su context // Let init run stuffs in su context
sepol_allow("kernel", "su", "fd", "use"); sepol_allow("kernel", "su", "fd", "use");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment