Use xwrap functions
This commit is contained in:
parent
513d732934
commit
6ccc5f3788
4
su.c
4
su.c
@ -235,12 +235,12 @@ int su_daemon_main(int argc, char **argv) {
|
|||||||
LOGD("su: use namespace of pid=[%d]\n", su_ctx->pid);
|
LOGD("su: use namespace of pid=[%d]\n", su_ctx->pid);
|
||||||
if (switch_mnt_ns(su_ctx->pid)) {
|
if (switch_mnt_ns(su_ctx->pid)) {
|
||||||
LOGD("su: setns failed, fallback to isolated\n");
|
LOGD("su: setns failed, fallback to isolated\n");
|
||||||
unshare(CLONE_NEWNS);
|
xunshare(CLONE_NEWNS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NAMESPACE_MODE_ISOLATE:
|
case NAMESPACE_MODE_ISOLATE:
|
||||||
LOGD("su: use new isolated namespace\n");
|
LOGD("su: use new isolated namespace\n");
|
||||||
unshare(CLONE_NEWNS);
|
xunshare(CLONE_NEWNS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user