diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-02-05 16:59:38 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-02-05 17:08:58 +0100 |
commit | 01da74243d74cbf9610666a0bf868da613e97069 (patch) | |
tree | f7f4d6b10de76f8f72ea3eecde7469fad8e63d8e /test/TEST-06-SELINUX | |
parent | test: clean the module build dir before compiling it (diff) | |
download | systemd-01da74243d74cbf9610666a0bf868da613e97069.tar.xz systemd-01da74243d74cbf9610666a0bf868da613e97069.zip |
test: add a custom SELinux file context
Since the test suite overhaul, the test units are now under
/usr/lib/systemd/tests/testdata/tetsuite-06.units with
system_u:object_r:lib_t context. This causes an AVC denial, since the
systemd unit files are expected to have the
system_u:object_r:systemd_unit_file_t context. Let's fix this by using a
custom file context definition.
Diffstat (limited to 'test/TEST-06-SELINUX')
-rw-r--r-- | test/TEST-06-SELINUX/systemd_test.fc | 1 | ||||
-rwxr-xr-x | test/TEST-06-SELINUX/test.sh | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/TEST-06-SELINUX/systemd_test.fc b/test/TEST-06-SELINUX/systemd_test.fc new file mode 100644 index 0000000000..249c6792cf --- /dev/null +++ b/test/TEST-06-SELINUX/systemd_test.fc @@ -0,0 +1 @@ +/usr/lib/systemd/tests/testdata/testsuite-06\.units(/.*)? system_u:object_r:systemd_unit_file_t:s0 diff --git a/test/TEST-06-SELINUX/test.sh b/test/TEST-06-SELINUX/test.sh index 37528a1a26..f05cd35593 100755 --- a/test/TEST-06-SELINUX/test.sh +++ b/test/TEST-06-SELINUX/test.sh @@ -37,6 +37,7 @@ test_append_files() { mkdir $1/systemd-test-module cp systemd_test.te $1/systemd-test-module cp systemd_test.if $1/systemd-test-module + cp systemd_test.fc $1/systemd-test-module dracut_install -o sesearch dracut_install runcon dracut_install checkmodule semodule semodule_package m4 make load_policy sefcontext_compile |