aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'policy/modules/contrib/asterisk.if')
-rw-r--r--policy/modules/contrib/asterisk.if26
1 files changed, 22 insertions, 4 deletions
diff --git a/policy/modules/contrib/asterisk.if b/policy/modules/contrib/asterisk.if
index 7268a04..2e3f5a4 100644
--- a/policy/modules/contrib/asterisk.if
+++ b/policy/modules/contrib/asterisk.if
@@ -19,6 +19,25 @@ interface(`asterisk_domtrans',`
domtrans_pattern($1, asterisk_exec_t, asterisk_t)
')
+######################################
+## <summary>
+## Execute asterisk in the caller domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`asterisk_exec',`
+ gen_require(`
+ type asterisk_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ can_exec($1, asterisk_exec_t)
+')
+
#####################################
## <summary>
## Connect to asterisk over a unix domain.
@@ -108,10 +127,9 @@ interface(`asterisk_admin',`
allow $1 asterisk_t:process { ptrace signal_perms };
ps_process_pattern($1, asterisk_t)
- init_labeled_script_domtrans($1, asterisk_initrc_exec_t)
- domain_system_change_exemption($1)
- role_transition $2 asterisk_initrc_exec_t system_r;
- allow $2 system_r;
+ init_startstop_service($1, $2, asterisk_t, asterisk_initrc_exec_t)
+
+ asterisk_exec($1)
files_list_tmp($1)
admin_pattern($1, asterisk_tmp_t)