]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
seccomp: ignore (and debug log) errors by all invocations of seccomp_rule_add_exact() 6952/head
authorLennart Poettering <lennart@poettering.net>
Thu, 5 Oct 2017 09:26:09 +0000 (11:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 5 Oct 2017 09:27:34 +0000 (11:27 +0200)
System calls might exist on some archs but not on others, or might be
multiplexed but not on others. Ignore such errors when putting together
a filter at this location like we already do it on all others.

src/shared/seccomp-util.c

index a3728ff7b2f3c9d9c5ba41a79684a967b77ddf81..73dc571b6bbbac4ea774b5777e5f192ddb2b8710 100644 (file)
@@ -1549,8 +1549,10 @@ int seccomp_lock_personality(unsigned long personality) {
                                 SCMP_SYS(personality),
                                 1,
                                 SCMP_A0(SCMP_CMP_NE, personality));
-                if (r < 0)
-                        return r;
+                if (r < 0) {
+                        log_debug_errno(r, "Failed to add scheduler rule for architecture %s, skipping: %m", seccomp_arch_to_string(arch));
+                        continue;
+                }
 
                 r = seccomp_load(seccomp);
                 if (IN_SET(r, -EPERM, -EACCES))