Commit cc77a245 authored by topjohnwu's avatar topjohnwu

Prevent accidental magiskinit execution

Close #1281
parent 71a91ac7
...@@ -678,6 +678,9 @@ int main(int argc, char *argv[]) { ...@@ -678,6 +678,9 @@ int main(int argc, char *argv[]) {
return dump_manager(argv[3], 0644); return dump_manager(argv[3], 0644);
} }
if (getpid() != 1)
return 1;
MagiskInit init(argv); MagiskInit init(argv);
// Run the main routine // Run the main routine
......
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