dev_rw_infiniband_dev() and mount_rw_pid_files() are not defined in refpolicy. Fall back to dev_rw_generic_{blk|chr}_files() and mount_rw_runtime_files() if they are not defined. Also, userdom_search_admin_dir() is not defined in refpolicy because it doesn't have admin_home_t. Fall back to userdom_search_user_home_content(), which should apply for root's home directory under refpolicy. Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> --- policy/test_policy.if | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/policy/test_policy.if b/policy/test_policy.if index 939cd7e..e1175e8 100644 --- a/policy/test_policy.if +++ b/policy/test_policy.if @@ -60,3 +60,25 @@ interface(`userdom_sysadm_entry_spec_domtrans_to',` allow $1 sysadm_t:process sigchld; ') ') + +# Workarounds for refpolicy: + +ifdef(`dev_rw_infiniband_dev', `', ` dnl +interface(`dev_rw_infiniband_dev', ` + dev_rw_generic_blk_files($1) + dev_rw_generic_chr_files($1) +') +') + +ifdef(`mount_rw_pid_files', `', ` dnl +interface(`mount_rw_pid_files', ` + mount_rw_runtime_files($1) +') +') + +# Refpolicy doesn't have admin_home_t - assume /root will be user_home_dir_t. +ifdef(`userdom_search_admin_dir', `', ` dnl +interface(`userdom_search_admin_dir', ` + userdom_search_user_home_content($1) +') +') -- 2.23.0