From 5357b872f7052936a58748b7a338a42c86c2a4fc Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 5 Jul 2019 09:44:17 +0200 Subject: [PATCH] seccomp: don't ignore syscalls when there's no proxy The container process would just hang. Signed-off-by: Wolfgang Bumiller --- src/lxc/seccomp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c index 272eeb766..64c3140b5 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -1366,17 +1366,17 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data, char *cookie = conf->seccomp.notifier.cookie; uint64_t req_id; - if (listener_proxy_fd < 0) { - ERROR("No seccomp proxy registered"); - return minus_one_set_errno(EINVAL); - } - ret = seccomp_notify_receive(fd, req); if (ret) { SYSERROR("Failed to read seccomp notification"); goto out; } + if (listener_proxy_fd < 0) { + ERROR("No seccomp proxy registered"); + return minus_one_set_errno(EINVAL); + } + /* remember the ID in case we receive garbage from the proxy */ resp->id = req_id = req->id; -- 2.39.2