mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 15:55:53 +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:
committed by
Pavel Emelyanov
parent
fd8e58841a
commit
e23299b45a
3
mount.c
3
mount.c
@@ -2598,7 +2598,8 @@ static int do_restore_task_mnt_ns(struct ns_id *nsid, struct pstree_item *curren
|
|||||||
return -1;
|
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))
|
if (cr_pivot_root(path))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user