mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-13 05:37:47 +02:00
Let isolation namespace base on app namespace
This commit is contained in:
@ -293,6 +293,7 @@ void su_daemon_handler(int client, struct ucred *credential) {
|
|||||||
break;
|
break;
|
||||||
case NAMESPACE_MODE_ISOLATE:
|
case NAMESPACE_MODE_ISOLATE:
|
||||||
LOGD("su: use new isolated namespace\n");
|
LOGD("su: use new isolated namespace\n");
|
||||||
|
switch_mnt_ns(ctx.pid);
|
||||||
xunshare(CLONE_NEWNS);
|
xunshare(CLONE_NEWNS);
|
||||||
xmount(nullptr, "/", nullptr, MS_PRIVATE | MS_REC, nullptr);
|
xmount(nullptr, "/", nullptr, MS_PRIVATE | MS_REC, nullptr);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user