mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-03-20 02:50:50 +00:00
Prevent multiple mounts of devpts
This commit is contained in:
parent
713ce4719b
commit
d20517483e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user