[CRIU] [PATCH 1.5/2] usernsd: Small fixlet to userns_call

Pavel Emelyanov xemul at parallels.com
Thu Feb 12 06:58:24 PST 2015


Sometimes we may do userns_call in dump too and in order not to
make special check what we're doing it's better just to keep one
inside userns_call().

This will be merged into patch 1/2 on the 2nd series (or merge).

---
 namespaces.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/namespaces.c b/namespaces.c
index 8f5aaaf..3b7ee42 100644
--- a/namespaces.c
+++ b/namespaces.c
@@ -982,7 +982,7 @@ int userns_call(uns_call_t call, int flags,
 		return -1;
 	}
 
-	if (!(root_ns_mask & CLONE_NEWUSER))
+	if (!usernsd_pid)
 		return call(arg, fd);
 
 	sk = get_service_fd(USERNSD_SK);
-- 
1.8.4.2




More information about the CRIU mailing list