aboutsummaryrefslogtreecommitdiff
blob: 059f1c5d994eee654b42fa6f83d807fd82924836 (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
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
policy_module(nis, 1.17.0)

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

attribute_role ypbind_roles;

type nis_initrc_exec_t;
init_script_file(nis_initrc_exec_t)

type nis_unit_t;
init_unit_file(nis_unit_t)

type var_yp_t;
files_type(var_yp_t)

type ypbind_t;
type ypbind_exec_t;
init_daemon_domain(ypbind_t, ypbind_exec_t)
role ypbind_roles types ypbind_t;

type ypbind_initrc_exec_t;
init_script_file(ypbind_initrc_exec_t)

type ypbind_runtime_t alias ypbind_var_run_t;
files_pid_file(ypbind_runtime_t)

type ypbind_tmp_t;
files_tmp_file(ypbind_tmp_t)

type ypbind_unit_t;
init_unit_file(ypbind_unit_t)

type yppasswdd_t;
type yppasswdd_exec_t;
init_daemon_domain(yppasswdd_t, yppasswdd_exec_t)
domain_obj_id_change_exemption(yppasswdd_t)

type yppasswdd_runtime_t alias yppasswdd_var_run_t;
files_pid_file(yppasswdd_runtime_t)

type ypserv_t;
type ypserv_exec_t;
init_daemon_domain(ypserv_t, ypserv_exec_t)

type ypserv_conf_t;
files_type(ypserv_conf_t)

type ypserv_runtime_t alias ypserv_var_run_t;
files_pid_file(ypserv_runtime_t)

type ypserv_tmp_t;
files_tmp_file(ypserv_tmp_t)

type ypxfr_t;
type ypxfr_exec_t;
init_daemon_domain(ypxfr_t, ypxfr_exec_t)

type ypxfr_runtime_t alias ypxfr_var_run_t;
files_pid_file(ypxfr_runtime_t)

########################################
#
# ypbind local policy

dontaudit ypbind_t self:capability { net_admin sys_tty_config };
allow ypbind_t self:fifo_file rw_fifo_file_perms;
allow ypbind_t self:process signal_perms;
allow ypbind_t self:netlink_route_socket r_netlink_socket_perms;
allow ypbind_t self:tcp_socket create_stream_socket_perms;
allow ypbind_t self:udp_socket create_socket_perms;

manage_dirs_pattern(ypbind_t, ypbind_tmp_t, ypbind_tmp_t)
manage_files_pattern(ypbind_t, ypbind_tmp_t, ypbind_tmp_t)
files_tmp_filetrans(ypbind_t, ypbind_tmp_t, { file dir })

manage_files_pattern(ypbind_t, ypbind_runtime_t, ypbind_runtime_t)
files_pid_filetrans(ypbind_t, ypbind_runtime_t, file)

manage_files_pattern(ypbind_t, var_yp_t, var_yp_t)

kernel_read_system_state(ypbind_t)
kernel_read_kernel_sysctls(ypbind_t)

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

corenet_tcp_bind_generic_port(ypbind_t)
corenet_udp_bind_generic_port(ypbind_t)
corenet_tcp_bind_reserved_port(ypbind_t)
corenet_udp_bind_reserved_port(ypbind_t)
corenet_tcp_bind_all_rpc_ports(ypbind_t)
corenet_udp_bind_all_rpc_ports(ypbind_t)
corenet_tcp_connect_all_ports(ypbind_t)
corenet_sendrecv_all_client_packets(ypbind_t)
corenet_sendrecv_generic_server_packets(ypbind_t)

corenet_dontaudit_tcp_bind_all_reserved_ports(ypbind_t)
corenet_dontaudit_udp_bind_all_reserved_ports(ypbind_t)

dev_read_sysfs(ypbind_t)

fs_getattr_all_fs(ypbind_t)
fs_search_auto_mountpoints(ypbind_t)

domain_use_interactive_fds(ypbind_t)

files_read_etc_files(ypbind_t)
files_list_var(ypbind_t)

logging_send_syslog_msg(ypbind_t)

miscfiles_read_localization(ypbind_t)

sysnet_read_config(ypbind_t)

userdom_dontaudit_use_unpriv_user_fds(ypbind_t)
userdom_dontaudit_search_user_home_dirs(ypbind_t)

optional_policy(`
	dbus_system_bus_client(ypbind_t)
	dbus_connect_system_bus(ypbind_t)

	init_dbus_chat_script(ypbind_t)

	optional_policy(`
		networkmanager_dbus_chat(ypbind_t)
	')
')

optional_policy(`
	seutil_sigchld_newrole(ypbind_t)
')

optional_policy(`
	udev_read_db(ypbind_t)
')

########################################
#
# yppasswdd local policy
#

allow yppasswdd_t self:capability dac_override;
dontaudit yppasswdd_t self:capability sys_tty_config;
allow yppasswdd_t self:fifo_file rw_fifo_file_perms;
allow yppasswdd_t self:process { getsched setfscreate signal_perms };
allow yppasswdd_t self:unix_stream_socket { accept listen };
allow yppasswdd_t self:netlink_route_socket r_netlink_socket_perms;
allow yppasswdd_t self:tcp_socket create_stream_socket_perms;
allow yppasswdd_t self:udp_socket create_socket_perms;

manage_files_pattern(yppasswdd_t, yppasswdd_runtime_t, yppasswdd_runtime_t)
files_pid_filetrans(yppasswdd_t, yppasswdd_runtime_t, file)

manage_files_pattern(yppasswdd_t, var_yp_t, var_yp_t)
manage_lnk_files_pattern(yppasswdd_t, var_yp_t, var_yp_t)

can_exec(yppasswdd_t, yppasswdd_exec_t)

kernel_list_proc(yppasswdd_t)
kernel_read_proc_symlinks(yppasswdd_t)
kernel_getattr_proc_files(yppasswdd_t)
kernel_read_kernel_sysctls(yppasswdd_t)

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

corenet_tcp_bind_all_rpc_ports(yppasswdd_t)
corenet_udp_bind_all_rpc_ports(yppasswdd_t)
corenet_sendrecv_generic_server_packets(yppasswdd_t)

corenet_dontaudit_tcp_bind_all_reserved_ports(yppasswdd_t)
corenet_dontaudit_udp_bind_all_reserved_ports(yppasswdd_t)

corecmd_exec_bin(yppasswdd_t)
corecmd_exec_shell(yppasswdd_t)

domain_use_interactive_fds(yppasswdd_t)

files_read_etc_files(yppasswdd_t)
files_read_etc_runtime_files(yppasswdd_t)
files_relabel_etc_files(yppasswdd_t)

dev_read_sysfs(yppasswdd_t)

fs_getattr_all_fs(yppasswdd_t)
fs_search_auto_mountpoints(yppasswdd_t)

selinux_get_fs_mount(yppasswdd_t)

auth_manage_shadow(yppasswdd_t)
auth_relabel_shadow(yppasswdd_t)
auth_etc_filetrans_shadow(yppasswdd_t)

logging_send_syslog_msg(yppasswdd_t)

miscfiles_read_localization(yppasswdd_t)

sysnet_read_config(yppasswdd_t)

userdom_dontaudit_use_unpriv_user_fds(yppasswdd_t)
userdom_dontaudit_search_user_home_dirs(yppasswdd_t)

optional_policy(`
	hostname_exec(yppasswdd_t)
')

optional_policy(`
	seutil_sigchld_newrole(yppasswdd_t)
')

optional_policy(`
	udev_read_db(yppasswdd_t)
')

########################################
#
# ypserv local policy
#

dontaudit ypserv_t self:capability sys_tty_config;
allow ypserv_t self:fifo_file rw_fifo_file_perms;
allow ypserv_t self:process signal_perms;
allow ypserv_t self:unix_stream_socket { accept listen };
allow ypserv_t self:netlink_route_socket r_netlink_socket_perms;
allow ypserv_t self:tcp_socket connected_stream_socket_perms;
allow ypserv_t self:udp_socket create_socket_perms;

manage_files_pattern(ypserv_t, var_yp_t, var_yp_t)

allow ypserv_t ypserv_conf_t:file read_file_perms;

manage_dirs_pattern(ypserv_t, ypserv_tmp_t, ypserv_tmp_t)
manage_files_pattern(ypserv_t, ypserv_tmp_t, ypserv_tmp_t)
files_tmp_filetrans(ypserv_t, ypserv_tmp_t, { file dir })

manage_files_pattern(ypserv_t, ypserv_runtime_t, ypserv_runtime_t)
files_pid_filetrans(ypserv_t, ypserv_runtime_t, file)

kernel_read_kernel_sysctls(ypserv_t)
kernel_list_proc(ypserv_t)
kernel_read_proc_symlinks(ypserv_t)

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

corenet_tcp_bind_reserved_port(ypserv_t)
corenet_udp_bind_reserved_port(ypserv_t)
corenet_tcp_bind_all_rpc_ports(ypserv_t)
corenet_udp_bind_all_rpc_ports(ypserv_t)
corenet_sendrecv_generic_server_packets(ypserv_t)

corenet_dontaudit_tcp_bind_all_reserved_ports(ypserv_t)
corenet_dontaudit_udp_bind_all_reserved_ports(ypserv_t)

corecmd_exec_bin(ypserv_t)

files_read_etc_files(ypserv_t)
files_read_var_files(ypserv_t)

dev_read_sysfs(ypserv_t)

domain_use_interactive_fds(ypserv_t)

fs_getattr_all_fs(ypserv_t)
fs_search_auto_mountpoints(ypserv_t)

logging_send_syslog_msg(ypserv_t)

miscfiles_read_localization(ypserv_t)

nis_domtrans_ypxfr(ypserv_t)

sysnet_read_config(ypserv_t)

userdom_dontaudit_use_unpriv_user_fds(ypserv_t)
userdom_dontaudit_search_user_home_dirs(ypserv_t)

optional_policy(`
	seutil_sigchld_newrole(ypserv_t)
')

optional_policy(`
	udev_read_db(ypserv_t)
')

########################################
#
# ypxfr local policy
#

allow ypxfr_t self:unix_stream_socket { accept listen };
allow ypxfr_t self:unix_dgram_socket { accept listen };
allow ypxfr_t self:tcp_socket create_stream_socket_perms;
allow ypxfr_t self:udp_socket create_socket_perms;
allow ypxfr_t self:netlink_route_socket r_netlink_socket_perms;

manage_files_pattern(ypxfr_t, var_yp_t, var_yp_t)

allow ypxfr_t ypserv_t:tcp_socket { read write };
allow ypxfr_t ypserv_t:udp_socket { read write };

allow ypxfr_t ypserv_conf_t:file read_file_perms;

manage_files_pattern(ypxfr_t, ypxfr_runtime_t, ypxfr_runtime_t)
files_pid_filetrans(ypxfr_t, ypxfr_runtime_t, file)

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

corenet_tcp_bind_reserved_port(ypxfr_t)
corenet_udp_bind_reserved_port(ypxfr_t)
corenet_tcp_bind_all_rpc_ports(ypxfr_t)
corenet_udp_bind_all_rpc_ports(ypxfr_t)
corenet_tcp_connect_all_ports(ypxfr_t)
corenet_sendrecv_generic_server_packets(ypxfr_t)
corenet_sendrecv_all_client_packets(ypxfr_t)

corenet_dontaudit_tcp_bind_all_reserved_ports(ypxfr_t)
corenet_dontaudit_udp_bind_all_reserved_ports(ypxfr_t)

files_read_etc_files(ypxfr_t)
files_search_usr(ypxfr_t)

logging_send_syslog_msg(ypxfr_t)

miscfiles_read_localization(ypxfr_t)

sysnet_read_config(ypxfr_t)