From 72ed9de4f15b204188f63722d4adb2db0cc2d223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Mon, 11 Mar 2024 19:18:43 +0100 Subject: [PATCH] policy: avoid usage of fedora specific install_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The type install_t is fedora specific and not declared in the Reference Policy. Avoid linker failures by using anaconda_fd_use() if available. Fixes: f9f4a604b50e ("policy: fix testsuite_domain_type_minimal() to work with rpm-ostree") Signed-off-by: Christian Göttsche --- policy/test_policy.if | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/policy/test_policy.if b/policy/test_policy.if index e590f0ba..ea15ca66 100644 --- a/policy/test_policy.if +++ b/policy/test_policy.if @@ -37,7 +37,6 @@ interface(`testsuite_domain_type',` interface(`testsuite_domain_type_minimal',` gen_require(` type setrans_var_run_t; - type install_t; ') testsuite_domain_type_common($1) @@ -47,10 +46,13 @@ interface(`testsuite_domain_type_minimal',` allow $1 proc_t:lnk_file { read }; allow $1 self:dir { search }; allow $1 self:file { open read write }; - allow $1 install_t:fd use; # for rpm-ostree --apply-live magic dontaudit $1 security_t:filesystem getattr; dontaudit $1 self:file getattr; dontaudit $1 setrans_var_run_t:dir search; + + ifdef(`anaconda_fd_use',` + anaconda_fd_use($1) # for rpm-ostree --apply-live magic + ') ') interface(`testsuite_caller_association_setcontext',`