aboutsummaryrefslogtreecommitdiff
blob: 0f351ab66b15466df1dff7ba306e44fc2bd15b20 (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
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
policy_module(kerberos, 1.16.0)

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

## <desc>
##	<p>
##	Determine whether kerberos is supported.
##	</p>
## </desc>
gen_tunable(allow_kerberos, false)

type kadmind_t;
type kadmind_exec_t;
init_daemon_domain(kadmind_t, kadmind_exec_t)
domain_obj_id_change_exemption(kadmind_t)

type kadmind_log_t;
logging_log_file(kadmind_log_t)

type kadmind_runtime_t;
files_pid_file(kadmind_runtime_t)

type kadmind_tmp_t;
files_tmp_file(kadmind_tmp_t)

type kerberos_initrc_exec_t;
init_script_file(kerberos_initrc_exec_t)

type kpropd_t;
type kpropd_exec_t;
init_daemon_domain(kpropd_t, kpropd_exec_t)
domain_obj_id_change_exemption(kpropd_t)

type krb5_conf_t;
files_type(krb5_conf_t)

type krb5_home_t;
userdom_user_home_content(krb5_home_t)

type krb5_host_rcache_t;
files_tmp_file(krb5_host_rcache_t)

type krb5_keytab_t;
files_security_file(krb5_keytab_t)

type krb5kdc_conf_t;
files_type(krb5kdc_conf_t)

type krb5kdc_lock_t;
files_type(krb5kdc_lock_t)

type krb5kdc_principal_t;
files_type(krb5kdc_principal_t)

type krb5kdc_t;
type krb5kdc_exec_t;
init_daemon_domain(krb5kdc_t, krb5kdc_exec_t)
domain_obj_id_change_exemption(krb5kdc_t)

type krb5kdc_log_t;
logging_log_file(krb5kdc_log_t)

type krb5kdc_runtime_t alias krb5kdc_var_run_t;
files_pid_file(krb5kdc_runtime_t)

type krb5kdc_tmp_t;
files_tmp_file(krb5kdc_tmp_t)

########################################
#
# kadmind local policy
#

allow kadmind_t self:capability { chown dac_override fowner setgid setuid sys_nice };
dontaudit kadmind_t self:capability sys_tty_config;
allow kadmind_t self:capability2 block_suspend;
allow kadmind_t self:process { setfscreate setsched getsched signal_perms };
allow kadmind_t self:netlink_route_socket r_netlink_socket_perms;
allow kadmind_t self:tcp_socket { accept listen };
allow kadmind_t self:udp_socket create_socket_perms;

allow kadmind_t kadmind_log_t:file { append_file_perms create_file_perms setattr_file_perms };
logging_log_filetrans(kadmind_t, kadmind_log_t, file)

allow kadmind_t krb5_conf_t:file read_file_perms;
dontaudit kadmind_t krb5_conf_t:file write_file_perms;

read_files_pattern(kadmind_t, krb5kdc_conf_t, krb5kdc_conf_t)
dontaudit kadmind_t krb5kdc_conf_t:file { write_file_perms setattr_file_perms };

allow kadmind_t krb5kdc_lock_t:file { rw_file_perms setattr_file_perms };

allow kadmind_t krb5kdc_principal_t:file manage_file_perms;
filetrans_pattern(kadmind_t, krb5kdc_conf_t, krb5kdc_principal_t, file)

manage_dirs_pattern(kadmind_t, kadmind_tmp_t, kadmind_tmp_t)
manage_files_pattern(kadmind_t, kadmind_tmp_t, kadmind_tmp_t)
files_tmp_filetrans(kadmind_t, kadmind_tmp_t, { file dir })

manage_files_pattern(kadmind_t, kadmind_runtime_t, kadmind_runtime_t)
files_pid_filetrans(kadmind_t, kadmind_runtime_t, file)

can_exec(kadmind_t, kadmind_exec_t)

kernel_read_kernel_sysctls(kadmind_t)
kernel_read_network_state(kadmind_t)
kernel_read_system_state(kadmind_t)

corenet_all_recvfrom_netlabel(kadmind_t)
corenet_tcp_sendrecv_generic_if(kadmind_t)
corenet_udp_sendrecv_generic_if(kadmind_t)
corenet_tcp_sendrecv_generic_node(kadmind_t)
corenet_udp_sendrecv_generic_node(kadmind_t)
corenet_tcp_bind_generic_node(kadmind_t)
corenet_udp_bind_generic_node(kadmind_t)

corenet_sendrecv_all_server_packets(kadmind_t)
corenet_tcp_bind_kerberos_admin_port(kadmind_t)
corenet_udp_bind_kerberos_admin_port(kadmind_t)
corenet_tcp_bind_reserved_port(kadmind_t)

dev_read_sysfs(kadmind_t)

fs_getattr_all_fs(kadmind_t)
fs_search_auto_mountpoints(kadmind_t)

domain_use_interactive_fds(kadmind_t)

files_read_etc_files(kadmind_t)
files_read_usr_files(kadmind_t)
files_read_var_files(kadmind_t)

selinux_validate_context(kadmind_t)

logging_send_syslog_msg(kadmind_t)

miscfiles_read_localization(kadmind_t)

seutil_read_file_contexts(kadmind_t)

sysnet_use_ldap(kadmind_t)

userdom_dontaudit_use_unpriv_user_fds(kadmind_t)
userdom_dontaudit_search_user_home_dirs(kadmind_t)

optional_policy(`
	ldap_stream_connect(kadmind_t)
')

optional_policy(`
	nis_use_ypbind(kadmind_t)
')

optional_policy(`
	sssd_read_public_files(kadmind_t)
')

optional_policy(`
	seutil_sigchld_newrole(kadmind_t)
')

optional_policy(`
	udev_read_db(kadmind_t)
')

########################################
#
# Krb5kdc local policy
#

allow krb5kdc_t self:capability { chown dac_override fowner net_admin setgid setuid sys_nice };
dontaudit krb5kdc_t self:capability sys_tty_config;
allow krb5kdc_t self:capability2 block_suspend;
allow krb5kdc_t self:process { setfscreate setsched getsched signal_perms };
allow krb5kdc_t self:netlink_route_socket r_netlink_socket_perms;
allow krb5kdc_t self:tcp_socket { accept listen };
allow krb5kdc_t self:udp_socket create_socket_perms;
allow krb5kdc_t self:fifo_file rw_fifo_file_perms;

allow krb5kdc_t krb5_conf_t:file read_file_perms;
dontaudit krb5kdc_t krb5_conf_t:file write;

read_files_pattern(krb5kdc_t, krb5kdc_conf_t, krb5kdc_conf_t)
dontaudit krb5kdc_t krb5kdc_conf_t:file write_file_perms;

allow krb5kdc_t krb5kdc_lock_t:file { rw_file_perms setattr_file_perms };

allow krb5kdc_t krb5kdc_log_t:file { append_file_perms create_file_perms setattr_file_perms };
logging_log_filetrans(krb5kdc_t, krb5kdc_log_t, file)

allow krb5kdc_t krb5kdc_principal_t:file rw_file_perms;

manage_dirs_pattern(krb5kdc_t, krb5kdc_tmp_t, krb5kdc_tmp_t)
manage_files_pattern(krb5kdc_t, krb5kdc_tmp_t, krb5kdc_tmp_t)
files_tmp_filetrans(krb5kdc_t, krb5kdc_tmp_t, { file dir })

manage_files_pattern(krb5kdc_t, krb5kdc_runtime_t, krb5kdc_runtime_t)
files_pid_filetrans(krb5kdc_t, krb5kdc_runtime_t, file)

can_exec(krb5kdc_t, krb5kdc_exec_t)

kernel_read_system_state(krb5kdc_t)
kernel_read_kernel_sysctls(krb5kdc_t)
kernel_read_network_state(krb5kdc_t)
kernel_search_network_sysctl(krb5kdc_t)

corecmd_exec_bin(krb5kdc_t)

corenet_all_recvfrom_netlabel(krb5kdc_t)
corenet_tcp_sendrecv_generic_if(krb5kdc_t)
corenet_udp_sendrecv_generic_if(krb5kdc_t)
corenet_tcp_sendrecv_generic_node(krb5kdc_t)
corenet_udp_sendrecv_generic_node(krb5kdc_t)
corenet_tcp_bind_generic_node(krb5kdc_t)
corenet_udp_bind_generic_node(krb5kdc_t)

corenet_sendrecv_kerberos_server_packets(krb5kdc_t)
corenet_tcp_bind_kerberos_port(krb5kdc_t)
corenet_udp_bind_kerberos_port(krb5kdc_t)

corenet_sendrecv_ocsp_client_packets(krb5kdc_t)
corenet_tcp_connect_ocsp_port(krb5kdc_t)

dev_read_sysfs(krb5kdc_t)

fs_getattr_all_fs(krb5kdc_t)
fs_search_auto_mountpoints(krb5kdc_t)

domain_use_interactive_fds(krb5kdc_t)

files_read_etc_files(krb5kdc_t)
files_read_usr_symlinks(krb5kdc_t)
files_read_var_files(krb5kdc_t)

selinux_validate_context(krb5kdc_t)

logging_send_syslog_msg(krb5kdc_t)

miscfiles_read_generic_certs(krb5kdc_t)
miscfiles_read_localization(krb5kdc_t)

seutil_read_file_contexts(krb5kdc_t)

sysnet_use_ldap(krb5kdc_t)

userdom_dontaudit_use_unpriv_user_fds(krb5kdc_t)
userdom_dontaudit_search_user_home_dirs(krb5kdc_t)

optional_policy(`
	ldap_stream_connect(krb5kdc_t)
')

optional_policy(`
	nis_use_ypbind(krb5kdc_t)
')

optional_policy(`
	sssd_read_public_files(krb5kdc_t)
')

optional_policy(`
	seutil_sigchld_newrole(krb5kdc_t)
')

optional_policy(`
	udev_read_db(krb5kdc_t)
')

########################################
#
# kpropd local policy
#

allow kpropd_t self:process setfscreate;
allow kpropd_t self:fifo_file rw_fifo_file_perms;
allow kpropd_t self:unix_stream_socket { accept listen };
allow kpropd_t self:tcp_socket { accept listen };

allow kpropd_t krb5_host_rcache_t:file manage_file_perms;

allow kpropd_t krb5_keytab_t:file read_file_perms;

read_files_pattern(kpropd_t, krb5kdc_conf_t, krb5kdc_conf_t)

manage_files_pattern(kpropd_t, krb5kdc_conf_t, krb5kdc_lock_t)
filetrans_pattern(kpropd_t, krb5kdc_conf_t, krb5kdc_lock_t, file)

manage_files_pattern(kpropd_t, krb5kdc_conf_t, krb5kdc_principal_t)

manage_dirs_pattern(kpropd_t, krb5kdc_tmp_t, krb5kdc_tmp_t)
manage_files_pattern(kpropd_t, krb5kdc_tmp_t, krb5kdc_tmp_t)
files_tmp_filetrans(kpropd_t, krb5kdc_tmp_t, { file dir })

corecmd_exec_bin(kpropd_t)

corenet_tcp_sendrecv_generic_if(kpropd_t)
corenet_tcp_sendrecv_generic_node(kpropd_t)
corenet_tcp_bind_generic_node(kpropd_t)

corenet_sendrecv_kprop_server_packets(kpropd_t)
corenet_tcp_bind_kprop_port(kpropd_t)

dev_read_urand(kpropd_t)

files_read_etc_files(kpropd_t)
files_search_tmp(kpropd_t)

selinux_validate_context(kpropd_t)

logging_send_syslog_msg(kpropd_t)

miscfiles_read_localization(kpropd_t)

seutil_read_file_contexts(kpropd_t)

sysnet_dns_name_resolve(kpropd_t)

kerberos_use(kpropd_t)