## Policy for IPA services. ######################################## ## ## Execute rtas_errd in the rtas_errd domin. ## ## ## ## Domain allowed to transition. ## ## # ifndef(`ipa_domtrans_otpd',` interface(`ipa_domtrans_otpd',` gen_require(` type ipa_otpd_t, ipa_otpd_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, ipa_otpd_exec_t, ipa_otpd_t) ') ') ######################################## ## ## Connect to ipa-otpd over a unix stream socket. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_stream_connect_otpd',` interface(`ipa_stream_connect_otpd',` gen_require(` type ipa_otpd_t; ') allow $1 ipa_otpd_t:unix_stream_socket connectto; ') ') ######################################## ## ## Connect to ipa-ods-exporter over a unix stream socket. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_stream_connect_ods_exporter',` interface(`ipa_stream_connect_ods_exporter',` gen_require(` type ipa_ods_exporter_t; ') allow $1 ipa_ods_exporter_t:unix_stream_socket connectto; ') ') ######################################## ## ## Execute ipa-helper in the ipa_helper domain. ## ## ## ## Domain allowed to transition. ## ## # ifndef(`ipa_domtrans_helper',` interface(`ipa_domtrans_helper',` gen_require(` type ipa_helper_t, ipa_helper_exec_t; ') domtrans_pattern($1, ipa_helper_exec_t, ipa_helper_t) ') ') ######################################## ## ## Execute ipa-helper in the ipa_helper domain. ## ## ## ## Domain allowed to transition. ## ## ## ## ## Role allowed access. ## ## # ifndef(`ipa_run_helper',` interface(`ipa_run_helper',` gen_require(` type ipa_helper_t; attribute_role ipa_helper_roles; ') ipa_domtrans_helper($1) roleattribute $2 ipa_helper_roles; ') ') ######################################## ## ## Allow domain to manage ipa lib files/dirs. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_search_lib',` interface(`ipa_search_lib',` gen_require(` type ipa_var_lib_t; ') search_dirs_pattern($1, ipa_var_lib_t, ipa_var_lib_t) ') ') ######################################## ## ## Allow domain to manage ipa lib files/dirs. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_manage_lib',` interface(`ipa_manage_lib',` gen_require(` type ipa_var_lib_t; ') manage_files_pattern($1, ipa_var_lib_t, ipa_var_lib_t) manage_dirs_pattern($1, ipa_var_lib_t, ipa_var_lib_t) ') ') ######################################## ## ## Allow domain to manage ipa log files/dirs. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_manage_log',` interface(`ipa_manage_log',` gen_require(` type ipa_log_t; ') manage_files_pattern($1, ipa_log_t, ipa_log_t) manage_dirs_pattern($1, ipa_log_t, ipa_log_t) ') ') ######################################## ## ## Allow domain to manage ipa lib files/dirs. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_read_lib',` interface(`ipa_read_lib',` gen_require(` type ipa_var_lib_t; ') read_files_pattern($1, ipa_var_lib_t, ipa_var_lib_t) list_dirs_pattern($1, ipa_var_lib_t, ipa_var_lib_t) ') ') ######################################## ## ## Allow domain to manage ipa run files/dirs. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_manage_pid_files',` interface(`ipa_manage_pid_files',` gen_require(` type ipa_var_run_t; ') manage_files_pattern($1, ipa_var_run_t, ipa_var_run_t) manage_dirs_pattern($1, ipa_var_run_t, ipa_var_run_t) ') ') ######################################## ## ## Create specified objects in generic ## pid directories with the ipa pid file type. ## ## ## ## Domain allowed access. ## ## ## ## ## The name of the object being created. ## ## # ifndef(`ipa_filetrans_pid',` interface(`ipa_filetrans_pid',` gen_require(` type ipa_var_run_t; ') files_pid_filetrans($1, ipa_var_run_t, file, $2) ') ') ######################################## ## ## Allow domain to manage ipa tmp files ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_delete_tmp',` interface(`ipa_delete_tmp',` gen_require(` type ipa_tmp_t; ') files_search_tmp($1) allow $1 ipa_tmp_t:file unlink; ') ') ######################################## ## ## Create log files with a named file ## type transition. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_named_filetrans_log_dir',` interface(`ipa_named_filetrans_log_dir',` gen_require(` type ipa_log_t; ') logging_log_named_filetrans($1, ipa_log_t, dir, "ipa") ') ') ####################################### ## ## Allow domain to create /tmp/ca.p12 ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_filetrans_named_content',` interface(`ipa_filetrans_named_content',` gen_require(` type ipa_tmp_t; ') files_tmp_filetrans($1, ipa_tmp_t, file, "ca.p12") ') ') ######################################## ## ## Create file ipasession.key in cert_t dir ## with ipa_cert_t type ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_cert_filetrans_named_content',` interface(`ipa_cert_filetrans_named_content',` gen_require(` type ipa_cert_t; type cert_t; ') filetrans_pattern($1, cert_t, ipa_cert_t, file ,"ipasession.key") manage_files_pattern($1, ipa_cert_t, ipa_cert_t) ') ') ######################################## ## ## Allow domain to read ipa tmp files/dirs. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_read_tmp',` interface(`ipa_read_tmp',` gen_require(` type ipa_tmp_t; ') read_files_pattern($1, ipa_tmp_t, ipa_tmp_t) ') ') ######################################## ## ## Execute ipa_custodia_exec_t in the ipa_custodia domain. ## ## ## ## Domain allowed to transition. ## ## # ifndef(`ipa_custodia_domtrans',` interface(`ipa_custodia_domtrans',` gen_require(` type ipa_custodia_t, ipa_custodia_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, ipa_custodia_exec_t, ipa_custodia_t) ') ') ###################################### ## ## Execute ipa_custodia in the caller domain. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_custodia_exec',` interface(`ipa_custodia_exec',` gen_require(` type ipa_custodia_exec_t; ') corecmd_search_bin($1) can_exec($1, ipa_custodia_exec_t) ') ') ##################################### ## ## Connect to ipa_custodia with a unix ## domain stream socket. ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_custodia_stream_connect',` interface(`ipa_custodia_stream_connect',` gen_require(` type ipa_custodia_t; ') allow $1 ipa_custodia_t:unix_stream_socket { connectto }; ') ') ######################################## ## ## Allow ipa_helper noatsecure ## ## ## ## Domain allowed access. ## ## # ifndef(`ipa_helper_noatsecure',` interface(`ipa_helper_noatsecure',` gen_require(` type ipa_helper_t; ') allow $1 ipa_helper_t:process { noatsecure }; ') ')