From 9d2f906d4b7cd2503b96b3173fed61a761749b95 Mon Sep 17 00:00:00 2001 From: Ondrej Mosnacek Date: Fri, 6 Oct 2023 14:39:11 +0200 Subject: [PATCH] Add missing optional_policy() to files_relabel_all_files() The calls to interfaces from other modules must be enclosed in optional_policy(), otherwise the usage of this interface may lead to build errors. Signed-off-by: Ondrej Mosnacek Resolves: rhbz#2182033 --- policy/modules/kernel/files.if | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if index 2e2af528be..008b6ec719 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -1765,8 +1765,12 @@ interface(`files_relabel_all_files',` relabel_chr_files_pattern($1, { file_type $2 }, { file_type $2 }) # satisfy the assertions: - seutil_relabelto_bin_policy($1) - auth_relabelto_shadow($1) + optional_policy(` + seutil_relabelto_bin_policy($1) + ') + optional_policy(` + auth_relabelto_shadow($1) + ') ') ########################################