summaryrefslogtreecommitdiff
path: root/policy/modules/services/abrt.te
blob: 559ce2d22aa42592b37fbc8204f75652c66a7c27 (plain)
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

policy_module(abrt, 1.0.0)

########################################
#
# Declarations
#

type abrt_t;
type abrt_exec_t;
init_daemon_domain(abrt_t, abrt_exec_t)

type abrt_initrc_exec_t;
init_script_file(abrt_initrc_exec_t)

# etc files
type abrt_etc_t;
files_config_file(abrt_etc_t)

# log files
type abrt_var_log_t;
logging_log_file(abrt_var_log_t)

# tmp files
type abrt_tmp_t;
files_tmp_file(abrt_tmp_t)

# var/cache files
type abrt_var_cache_t;
files_type(abrt_var_cache_t)

# pid files
type abrt_var_run_t;
files_pid_file(abrt_var_run_t)

########################################
#
# abrt local policy
#

allow abrt_t self:capability { setuid setgid sys_nice dac_override };
allow abrt_t self:process { signal signull setsched getsched };

allow abrt_t self:fifo_file rw_fifo_file_perms;
allow abrt_t self:tcp_socket create_stream_socket_perms;
allow abrt_t self:udp_socket create_socket_perms;
allow abrt_t self:unix_dgram_socket create_socket_perms;
allow abrt_t self:netlink_route_socket r_netlink_socket_perms;

# abrt etc files
rw_files_pattern(abrt_t, abrt_etc_t, abrt_etc_t)

# log file
manage_files_pattern(abrt_t, abrt_var_log_t, abrt_var_log_t)
logging_log_filetrans(abrt_t, abrt_var_log_t, file)

# abrt tmp files 
manage_dirs_pattern(abrt_t, abrt_tmp_t, abrt_tmp_t)
manage_files_pattern(abrt_t, abrt_tmp_t, abrt_tmp_t)
files_tmp_filetrans(abrt_t, abrt_tmp_t, { file dir })

# abrt var/cache files
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)
files_var_filetrans(abrt_t, abrt_var_cache_t, { file dir })

# abrt pid files
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)
files_pid_filetrans(abrt_t, abrt_var_run_t, { file dir })

kernel_read_ring_buffer(abrt_t)
kernel_read_system_state(abrt_t)
kernel_rw_kernel_sysctl(abrt_t)

corecmd_exec_bin(abrt_t)
corecmd_exec_shell(abrt_t)

corenet_tcp_connect_http_port(abrt_t)

dev_read_urand(abrt_t)

files_getattr_all_files(abrt_t)
files_read_etc_files(abrt_t)
files_read_usr_files(abrt_t)

fs_list_inotifyfs(abrt_t)
fs_getattr_all_fs(abrt_t)
fs_getattr_all_dirs(abrt_t)

sysnet_read_config(abrt_t)

logging_read_generic_logs(abrt_t)
logging_send_syslog_msg(abrt_t)

miscfiles_read_certs(abrt_t)
miscfiles_read_localization(abrt_t)

# to run bugzilla plugin
# read ~/.abrt/Bugzilla.conf
userdom_read_user_home_content_files(abrt_t)

optional_policy(`
	dbus_connect_system_bus(abrt_t)
	dbus_system_bus_client(abrt_t)
')

# to install debuginfo packages 
optional_policy(`
	rpm_manage_db(abrt_t)
	rpm_domtrans(abrt_t)
')

# to run mailx plugin
optional_policy(`
	sendmail_domtrans(abrt_t)
')