mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-23 00:17:42 +00:00
Hide magisk internal mount point
This commit is contained in:
parent
c48962bdf7
commit
deedb462a0
@ -392,6 +392,13 @@ static void daemon_entry() {
|
|||||||
ssprintf(path, sizeof(path), "%s/" ROOTOVL, tmp);
|
ssprintf(path, sizeof(path), "%s/" ROOTOVL, tmp);
|
||||||
rm_rf(path);
|
rm_rf(path);
|
||||||
|
|
||||||
|
// Unshare magiskd
|
||||||
|
xunshare(CLONE_NEWNS);
|
||||||
|
// Hide magisk internal mount point
|
||||||
|
xmount(nullptr, tmp, nullptr, MS_PRIVATE | MS_REC, nullptr);
|
||||||
|
// Fix sdcardfs bug on old kernel
|
||||||
|
xmount(nullptr, "/mnt", nullptr, MS_SLAVE | MS_REC, nullptr);
|
||||||
|
|
||||||
// Use isolated devpts if kernel support
|
// Use isolated devpts if kernel support
|
||||||
if (access("/dev/pts/ptmx", F_OK) == 0) {
|
if (access("/dev/pts/ptmx", F_OK) == 0) {
|
||||||
ssprintf(path, sizeof(path), "%s/" SHELLPTS, tmp);
|
ssprintf(path, sizeof(path), "%s/" SHELLPTS, tmp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user