diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-12-03 14:58:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 14:58:20 +0100 |
commit | 6dd16814a56d2ce96ab3c4c611a61e47f2f7b663 (patch) | |
tree | 38cdececafec3b424ca0acbcd8d268e7419931e8 /test | |
parent | 03d8ebb935fb989e03ec27065a16bf9b79a5816b (diff) | |
parent | ceedbf8185fc7593366679f02d31da63af8c4bd1 (diff) | |
download | systemd-6dd16814a56d2ce96ab3c4c611a61e47f2f7b663.tar.gz |
Merge pull request #17079 from keszybz/late-exec-resolution
Resolve executable paths before execution, use fexecve()
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 2 | ||||
-rw-r--r-- | test/test-execute/exec-systemcallfilter-failing.service | 2 | ||||
-rw-r--r-- | test/test-execute/exec-systemcallfilter-failing2.service | 4 | ||||
-rwxr-xr-x | test/test-path-util/script.sh | 6 |
4 files changed, 11 insertions, 3 deletions
diff --git a/test/meson.build b/test/meson.build index cc461febf1..799d74c7ae 100644 --- a/test/meson.build +++ b/test/meson.build @@ -11,6 +11,8 @@ if install_tests install_dir : testdata_dir) install_subdir('test-path', install_dir : testdata_dir) + install_subdir('test-path-util', + install_dir : testdata_dir) install_subdir('test-umount', install_dir : testdata_dir) install_subdir('test-network-generator-conversion', diff --git a/test/test-execute/exec-systemcallfilter-failing.service b/test/test-execute/exec-systemcallfilter-failing.service index 996f859217..c4b0799031 100644 --- a/test/test-execute/exec-systemcallfilter-failing.service +++ b/test/test-execute/exec-systemcallfilter-failing.service @@ -2,7 +2,7 @@ Description=Test for SystemCallFilter [Service] -ExecStart=/bin/sh -c 'echo "This should not be seen"' +ExecStart=/bin/sh -c '/bin/echo "This should not be seen"' Type=oneshot LimitCORE=0 SystemCallFilter=ioperm diff --git a/test/test-execute/exec-systemcallfilter-failing2.service b/test/test-execute/exec-systemcallfilter-failing2.service index c74f42248b..452aaf8273 100644 --- a/test/test-execute/exec-systemcallfilter-failing2.service +++ b/test/test-execute/exec-systemcallfilter-failing2.service @@ -2,7 +2,7 @@ Description=Test for SystemCallFilter [Service] -ExecStart=/bin/sh -c 'echo "This should not be seen"' +ExecStart=/bin/sh -c '/bin/echo "This should not be seen"' Type=oneshot LimitCORE=0 -SystemCallFilter=~write open execve exit_group close mmap munmap fstat DONOTEXIST +SystemCallFilter=~write open execve fexecve execveat exit_group close mmap munmap fstat DONOTEXIST diff --git a/test/test-path-util/script.sh b/test/test-path-util/script.sh new file mode 100755 index 0000000000..57c93e7476 --- /dev/null +++ b/test/test-path-util/script.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "$0 $@" +test "$(basename $0)" = "script.sh" || exit 1 +test "$1" = "--version" || exit 2 +echo "Life is good" |