Blame SOURCES/0001-Fix-handling-of-syscalls-only-allowed-by-devel.patch

f555bb
From 24485224223b8ed41976ead5801cb04c4d961f93 Mon Sep 17 00:00:00 2001
f555bb
From: Simon McVittie <smcv@collabora.com>
f555bb
Date: Fri, 8 Oct 2021 19:00:13 +0100
f555bb
Subject: [PATCH] Fix handling of syscalls only allowed by --devel
f555bb
f555bb
This was incorrectly looking at errno instead of -r.
f555bb
f555bb
Fixes: 0b38b0f0 "run: Handle unknown syscalls as intended"
f555bb
Signed-off-by: Simon McVittie <smcv@collabora.com>
f555bb
(cherry picked from commit 3fc8c672676ae016f8e7cc90481b2feecbad9861)
f555bb
(cherry picked from commit 97e128c2c1520202486b5e165e1734cbb421568a)
f555bb
---
f555bb
 common/flatpak-run.c | 2 +-
f555bb
 1 file changed, 1 insertion(+), 1 deletion(-)
f555bb
f555bb
diff --git a/common/flatpak-run.c b/common/flatpak-run.c
f555bb
index 6142daafa56d..4048476bf455 100644
f555bb
--- a/common/flatpak-run.c
f555bb
+++ b/common/flatpak-run.c
f555bb
@@ -2992,7 +2992,7 @@ setup_seccomp (FlatpakBwrap   *bwrap,
f555bb
             r = seccomp_rule_add (seccomp, SCMP_ACT_ERRNO (errnum), scall, 0);
f555bb
 
f555bb
           /* See above for the meaning of EFAULT. */
f555bb
-          if (errno == EFAULT)
f555bb
+          if (r == -EFAULT)
f555bb
             flatpak_debug2 ("Unable to block syscall %d: syscall not known to libseccomp?",
f555bb
                             scall);
f555bb
           else if (r < 0)
f555bb
-- 
f555bb
2.31.1
f555bb