diff --git a/asterisk.if b/asterisk.if index 8b8143e..bd6273f 100644 --- a/asterisk.if +++ b/asterisk.if @@ -90,3 +90,46 @@ interface(`asterisk_admin',` files_list_pids($1) admin_pattern($1, asterisk_var_run_t) ') + +####################################### +## +## Allow changing the attributes of the asterisk log files and directories +## +## +## +## Domain allowed to change the attributes of the asterisk log files and +## directories +## +## +# +interface(`asterisk_setattr_logs',` + gen_require(` + type asterisk_log_t; + ') + + setattr_files_pattern($1, asterisk_log_t, asterisk_log_t) + setattr_dirs_pattern($1, asterisk_log_t, asterisk_log_t) + + logging_search_logs($1) +') + +####################################### +## +## Allow changing the attributes of the asterisk PID files +## +## +## +## Domain allowed to change the attributes of the asterisk PID files +## +## +# +interface(`asterisk_setattr_pid_files',` + gen_require(` + type asterisk_var_run_t; + ') + + setattr_files_pattern($1, asterisk_var_run_t, asterisk_var_run_t) + setattr_dirs_pattern($1, asterisk_var_run_t, asterisk_var_run_t) + + files_search_pids($1) +')