nspawn,shared: cleanup use of ERRNO_IS_SECCOMP_FATAL()
authorDmitry V. Levin <ldv@strace.io>
Fri, 14 Jul 2023 08:00:00 +0000 (08:00 +0000)
committerDmitry V. Levin <ldv@strace.io>
Fri, 28 Jul 2023 12:28:35 +0000 (12:28 +0000)
commit5cfc19052073ef744c03f049bac593be28304341
treecebf2413702df4dfbd70ef897dbfbdeed3450120
parent0d16fab986a2147292d466ddf3315ceafcae0eef
nspawn,shared: cleanup use of ERRNO_IS_SECCOMP_FATAL()

Given that ERRNO_IS_SECCOMP_FATAL() also matches positive values,
make sure this macro is not called with arguments that do not have
errno semantics.

In this case the arguments passed to ERRNO_IS_SECCOMP_FATAL() are the
values returned by external libseccomp function seccomp_load() which is
not expected to return any positive values, but let's be consistent
anyway and move ERRNO_IS_SECCOMP_FATAL() invocations to the branches
where the return values are known to be negative.
src/nspawn/nspawn-seccomp.c
src/nspawn/nspawn.c
src/shared/seccomp-util.c