Commit e23299b4 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent fd8e5884
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment