Commit 025b4e86 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

namespaces: user open_proc() in switch_ns()

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a09de51c
......@@ -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;
......
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