2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

mount: use absolute paths for pivot_root

When we initialize a sub-mount namespace, we need to use absolute paths.
For example we change cwd in prep_unix_sk_cwd()

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2015-10-06 23:28:00 +03:00
committed by Pavel Emelyanov
parent fd8e58841a
commit e23299b45a

View File

@@ -2598,7 +2598,8 @@ static int do_restore_task_mnt_ns(struct ns_id *nsid, struct pstree_item *curren
return -1;
}
print_ns_root(nsid, path, sizeof(path));
path[0] = '/';
print_ns_root(nsid, path + 1, sizeof(path) - 1);
if (cr_pivot_root(path))
return -1;