Commit d2051748 authored by vvb2060's avatar vvb2060 Committed by John Wu

Prevent multiple mounts of devpts

parent 713ce471
......@@ -349,6 +349,7 @@ static void daemon_entry() {
// Use isolated devpts if kernel support
if (access("/dev/pts/ptmx", F_OK) == 0) {
auto pts = MAGISKTMP + "/" SHELLPTS;
if (access(pts.data(), F_OK)) {
xmkdirs(pts.data(), 0755);
xmount("devpts", pts.data(), "devpts",
MS_NOSUID | MS_NOEXEC, "newinstance");
......@@ -358,6 +359,7 @@ static void daemon_entry() {
rmdir(pts.data());
}
}
}
sockaddr_un sun;
socklen_t len = setup_sockaddr(&sun, MAIN_SOCKET);
......
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