]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
seccomp: don't ignore syscalls when there's no proxy
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 5 Jul 2019 07:44:17 +0000 (09:44 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 9 Jul 2019 10:25:10 +0000 (12:25 +0200)
The container process would just hang.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/seccomp.c

index 272eeb766cfbd570c243fdc82c9be369994e46cc..64c3140b563763580d6ba0ce5fb03d2d7764a841 100644 (file)
@@ -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;