smartmon: allow smartd to read fsadm_db_t files

On gentoo, smartd need to access fsadm_db_t files.

Signed-off-by: Corentin LABBE <clabbe.montjoie@gmail.com>
This commit is contained in:
Corentin LABBE 2023-01-04 17:00:37 +01:00
parent d03ecd7118
commit a25a1a3056
2 changed files with 21 additions and 0 deletions

View File

@ -120,3 +120,6 @@ optional_policy(`
seutil_sigchld_newrole(fsdaemon_t)
')
optional_policy(`
fstools_read_fsadm_db_files(fsdaemon_t)
')

View File

@ -264,3 +264,21 @@ interface(`fstools_manage_swap_files',`
allow $1 swapfile_t:file manage_file_perms;
')
########################################
## <summary>
## Read fsadm_db_t files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`fstools_read_fsadm_db_files',`
gen_require(`
type fsadm_db_t;
')
read_files_pattern($1, fsadm_db_t, fsadm_db_t)
')