Skip to content

Commit

Permalink
Add missing optional_policy() to files_relabel_all_files()
Browse files Browse the repository at this point in the history
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 <[email protected]>

Resolves: rhbz#2182033
  • Loading branch information
WOnder93 authored and zpytela committed Oct 20, 2023
1 parent d2f28ac commit 9d2f906
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions policy/modules/kernel/files.if
Original file line number Diff line number Diff line change
Expand Up @@ -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)
')
')

########################################
Expand Down

0 comments on commit 9d2f906

Please sign in to comment.