[CRIU] [PATCH] loginuid: save value of loginuid from a target userns

Andrey Vagin avagin at openvz.org
Wed Dec 16 13:25:32 PST 2015


From: Andrew Vagin <avagin at virtuozzo.com>

It is restored from the userns.

21:22:31.443:     4: FAIL: loginuid.c:93: loginuid value 3 is different after restore: 100003

Cc: Dmitry Safonov <dsafonov at odin.com>
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 cr-dump.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cr-dump.c b/cr-dump.c
index e76071c..20a2c01 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -331,6 +331,7 @@ static int dump_pid_misc(pid_t pid, TaskCoreEntry *tc)
 
 	tc->has_loginuid = true;
 	tc->loginuid = parse_pid_loginuid(pid, &ret);
+	tc->loginuid = userns_uid(tc->loginuid);
 	/*
 	 * loginuid dumping is critical, as if not correctly
 	 * restored, you may loss ability to login via SSH to CT
-- 
2.4.3



More information about the CRIU mailing list