From b5d80a88d1d56b8c7ec6be3aa5c6efba14518462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=8B=E9=A1=B5?= <31466456+canyie@users.noreply.github.com> Date: Sun, 5 Dec 2021 09:52:25 +0800 Subject: [PATCH] Only care about mount namespace isolating --- native/jni/zygisk/hook.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/zygisk/hook.cpp b/native/jni/zygisk/hook.cpp index 82c916c7d..1154eeb9c 100644 --- a/native/jni/zygisk/hook.cpp +++ b/native/jni/zygisk/hook.cpp @@ -153,7 +153,7 @@ DCL_HOOK_FUNC(int, fork) { // Unmount stuffs in the process's private mount namespace DCL_HOOK_FUNC(int, unshare, int flags) { int res = old_unshare(flags); - if (g_ctx && res == 0) { + if (g_ctx && (flags & CLONE_NEWNS) != 0 && res == 0) { if (g_ctx->flags[UNMOUNT_FLAG]) { revert_unmount(); } else {