This repository has been archived by the owner on Jul 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
abrt.te
441 lines (332 loc) · 12.1 KB
/
abrt.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
policy_module(abrt, 1.8.0)
########################################
#
# Declarations
#
## <desc>
## <p>
## Determine whether ABRT can modify
## public files used for public file
## transfer services.
## </p>
## </desc>
gen_tunable(abrt_anon_write, false)
## <desc>
## <p>
## Determine whether abrt-handle-upload
## can modify public files used for public file
## transfer services in /var/spool/abrt-upload/.
## </p>
## </desc>
gen_tunable(abrt_upload_watch_anon_write, true)
## <desc>
## <p>
## Determine whether ABRT can run in
## the abrt_handle_event_t domain to
## handle ABRT event scripts.
## </p>
## </desc>
gen_tunable(abrt_handle_event, false)
attribute abrt_domain;
attribute_role abrt_helper_roles;
roleattribute system_r abrt_helper_roles;
type abrt_t, abrt_domain;
type abrt_exec_t;
init_daemon_domain(abrt_t, abrt_exec_t)
type abrt_initrc_exec_t;
init_script_file(abrt_initrc_exec_t)
type abrt_etc_t;
files_config_file(abrt_etc_t)
type abrt_var_log_t;
logging_log_file(abrt_var_log_t)
type abrt_tmp_t;
files_tmp_file(abrt_tmp_t)
type abrt_var_cache_t;
files_type(abrt_var_cache_t)
type abrt_var_run_t;
files_pid_file(abrt_var_run_t)
type abrt_dump_oops_t, abrt_domain;
type abrt_dump_oops_exec_t;
init_system_domain(abrt_dump_oops_t, abrt_dump_oops_exec_t)
type abrt_handle_event_t, abrt_domain;
type abrt_handle_event_exec_t;
domain_type(abrt_handle_event_t)
domain_entry_file(abrt_handle_event_t, abrt_handle_event_exec_t)
role system_r types abrt_handle_event_t;
type abrt_helper_t, abrt_domain;
type abrt_helper_exec_t;
application_domain(abrt_helper_t, abrt_helper_exec_t)
role abrt_helper_roles types abrt_helper_t;
type abrt_retrace_coredump_t, abrt_domain;
type abrt_retrace_coredump_exec_t;
domain_type(abrt_retrace_coredump_t)
domain_entry_file(abrt_retrace_coredump_t, abrt_retrace_coredump_exec_t)
role system_r types abrt_retrace_coredump_t;
type abrt_retrace_worker_t, abrt_domain;
type abrt_retrace_worker_exec_t;
domain_type(abrt_retrace_worker_t)
domain_entry_file(abrt_retrace_worker_t, abrt_retrace_worker_exec_t)
role system_r types abrt_retrace_worker_t;
type abrt_retrace_cache_t;
files_type(abrt_retrace_cache_t)
type abrt_retrace_spool_t;
files_type(abrt_retrace_spool_t)
type abrt_watch_log_t, abrt_domain;
type abrt_watch_log_exec_t;
init_daemon_domain(abrt_watch_log_t, abrt_watch_log_exec_t)
type abrt_upload_watch_t, abrt_domain;
type abrt_upload_watch_exec_t;
init_daemon_domain(abrt_upload_watch_t, abrt_upload_watch_exec_t)
ifdef(`enable_mcs',`
init_ranged_daemon_domain(abrt_t, abrt_exec_t, s0 - mcs_systemhigh)
')
########################################
#
# Local policy
#
allow abrt_t self:capability { chown dac_override fowner fsetid kill setgid setuid sys_nice };
dontaudit abrt_t self:capability sys_rawio;
allow abrt_t self:process { setpgid sigkill signal signull setsched getsched };
allow abrt_t self:fifo_file rw_fifo_file_perms;
allow abrt_t self:tcp_socket { accept listen };
allow abrt_t abrt_etc_t:dir list_dir_perms;
rw_files_pattern(abrt_t, abrt_etc_t, abrt_etc_t)
manage_files_pattern(abrt_t, abrt_var_log_t, abrt_var_log_t)
logging_log_filetrans(abrt_t, abrt_var_log_t, file)
manage_dirs_pattern(abrt_t, abrt_tmp_t, abrt_tmp_t)
manage_files_pattern(abrt_t, abrt_tmp_t, abrt_tmp_t)
manage_lnk_files_pattern(abrt_t, abrt_tmp_t, abrt_tmp_t)
files_tmp_filetrans(abrt_t, abrt_tmp_t, { file dir })
manage_files_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
manage_dirs_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
manage_lnk_files_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
files_var_filetrans(abrt_t, abrt_var_cache_t, { file dir })
files_spool_filetrans(abrt_t, abrt_var_cache_t, dir)
manage_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
manage_dirs_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
manage_sock_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
manage_lnk_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
files_pid_filetrans(abrt_t, abrt_var_run_t, { file dir sock_file })
can_exec(abrt_t, abrt_tmp_t)
kernel_read_ring_buffer(abrt_t)
kernel_read_system_state(abrt_t)
kernel_request_load_module(abrt_t)
kernel_rw_kernel_sysctl(abrt_t)
corecmd_exec_bin(abrt_t)
corecmd_exec_shell(abrt_t)
corecmd_read_all_executables(abrt_t)
corenet_all_recvfrom_netlabel(abrt_t)
corenet_all_recvfrom_unlabeled(abrt_t)
corenet_tcp_sendrecv_generic_if(abrt_t)
corenet_tcp_sendrecv_generic_node(abrt_t)
corenet_tcp_sendrecv_all_ports(abrt_t)
corenet_tcp_bind_generic_node(abrt_t)
corenet_sendrecv_all_client_packets(abrt_t)
corenet_tcp_connect_http_port(abrt_t)
corenet_tcp_connect_ftp_port(abrt_t)
corenet_tcp_connect_all_ports(abrt_t)
dev_getattr_all_chr_files(abrt_t)
dev_getattr_all_blk_files(abrt_t)
dev_read_rand(abrt_t)
dev_read_urand(abrt_t)
dev_rw_sysfs(abrt_t)
dev_dontaudit_read_raw_memory(abrt_t)
domain_getattr_all_domains(abrt_t)
domain_read_all_domains_state(abrt_t)
domain_signull_all_domains(abrt_t)
files_getattr_all_files(abrt_t)
files_read_config_files(abrt_t)
files_read_etc_runtime_files(abrt_t)
files_read_var_symlinks(abrt_t)
files_read_usr_files(abrt_t)
files_read_kernel_modules(abrt_t)
files_dontaudit_read_default_files(abrt_t)
files_dontaudit_read_all_symlinks(abrt_t)
files_dontaudit_getattr_all_sockets(abrt_t)
files_list_mnt(abrt_t)
fs_getattr_all_fs(abrt_t)
fs_getattr_all_dirs(abrt_t)
fs_list_inotifyfs(abrt_t)
fs_read_fusefs_files(abrt_t)
fs_read_noxattr_fs_files(abrt_t)
fs_read_nfs_files(abrt_t)
fs_read_nfs_symlinks(abrt_t)
fs_search_all(abrt_t)
auth_use_nsswitch(abrt_t)
logging_read_generic_logs(abrt_t)
miscfiles_read_public_files(abrt_t)
userdom_dontaudit_read_user_home_content_files(abrt_t)
tunable_policy(`abrt_anon_write',`
miscfiles_manage_public_files(abrt_t)
')
optional_policy(`
apache_list_modules(abrt_t)
apache_read_module_files(abrt_t)
')
optional_policy(`
dbus_system_domain(abrt_t, abrt_exec_t)
optional_policy(`
policykit_dbus_chat(abrt_t)
')
')
optional_policy(`
dmesg_domtrans(abrt_t)
')
optional_policy(`
policykit_domtrans_auth(abrt_t)
policykit_read_lib(abrt_t)
policykit_read_reload(abrt_t)
')
optional_policy(`
prelink_exec(abrt_t)
libs_exec_ld_so(abrt_t)
corecmd_exec_all_executables(abrt_t)
')
optional_policy(`
rpm_exec(abrt_t)
rpm_dontaudit_manage_db(abrt_t)
rpm_manage_cache(abrt_t)
rpm_manage_log(abrt_t)
rpm_manage_pid_files(abrt_t)
rpm_read_db(abrt_t)
rpm_signull(abrt_t)
')
optional_policy(`
sendmail_domtrans(abrt_t)
')
optional_policy(`
sosreport_domtrans(abrt_t)
sosreport_read_tmp_files(abrt_t)
sosreport_delete_tmp_files(abrt_t)
')
#######################################
#
# Handle-event local policy
#
allow abrt_handle_event_t self:fifo_file rw_fifo_file_perms;
tunable_policy(`abrt_handle_event',`
domtrans_pattern(abrt_t, abrt_handle_event_exec_t, abrt_handle_event_t)
',`
can_exec(abrt_t, abrt_handle_event_exec_t)
')
########################################
#
# Helper local policy
#
allow abrt_helper_t self:capability { chown setgid sys_nice };
allow abrt_helper_t self:process signal;
read_files_pattern(abrt_helper_t, abrt_etc_t, abrt_etc_t)
files_search_spool(abrt_helper_t)
manage_dirs_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
manage_files_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
manage_lnk_files_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
files_var_filetrans(abrt_helper_t, abrt_var_cache_t, { file dir })
read_files_pattern(abrt_helper_t, abrt_var_run_t, abrt_var_run_t)
read_lnk_files_pattern(abrt_helper_t, abrt_var_run_t, abrt_var_run_t)
corecmd_read_all_executables(abrt_helper_t)
domain_read_all_domains_state(abrt_helper_t)
fs_list_inotifyfs(abrt_helper_t)
fs_getattr_all_fs(abrt_helper_t)
auth_use_nsswitch(abrt_helper_t)
term_dontaudit_use_all_ttys(abrt_helper_t)
term_dontaudit_use_all_ptys(abrt_helper_t)
ifdef(`hide_broken_symptoms',`
userdom_dontaudit_read_user_home_content_files(abrt_helper_t)
userdom_dontaudit_read_user_tmp_files(abrt_helper_t)
dev_dontaudit_read_all_blk_files(abrt_helper_t)
dev_dontaudit_read_all_chr_files(abrt_helper_t)
dev_dontaudit_write_all_chr_files(abrt_helper_t)
dev_dontaudit_write_all_blk_files(abrt_helper_t)
fs_dontaudit_rw_anon_inodefs_files(abrt_helper_t)
')
#######################################
#
# Retrace coredump policy
#
allow abrt_retrace_coredump_t self:fifo_file rw_fifo_file_perms;
list_dirs_pattern(abrt_retrace_coredump_t, abrt_retrace_cache_t, abrt_retrace_cache_t)
read_files_pattern(abrt_retrace_coredump_t, abrt_retrace_cache_t, abrt_retrace_cache_t)
read_lnk_files_pattern(abrt_retrace_coredump_t, abrt_retrace_cache_t, abrt_retrace_cache_t)
list_dirs_pattern(abrt_retrace_coredump_t, abrt_retrace_spool_t, abrt_retrace_spool_t)
read_files_pattern(abrt_retrace_coredump_t, abrt_retrace_spool_t, abrt_retrace_spool_t)
read_lnk_files_pattern(abrt_retrace_coredump_t, abrt_retrace_spool_t, abrt_retrace_spool_t)
corecmd_exec_bin(abrt_retrace_coredump_t)
corecmd_exec_shell(abrt_retrace_coredump_t)
dev_read_urand(abrt_retrace_coredump_t)
files_read_usr_files(abrt_retrace_coredump_t)
sysnet_dns_name_resolve(abrt_retrace_coredump_t)
optional_policy(`
rpm_exec(abrt_retrace_coredump_t)
rpm_dontaudit_manage_db(abrt_retrace_coredump_t)
rpm_manage_cache(abrt_retrace_coredump_t)
rpm_manage_log(abrt_retrace_coredump_t)
rpm_manage_pid_files(abrt_retrace_coredump_t)
rpm_read_db(abrt_retrace_coredump_t)
rpm_signull(abrt_retrace_coredump_t)
')
#######################################
#
# Retrace worker policy
#
allow abrt_retrace_worker_t self:capability setuid;
allow abrt_retrace_worker_t self:fifo_file rw_fifo_file_perms;
domtrans_pattern(abrt_retrace_worker_t, abrt_retrace_coredump_exec_t, abrt_retrace_coredump_t)
allow abrt_retrace_worker_t abrt_retrace_coredump_exec_t:file ioctl;
manage_dirs_pattern(abrt_retrace_worker_t, abrt_retrace_spool_t, abrt_retrace_spool_t)
manage_files_pattern(abrt_retrace_worker_t, abrt_retrace_spool_t, abrt_retrace_spool_t)
manage_lnk_files_pattern(abrt_retrace_worker_t, abrt_retrace_spool_t, abrt_retrace_spool_t)
allow abrt_retrace_worker_t abrt_etc_t:file read_file_perms;
can_exec(abrt_retrace_worker_t, abrt_retrace_worker_exec_t)
corecmd_exec_bin(abrt_retrace_worker_t)
corecmd_exec_shell(abrt_retrace_worker_t)
dev_read_urand(abrt_retrace_worker_t)
files_read_usr_files(abrt_retrace_worker_t)
sysnet_dns_name_resolve(abrt_retrace_worker_t)
########################################
#
# Dump oops local policy
#
allow abrt_dump_oops_t self:capability dac_override;
allow abrt_dump_oops_t self:fifo_file rw_fifo_file_perms;
allow abrt_dump_oops_t self:unix_stream_socket { accept listen };
files_search_spool(abrt_dump_oops_t)
manage_dirs_pattern(abrt_dump_oops_t, abrt_var_cache_t, abrt_var_cache_t)
manage_files_pattern(abrt_dump_oops_t, abrt_var_cache_t, abrt_var_cache_t)
manage_lnk_files_pattern(abrt_dump_oops_t, abrt_var_cache_t, abrt_var_cache_t)
files_var_filetrans(abrt_dump_oops_t, abrt_var_cache_t, { file dir })
read_files_pattern(abrt_dump_oops_t, abrt_var_run_t, abrt_var_run_t)
read_lnk_files_pattern(abrt_dump_oops_t, abrt_var_run_t, abrt_var_run_t)
read_files_pattern(abrt_dump_oops_t, abrt_etc_t, abrt_etc_t)
kernel_read_kernel_sysctls(abrt_dump_oops_t)
kernel_read_ring_buffer(abrt_dump_oops_t)
domain_use_interactive_fds(abrt_dump_oops_t)
fs_list_inotifyfs(abrt_dump_oops_t)
logging_read_generic_logs(abrt_dump_oops_t)
logging_mmap_generic_logs(abrt_dump_oops_t)
logging_mmap_journal(abrt_dump_oops_t)
#######################################
#
# Watch log local policy
#
allow abrt_watch_log_t self:fifo_file rw_fifo_file_perms;
allow abrt_watch_log_t self:unix_stream_socket { accept listen };
read_files_pattern(abrt_watch_log_t, abrt_etc_t, abrt_etc_t)
domtrans_pattern(abrt_watch_log_t, abrt_dump_oops_exec_t, abrt_dump_oops_t)
corecmd_exec_bin(abrt_watch_log_t)
logging_read_all_logs(abrt_watch_log_t)
#######################################
#
# Upload watch local policy
#
corecmd_exec_bin(abrt_upload_watch_t)
tunable_policy(`abrt_upload_watch_anon_write',`
miscfiles_manage_public_files(abrt_upload_watch_t)
')
#######################################
#
# Global local policy
#
kernel_read_system_state(abrt_domain)
files_read_etc_files(abrt_domain)
logging_send_syslog_msg(abrt_domain)
miscfiles_read_localization(abrt_domain)