Let isolation namespace base on app namespace
This commit is contained in:
parent
fee4031d0f
commit
e458215f27
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user