Commit b5d80a88 authored by 残页's avatar 残页 Committed by John Wu

Only care about mount namespace isolating

parent 7f4f95cf
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment