mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
namespaces: user open_proc() in switch_ns()
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
a09de51c51
commit
025b4e86b5
@@ -66,8 +66,7 @@ int switch_ns(int pid, struct ns_desc *nd, int *rst)
|
||||
int nsfd;
|
||||
int ret = -1;
|
||||
|
||||
snprintf(buf, sizeof(buf), "/proc/%d/ns/%s", pid, nd->str);
|
||||
nsfd = open(buf, O_RDONLY);
|
||||
nsfd = open_proc(pid, "ns/%s", nd->str);
|
||||
if (nsfd < 0) {
|
||||
pr_perror("Can't open ipcns file");
|
||||
goto err_ns;
|
||||
|
Reference in New Issue
Block a user