forked from fedora-selinux/selinux-policy-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asterisk.te
190 lines (145 loc) · 5.72 KB
/
asterisk.te
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
policy_module(asterisk, 1.12.1)
########################################
#
# Declarations
#
type asterisk_t;
type asterisk_exec_t;
init_daemon_domain(asterisk_t, asterisk_exec_t)
type asterisk_initrc_exec_t;
init_script_file(asterisk_initrc_exec_t)
type asterisk_etc_t;
files_config_file(asterisk_etc_t)
type asterisk_log_t;
logging_log_file(asterisk_log_t)
type asterisk_spool_t;
files_spool_file(asterisk_spool_t)
type asterisk_tmp_t;
files_tmp_file(asterisk_tmp_t)
type asterisk_tmpfs_t;
files_tmpfs_file(asterisk_tmpfs_t)
type asterisk_var_lib_t;
files_type(asterisk_var_lib_t)
type asterisk_var_run_t;
files_pid_file(asterisk_var_run_t)
init_daemon_run_dir(asterisk_var_run_t, "asterisk")
########################################
#
# Local policy
#
allow asterisk_t self:capability { dac_read_search chown setgid setuid sys_nice net_admin };
dontaudit asterisk_t self:capability { sys_module sys_tty_config };
allow asterisk_t self:process { getsched setsched signal_perms getcap setcap };
allow asterisk_t self:fifo_file rw_fifo_file_perms;
allow asterisk_t self:sem create_sem_perms;
allow asterisk_t self:shm create_shm_perms;
allow asterisk_t self:unix_stream_socket { accept connectto listen };
allow asterisk_t self:tcp_socket { accept listen };
allow asterisk_t asterisk_etc_t:dir list_dir_perms;
read_files_pattern(asterisk_t, asterisk_etc_t, asterisk_etc_t)
read_lnk_files_pattern(asterisk_t, asterisk_etc_t, asterisk_etc_t)
manage_dirs_pattern(asterisk_t, asterisk_log_t, asterisk_log_t)
manage_files_pattern(asterisk_t, asterisk_log_t, asterisk_log_t)
logging_log_filetrans(asterisk_t, asterisk_log_t, { file dir })
manage_dirs_pattern(asterisk_t, asterisk_spool_t, asterisk_spool_t)
manage_files_pattern(asterisk_t, asterisk_spool_t, asterisk_spool_t)
manage_lnk_files_pattern(asterisk_t, asterisk_spool_t, asterisk_spool_t)
files_spool_filetrans(asterisk_t, asterisk_spool_t, { dir file })
manage_dirs_pattern(asterisk_t, asterisk_tmp_t, asterisk_tmp_t)
manage_files_pattern(asterisk_t, asterisk_tmp_t, asterisk_tmp_t)
files_tmp_filetrans(asterisk_t, asterisk_tmp_t, { file dir })
manage_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
manage_lnk_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
manage_fifo_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
manage_sock_files_pattern(asterisk_t, asterisk_tmpfs_t, asterisk_tmpfs_t)
fs_tmpfs_filetrans(asterisk_t, asterisk_tmpfs_t, { dir file lnk_file sock_file fifo_file })
manage_files_pattern(asterisk_t, asterisk_var_lib_t, asterisk_var_lib_t)
manage_dirs_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
manage_files_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
manage_fifo_files_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
manage_sock_files_pattern(asterisk_t, asterisk_var_run_t, asterisk_var_run_t)
files_pid_filetrans(asterisk_t, asterisk_var_run_t, { dir file sock_file fifo_file })
can_exec(asterisk_t, asterisk_exec_t)
kernel_read_kernel_sysctls(asterisk_t)
kernel_read_network_state(asterisk_t)
kernel_read_system_state(asterisk_t)
kernel_request_load_module(asterisk_t)
corecmd_exec_bin(asterisk_t)
corecmd_exec_shell(asterisk_t)
corenet_all_recvfrom_netlabel(asterisk_t)
corenet_tcp_sendrecv_generic_if(asterisk_t)
corenet_udp_sendrecv_generic_if(asterisk_t)
corenet_tcp_sendrecv_generic_node(asterisk_t)
corenet_udp_sendrecv_generic_node(asterisk_t)
corenet_tcp_sendrecv_all_ports(asterisk_t)
corenet_udp_sendrecv_all_ports(asterisk_t)
corenet_tcp_bind_generic_node(asterisk_t)
corenet_udp_bind_generic_node(asterisk_t)
corenet_sendrecv_asterisk_server_packets(asterisk_t)
corenet_tcp_bind_asterisk_port(asterisk_t)
corenet_udp_bind_asterisk_port(asterisk_t)
corenet_sendrecv_embrace_dp_c_client_packets(asterisk_t)
corenet_tcp_connect_embrace_dp_c_port(asterisk_t)
corenet_sendrecv_sip_server_packets(asterisk_t)
corenet_tcp_bind_sip_port(asterisk_t)
corenet_udp_bind_sip_port(asterisk_t)
corenet_sendrecv_generic_server_packets(asterisk_t)
corenet_tcp_bind_generic_port(asterisk_t)
corenet_udp_bind_generic_port(asterisk_t)
corenet_dontaudit_udp_bind_all_ports(asterisk_t)
corenet_sendrecv_jabber_client_client_packets(asterisk_t)
corenet_tcp_connect_jabber_client_port(asterisk_t)
corenet_sendrecv_pdps_client_packets(asterisk_t)
corenet_tcp_connect_pdps_port(asterisk_t)
corenet_sendrecv_pktcable_cops_client_packets(asterisk_t)
corenet_tcp_connect_pktcable_cops_port(asterisk_t)
corenet_sendrecv_sip_client_packets(asterisk_t)
corenet_tcp_connect_sip_port(asterisk_t)
corenet_tcp_connect_http_port(asterisk_t)
dev_rw_generic_usb_dev(asterisk_t)
dev_read_sysfs(asterisk_t)
dev_read_sound(asterisk_t)
dev_write_sound(asterisk_t)
dev_read_rand(asterisk_t)
dev_read_urand(asterisk_t)
domain_use_interactive_fds(asterisk_t)
files_search_spool(asterisk_t)
files_dontaudit_search_home(asterisk_t)
fs_getattr_all_fs(asterisk_t)
fs_list_inotifyfs(asterisk_t)
fs_read_anon_inodefs_files(asterisk_t)
fs_search_auto_mountpoints(asterisk_t)
auth_use_nsswitch(asterisk_t)
logging_search_logs(asterisk_t)
logging_send_syslog_msg(asterisk_t)
userdom_dontaudit_use_unpriv_user_fds(asterisk_t)
userdom_dontaudit_search_user_home_dirs(asterisk_t)
optional_policy(`
alsa_read_rw_config(asterisk_t)
')
optional_policy(`
mysql_stream_connect(asterisk_t)
mysql_tcp_connect(asterisk_t)
')
optional_policy(`
mta_send_mail(asterisk_t)
mta_system_content(asterisk_tmp_t)
')
optional_policy(`
postfix_domtrans_postdrop(asterisk_t)
')
optional_policy(`
postgresql_stream_connect(asterisk_t)
postgresql_tcp_connect(asterisk_t)
')
optional_policy(`
seutil_sigchld_newrole(asterisk_t)
')
optional_policy(`
snmp_read_snmp_var_lib_files(asterisk_t)
snmp_stream_connect(asterisk_t)
snmp_tcp_connect(asterisk_t)
')
optional_policy(`
udev_read_db(asterisk_t)
')