forked from fedora-selinux/selinux-policy-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
amanda.te
228 lines (171 loc) · 7.15 KB
/
amanda.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
policy_module(amanda, 1.15.0)
#######################################
#
# Declarations
#
attribute_role amanda_recover_roles;
roleattribute system_r amanda_recover_roles;
type amanda_t;
type amanda_exec_t;
type amanda_inetd_exec_t;
application_executable_file(amanda_exec_t)
init_daemon_domain(amanda_t, amanda_inetd_exec_t)
role system_r types amanda_t;
type amanda_unit_file_t;
systemd_unit_file(amanda_unit_file_t)
type amanda_log_t;
logging_log_file(amanda_log_t)
type amanda_config_t;
files_type(amanda_config_t)
type amanda_usr_lib_t;
files_type(amanda_usr_lib_t)
type amanda_var_lib_t;
files_type(amanda_var_lib_t)
type amanda_gnutarlists_t;
files_type(amanda_gnutarlists_t)
type amanda_tmp_t;
files_tmp_file(amanda_tmp_t)
type amanda_tmpfs_t;
files_tmpfs_file(amanda_tmpfs_t)
type amanda_amandates_t;
files_type(amanda_amandates_t)
type amanda_dumpdates_t;
files_type(amanda_dumpdates_t)
type amanda_data_t;
files_type(amanda_data_t)
type amanda_recover_t;
type amanda_recover_exec_t;
application_domain(amanda_recover_t, amanda_recover_exec_t)
role amanda_recover_roles types amanda_recover_t;
type amanda_recover_dir_t;
files_type(amanda_recover_dir_t)
optional_policy(`
prelink_object_file(amanda_usr_lib_t)
')
########################################
#
# Local policy
#
allow amanda_t self:capability { chown dac_read_search dac_override setuid setgid kill sys_admin };
allow amanda_t self:process { getsched setsched setpgid signal };
allow amanda_t self:fifo_file rw_fifo_file_perms;
allow amanda_t self:unix_stream_socket { accept listen };
allow amanda_t self:tcp_socket { accept listen };
allow amanda_t amanda_amandates_t:file rw_file_perms;
allow amanda_t amanda_config_t:file read_file_perms;
manage_dirs_pattern(amanda_t, amanda_data_t, amanda_data_t)
manage_files_pattern(amanda_t, amanda_data_t, amanda_data_t)
manage_lnk_files_pattern(amanda_t, amanda_data_t, amanda_data_t)
filetrans_pattern(amanda_t, amanda_config_t, amanda_data_t, { file dir })
allow amanda_t amanda_dumpdates_t:file rw_file_perms;
allow amanda_t amanda_gnutarlists_t:dir rw_dir_perms;
allow amanda_t amanda_gnutarlists_t:file manage_file_perms;
allow amanda_t amanda_gnutarlists_t:lnk_file manage_lnk_file_perms;
manage_dirs_pattern(amanda_t, amanda_var_lib_t, amanda_var_lib_t)
manage_files_pattern(amanda_t, amanda_var_lib_t, amanda_var_lib_t)
files_var_lib_filetrans(amanda_t, amanda_var_lib_t, dir)
manage_files_pattern(amanda_t, amanda_log_t, amanda_log_t)
manage_dirs_pattern(amanda_t, amanda_log_t, amanda_log_t)
logging_log_filetrans(amanda_t, amanda_log_t, dir)
manage_files_pattern(amanda_t, amanda_tmp_t, amanda_tmp_t)
manage_dirs_pattern(amanda_t, amanda_tmp_t, amanda_tmp_t)
files_tmp_filetrans(amanda_t, amanda_tmp_t, { file dir })
manage_files_pattern(amanda_t, amanda_tmpfs_t, amanda_tmpfs_t)
manage_dirs_pattern(amanda_t, amanda_tmpfs_t, amanda_tmpfs_t)
fs_tmpfs_filetrans(amanda_t, amanda_tmpfs_t, { dir file })
allow amanda_t amanda_tmpfs_t:file map;
can_exec(amanda_t, { amanda_exec_t amanda_inetd_exec_t })
kernel_read_kernel_sysctls(amanda_t)
kernel_read_system_state(amanda_t)
kernel_read_network_state(amanda_t)
kernel_dontaudit_getattr_unlabeled_files(amanda_t)
kernel_dontaudit_read_proc_symlinks(amanda_t)
corecmd_exec_shell(amanda_t)
corecmd_exec_bin(amanda_t)
corenet_all_recvfrom_netlabel(amanda_t)
corenet_tcp_sendrecv_generic_if(amanda_t)
corenet_tcp_sendrecv_generic_node(amanda_t)
corenet_tcp_sendrecv_all_ports(amanda_t)
corenet_tcp_bind_generic_node(amanda_t)
corenet_tcp_bind_amanda_port(amanda_t)
corenet_udp_bind_amanda_port(amanda_t)
corenet_sendrecv_all_server_packets(amanda_t)
corenet_tcp_bind_all_rpc_ports(amanda_t)
corenet_tcp_bind_generic_port(amanda_t)
corenet_dontaudit_tcp_bind_all_ports(amanda_t)
dev_getattr_all_blk_files(amanda_t)
dev_getattr_all_chr_files(amanda_t)
dev_read_urand(amanda_t)
files_read_etc_runtime_files(amanda_t)
files_list_all(amanda_t)
files_read_all_files(amanda_t)
files_read_all_symlinks(amanda_t)
files_read_all_blk_files(amanda_t)
files_read_all_chr_files(amanda_t)
files_getattr_all_pipes(amanda_t)
files_getattr_all_sockets(amanda_t)
fs_getattr_xattr_fs(amanda_t)
fs_list_all(amanda_t)
fs_getattr_tmpfs(amanda_t)
storage_raw_read_fixed_disk(amanda_t)
storage_read_tape(amanda_t)
storage_write_tape(amanda_t)
storage_write_scsi_generic(amanda_t)
auth_use_nsswitch(amanda_t)
auth_read_shadow(amanda_t)
logging_send_syslog_msg(amanda_t)
########################################
#
# Recover local policy
#
allow amanda_recover_t self:capability { fowner fsetid kill setgid setuid chown dac_read_search };
allow amanda_recover_t self:process { sigkill sigstop signal };
allow amanda_recover_t self:fifo_file rw_fifo_file_perms;
allow amanda_recover_t self:unix_stream_socket create_socket_perms;
allow amanda_recover_t self:tcp_socket { accept listen };
manage_files_pattern(amanda_recover_t, amanda_log_t, amanda_log_t)
manage_lnk_files_pattern(amanda_recover_t, amanda_log_t, amanda_log_t)
manage_dirs_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
manage_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
manage_lnk_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
manage_fifo_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
manage_sock_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
userdom_user_home_dir_filetrans(amanda_recover_t, amanda_recover_dir_t, { dir file lnk_file sock_file fifo_file })
manage_dirs_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
manage_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
manage_lnk_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
manage_fifo_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
manage_sock_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
files_tmp_filetrans(amanda_recover_t, amanda_tmp_t, { dir file lnk_file sock_file fifo_file })
kernel_read_kernel_sysctls(amanda_recover_t)
kernel_read_system_state(amanda_recover_t)
corecmd_exec_shell(amanda_recover_t)
corecmd_exec_bin(amanda_recover_t)
corenet_all_recvfrom_netlabel(amanda_recover_t)
corenet_tcp_sendrecv_generic_if(amanda_recover_t)
corenet_udp_sendrecv_generic_if(amanda_recover_t)
corenet_tcp_sendrecv_generic_node(amanda_recover_t)
corenet_udp_sendrecv_generic_node(amanda_recover_t)
corenet_tcp_sendrecv_all_ports(amanda_recover_t)
corenet_udp_sendrecv_all_ports(amanda_recover_t)
corenet_tcp_bind_generic_node(amanda_recover_t)
corenet_udp_bind_generic_node(amanda_recover_t)
corenet_sendrecv_generic_server_packets(amanda_recover_t)
corenet_tcp_bind_reserved_port(amanda_recover_t)
corenet_sendrecv_amanda_client_packets(amanda_recover_t)
corenet_tcp_connect_amanda_port(amanda_recover_t)
domain_use_interactive_fds(amanda_recover_t)
files_read_etc_runtime_files(amanda_recover_t)
files_search_pids(amanda_recover_t)
files_search_tmp(amanda_recover_t)
auth_use_nsswitch(amanda_recover_t)
logging_search_logs(amanda_recover_t)
userdom_use_inherited_user_terminals(amanda_recover_t)
userdom_search_user_home_content(amanda_recover_t)
optional_policy(`
inetd_service_domain(amanda_t, amanda_inetd_exec_t)
')
optional_policy(`
fstools_domtrans(amanda_t)
fstools_signal(amanda_t)
')