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

Dmitry Safonov dsafonov at odin.com
Fri Dec 18 03:40:51 PST 2015


On 12/17/2015 12:25 AM, Andrey Vagin wrote:
> 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>
Thanks.
Reviewed-by: Dmitry Safonov <dsafonov at odin.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


-- 
Regards,
Dmitry Safonov



More information about the CRIU mailing list