seccomp: ignore (and debug log) errors by all invocations of seccomp_rule_add_exact()

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.
This commit is contained in:
Lennart Poettering 2017-10-05 11:26:09 +02:00
parent 1c6af69b2d
commit 448ac526a3
1 changed files with 4 additions and 2 deletions

View 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))