diff options
author | Topi Miettinen <toiwoton@gmail.com> | 2020-08-05 15:31:26 +0200 |
---|---|---|
committer | Topi Miettinen <toiwoton@gmail.com> | 2020-09-15 11:54:17 +0200 |
commit | 005bfaf11876e261de6b99d597b69f664b53e7c5 (patch) | |
tree | 7aa214e69fad5ff0d0ac245529707dbf2dbbd44d /src/test/test-execute.c | |
parent | busctl: add missing shortopt -l (diff) | |
download | systemd-005bfaf11876e261de6b99d597b69f664b53e7c5.tar.xz systemd-005bfaf11876e261de6b99d597b69f664b53e7c5.zip |
exec: Add kill action to system call filters
Define explicit action "kill" for SystemCallErrorNumber=.
In addition to errno code, allow specifying "kill" as action for
SystemCallFilter=.
---
v7: seccomp_parse_errno_or_action() returns -EINVAL if !HAVE_SECCOMP
v6: use streq_ptr(), let errno_to_name() handle bad values, kill processes,
init syscall_errno
v5: actually use seccomp_errno_or_action_to_string(), don't fail bus unit
parsing without seccomp
v4: fix build without seccomp
v3: drop log action
v2: action -> number
Diffstat (limited to 'src/test/test-execute.c')
-rw-r--r-- | src/test/test-execute.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c index e32e0c0b6c..b5b93b5283 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -434,6 +434,8 @@ static void test_exec_systemcallfilter(Manager *m) { test(__func__, m, "exec-systemcallfilter-with-errno-name.service", errno_from_name("EILSEQ"), CLD_EXITED); test(__func__, m, "exec-systemcallfilter-with-errno-number.service", 255, CLD_EXITED); test(__func__, m, "exec-systemcallfilter-with-errno-multi.service", errno_from_name("EILSEQ"), CLD_EXITED); + test(__func__, m, "exec-systemcallfilter-override-error-action.service", SIGSYS, CLD_KILLED); + test(__func__, m, "exec-systemcallfilter-override-error-action2.service", errno_from_name("EILSEQ"), CLD_EXITED); #endif } |