seccomp: rework how the S[UG]ID filter is installed
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Apr 2019 11:11:00 +0000 (13:11 +0200)
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>
Mon, 2 Nov 2020 13:47:13 +0000 (14:47 +0100)
commit8cc497e735104080f6830a8f468b2724ae372990
tree24a2e9c05839a5dbe02e76fe2420a3d8ad9d0950
parent2f584bd93d64a75ab11b5a5aa31d0b7145da5a86
seccomp: rework how the S[UG]ID filter is installed

If we know that a syscall is undefined on the given architecture, don't
even try to add it.

Try to install the filter even if some syscalls fail. Also use a helper
function to make the whole a bit less magic.

This allows the S[UG]ID test to pass on arm64.

(cherry picked from commit da4dc9a6748797e804b6bc92ad513d509abf581c)

Resolves: #1860374
src/shared/seccomp-util.c