summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch')
-rw-r--r--recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch b/recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch
new file mode 100644
index 00000000..391af381
--- /dev/null
+++ b/recipes-containers/lxc/files/commands-fix-check-for-seccomp-notify-support.patch
@@ -0,0 +1,44 @@
1From a342b11fedb3010630de4909ca707ebdc0862060 Mon Sep 17 00:00:00 2001
2From: Eneas U de Queiroz <cotequeiroz@gmail.com>
3Date: Fri, 25 Dec 2020 13:54:14 -0300
4Subject: [PATCH] commands: fix check for seccomp notify support
5
6Use HAVE_SECCOMP_NOTIFY instead of HAVE_DECL_SECCOMP_NOTIFY_FD.
7Currently the latter will be true if the declaration is found by
8configure, even if 'configure --disable-seccomp' is used.
9
10HAVE_SECCOMP_NOTIFY is defined in lxcseccomp.h if both HAVE_SECCOMP and
11HAVE_DECL_SECCOMP_NOTIFY_FD are true, which is the correct behavior.
12
13Upstream-status: submitted https://github.com/lxc/lxc/pull/3623
14
15Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
16---
17 src/lxc/commands.c | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/src/lxc/commands.c b/src/lxc/commands.c
21index a9a03ca2c..37d1abcef 100644
22--- a/src/lxc/commands.c
23+++ b/src/lxc/commands.c
24@@ -501,7 +501,7 @@ static int lxc_cmd_get_devpts_fd_callback(int fd, struct lxc_cmd_req *req,
25
26 int lxc_cmd_get_seccomp_notify_fd(const char *name, const char *lxcpath)
27 {
28-#if HAVE_DECL_SECCOMP_NOTIFY_FD
29+#ifdef HAVE_SECCOMP_NOTIFY
30 int ret, stopped;
31 struct lxc_cmd_rr cmd = {
32 .req = {
33@@ -526,7 +526,7 @@ static int lxc_cmd_get_seccomp_notify_fd_callback(int fd, struct lxc_cmd_req *re
34 struct lxc_handler *handler,
35 struct lxc_epoll_descr *descr)
36 {
37-#if HAVE_DECL_SECCOMP_NOTIFY_FD
38+#ifdef HAVE_SECCOMP_NOTIFY
39 struct lxc_cmd_rsp rsp = {
40 .ret = 0,
41 };
42--
432.17.1
44