mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-12 09:54:38 +00:00
Move devpts mount to magiskinit
This commit is contained in:
@@ -392,21 +392,6 @@ static void daemon_entry() {
|
||||
ssprintf(path, sizeof(path), "%s/" ROOTOVL, tmp);
|
||||
rm_rf(path);
|
||||
|
||||
// Use isolated devpts if kernel support
|
||||
if (access("/dev/pts/ptmx", F_OK) == 0) {
|
||||
ssprintf(path, sizeof(path), "%s/" SHELLPTS, tmp);
|
||||
if (access(path, F_OK)) {
|
||||
xmkdirs(path, 0755);
|
||||
xmount("devpts", path, "devpts", MS_NOSUID | MS_NOEXEC, "newinstance");
|
||||
char ptmx[64];
|
||||
ssprintf(ptmx, sizeof(ptmx), "%s/ptmx", path);
|
||||
if (access(ptmx, F_OK)) {
|
||||
xumount(path);
|
||||
rmdir(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fd = xsocket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||||
sockaddr_un addr = {.sun_family = AF_LOCAL};
|
||||
ssprintf(addr.sun_path, sizeof(addr.sun_path), "%s/" MAIN_SOCKET, tmp);
|
||||
|
||||
Reference in New Issue
Block a user