Refactor magiskrc

This commit is contained in:
LoveSy
2023-03-22 17:53:15 -07:00
committed by John Wu
parent 87e036a190
commit dba5020e4f
9 changed files with 36 additions and 58 deletions
+5 -1
View File
@@ -64,7 +64,7 @@ void sepolicy::magisk_rules() {
}
// Allow these processes to access MagiskSU
vector<const char *> clients{ "init", "shell", "update_engine", "appdomain" };
vector<const char *> clients{ "shell", "update_engine", "appdomain" };
for (auto type : clients) {
if (!exists(type))
continue;
@@ -137,6 +137,10 @@ void sepolicy::magisk_rules() {
// Let init run stuffs
allow("kernel", SEPOL_PROC_DOMAIN, "fd", "use");
allow("init", SEPOL_PROC_DOMAIN, "process", ALL);
allow("init", SEPOL_EXEC_TYPE, "file", "read");
allow("init", SEPOL_EXEC_TYPE, "file", "open");
allow("init", SEPOL_EXEC_TYPE, "file", "getattr");
allow("init", SEPOL_EXEC_TYPE, "file", "execute");
// suRights
allow("servicemanager", SEPOL_PROC_DOMAIN, "dir", "search");