The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5998
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From dfdce693c584bff9ab78bdfda0724bd48ffdbbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Mon, 22 Jul 2019 17:59:46 -0400 Subject: [PATCH] lxd/seccomp: Fix broken setxattr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/main_forksyscall.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lxd/main_forksyscall.go b/lxd/main_forksyscall.go index 1f03cc1294..0e352d234c 100644 --- a/lxd/main_forksyscall.go +++ b/lxd/main_forksyscall.go @@ -283,6 +283,13 @@ static void forksetxattr() _exit(EXIT_FAILURE); } + snprintf(path, sizeof(path), "/proc/%d/cwd", pid); + cwd_fd = open(path, O_PATH | O_RDONLY | O_CLOEXEC); + if (cwd_fd < 0) { + fprintf(stderr, "%d", ENOANO); + _exit(EXIT_FAILURE); + } + if (setns(mnt_fd, CLONE_NEWNS)) { fprintf(stderr, "%d", ENOANO); _exit(EXIT_FAILURE);
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel