1zabbix_selinux(8) SELinux Policy zabbix zabbix_selinux(8)
2
3
4
6 zabbix_selinux - Security Enhanced Linux Policy for the zabbix pro‐
7 cesses
8
10 Security-Enhanced Linux secures the zabbix processes via flexible
11 mandatory access control.
12
13 The zabbix processes execute with the zabbix_t SELinux type. You can
14 check if you have these processes running by executing the ps command
15 with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep zabbix_t
20
21
22
24 The zabbix_t SELinux type can be entered via the zabbix_exec_t file
25 type.
26
27 The default entrypoint paths for the zabbix_t domain are the following:
28
29 /usr/(s)?bin/zabbix_server, /usr/sbin/zabbix_proxy, /usr/sbin/zab‐
30 bix_proxy_mysql, /usr/sbin/zabbix_proxy_pgsql, /usr/sbin/zab‐
31 bix_server_mysql, /usr/sbin/zabbix_server_pgsql, /usr/sbin/zab‐
32 bix_proxy_sqlite3, /usr/sbin/zabbix_server_sqlite3
33
35 SELinux defines process types (domains) for each process running on the
36 system
37
38 You can see the context of a process using the -Z option to ps
39
40 Policy governs the access confined processes have to files. SELinux
41 zabbix policy is very flexible allowing users to setup their zabbix
42 processes in as secure a method as possible.
43
44 The following process types are defined for zabbix:
45
46 zabbix_script_t, zabbix_agent_t, zabbix_t
47
48 Note: semanage permissive -a zabbix_t can be used to make the process
49 type zabbix_t permissive. SELinux does not deny access to permissive
50 process types, but the AVC (SELinux denials) messages are still gener‐
51 ated.
52
53
55 SELinux policy is customizable based on least access required. zabbix
56 policy is extremely flexible and has several booleans that allow you to
57 manipulate the policy and run zabbix with the tightest access possible.
58
59
60
61 If you want to determine whether zabbix can connect to all TCP ports,
62 you must turn on the zabbix_can_network boolean. Disabled by default.
63
64 setsebool -P zabbix_can_network 1
65
66
67
68 If you want to allow all daemons to write corefiles to /, you must turn
69 on the allow_daemons_dump_core boolean. Disabled by default.
70
71 setsebool -P allow_daemons_dump_core 1
72
73
74
75 If you want to allow all daemons to use tcp wrappers, you must turn on
76 the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
77
78 setsebool -P allow_daemons_use_tcp_wrapper 1
79
80
81
82 If you want to allow all daemons the ability to read/write terminals,
83 you must turn on the allow_daemons_use_tty boolean. Disabled by
84 default.
85
86 setsebool -P allow_daemons_use_tty 1
87
88
89
90 If you want to allow all domains to use other domains file descriptors,
91 you must turn on the allow_domain_fd_use boolean. Enabled by default.
92
93 setsebool -P allow_domain_fd_use 1
94
95
96
97 If you want to allow confined applications to run with kerberos, you
98 must turn on the allow_kerberos boolean. Enabled by default.
99
100 setsebool -P allow_kerberos 1
101
102
103
104 If you want to allow sysadm to debug or ptrace all processes, you must
105 turn on the allow_ptrace boolean. Disabled by default.
106
107 setsebool -P allow_ptrace 1
108
109
110
111 If you want to allow system to run with NIS, you must turn on the
112 allow_ypbind boolean. Disabled by default.
113
114 setsebool -P allow_ypbind 1
115
116
117
118 If you want to enable cluster mode for daemons, you must turn on the
119 daemons_enable_cluster_mode boolean. Disabled by default.
120
121 setsebool -P daemons_enable_cluster_mode 1
122
123
124
125 If you want to allow all domains to have the kernel load modules, you
126 must turn on the domain_kernel_load_modules boolean. Disabled by
127 default.
128
129 setsebool -P domain_kernel_load_modules 1
130
131
132
133 If you want to allow all domains to execute in fips_mode, you must turn
134 on the fips_mode boolean. Enabled by default.
135
136 setsebool -P fips_mode 1
137
138
139
140 If you want to enable reading of urandom for all domains, you must turn
141 on the global_ssp boolean. Disabled by default.
142
143 setsebool -P global_ssp 1
144
145
146
147 If you want to enable support for upstart as the init program, you must
148 turn on the init_upstart boolean. Enabled by default.
149
150 setsebool -P init_upstart 1
151
152
153
154 If you want to allow confined applications to use nscd shared memory,
155 you must turn on the nscd_use_shm boolean. Enabled by default.
156
157 setsebool -P nscd_use_shm 1
158
159
160
162 SELinux defines port types to represent TCP and UDP ports.
163
164 You can see the types associated with a port by using the following
165 command:
166
167 semanage port -l
168
169
170 Policy governs the access confined processes have to these ports.
171 SELinux zabbix policy is very flexible allowing users to setup their
172 zabbix processes in as secure a method as possible.
173
174 The following port types are defined for zabbix:
175
176
177 zabbix_agent_port_t
178
179
180
181 Default Defined Ports:
182 tcp 10050
183
184
185 zabbix_port_t
186
187
188
189 Default Defined Ports:
190 tcp 10051
191
193 The SELinux process type zabbix_t can manage files labeled with the
194 following file types. The paths listed are the default paths for these
195 file types. Note the processes UID still need to have DAC permissions.
196
197 cluster_conf_t
198
199 /etc/cluster(/.*)?
200
201 cluster_var_lib_t
202
203 /var/lib(64)?/openais(/.*)?
204 /var/lib(64)?/pengine(/.*)?
205 /var/lib(64)?/corosync(/.*)?
206 /usr/lib(64)?/heartbeat(/.*)?
207 /var/lib(64)?/heartbeat(/.*)?
208 /var/lib(64)?/pacemaker(/.*)?
209 /var/lib/cluster(/.*)?
210
211 cluster_var_run_t
212
213 /var/run/crm(/.*)?
214 /var/run/cman_.*
215 /var/run/rsctmp(/.*)?
216 /var/run/aisexec.*
217 /var/run/heartbeat(/.*)?
218 /var/run/cpglockd.pid
219 /var/run/corosync.pid
220 /var/run/rgmanager.pid
221 /var/run/cluster/rgmanager.sk
222
223 initrc_tmp_t
224
225
226 mnt_t
227
228 /mnt(/[^/]*)
229 /mnt(/[^/]*)?
230 /rhev(/[^/]*)?
231 /media(/[^/]*)
232 /media(/[^/]*)?
233 /etc/rhgb(/.*)?
234 /media/.hal-.*
235 /net
236 /afs
237 /rhev
238 /misc
239
240 root_t
241
242 /
243 /initrd
244
245 tmp_t
246
247 /tmp
248 /usr/tmp
249 /var/tmp
250 /tmp-inst
251 /var/tmp-inst
252 /var/tmp/vi.recover
253
254 zabbix_log_t
255
256 /var/log/zabbix(/.*)?
257
258 zabbix_tmp_t
259
260
261 zabbix_tmpfs_t
262
263
264 zabbix_var_lib_t
265
266 /var/lib/zabbix(/.*)?
267 /var/lib/zabbixsrv(/.*)?
268
269 zabbix_var_run_t
270
271 /var/run/zabbix(/.*)?
272
273
275 SELinux requires files to have an extended attribute to define the file
276 type.
277
278 You can see the context of a file using the -Z option to ls
279
280 Policy governs the access confined processes have to these files.
281 SELinux zabbix policy is very flexible allowing users to setup their
282 zabbix processes in as secure a method as possible.
283
284 EQUIVALENCE DIRECTORIES
285
286
287 zabbix policy stores data with multiple different file context types
288 under the /var/lib/zabbix directory. If you would like to store the
289 data in a different directory you can use the semanage command to cre‐
290 ate an equivalence mapping. If you wanted to store this data under the
291 /srv dirctory you would execute the following command:
292
293 semanage fcontext -a -e /var/lib/zabbix /srv/zabbix
294 restorecon -R -v /srv/zabbix
295
296 STANDARD FILE CONTEXT
297
298 SELinux defines the file context types for the zabbix, if you wanted to
299 store files with these types in a diffent paths, you need to execute
300 the semanage command to sepecify alternate labeling and then use
301 restorecon to put the labels on disk.
302
303 semanage fcontext -a -t zabbixd_var_lib_t '/srv/myzabbix_content(/.*)?'
304 restorecon -R -v /srv/myzabbix_content
305
306 Note: SELinux often uses regular expressions to specify labels that
307 match multiple files.
308
309 The following file types are defined for zabbix:
310
311
312
313 zabbix_agent_exec_t
314
315 - Set files with the zabbix_agent_exec_t type, if you want to transi‐
316 tion an executable to the zabbix_agent_t domain.
317
318
319
320 zabbix_agent_initrc_exec_t
321
322 - Set files with the zabbix_agent_initrc_exec_t type, if you want to
323 transition an executable to the zabbix_agent_initrc_t domain.
324
325
326
327 zabbix_exec_t
328
329 - Set files with the zabbix_exec_t type, if you want to transition an
330 executable to the zabbix_t domain.
331
332
333 Paths:
334 /usr/(s)?bin/zabbix_server, /usr/sbin/zabbix_proxy, /usr/sbin/zab‐
335 bix_proxy_mysql, /usr/sbin/zabbix_proxy_pgsql, /usr/sbin/zab‐
336 bix_server_mysql, /usr/sbin/zabbix_server_pgsql, /usr/sbin/zab‐
337 bix_proxy_sqlite3, /usr/sbin/zabbix_server_sqlite3
338
339
340 zabbix_initrc_exec_t
341
342 - Set files with the zabbix_initrc_exec_t type, if you want to transi‐
343 tion an executable to the zabbix_initrc_t domain.
344
345
346
347 zabbix_log_t
348
349 - Set files with the zabbix_log_t type, if you want to treat the data
350 as zabbix log data, usually stored under the /var/log directory.
351
352
353
354 zabbix_script_exec_t
355
356 - Set files with the zabbix_script_exec_t type, if you want to transi‐
357 tion an executable to the zabbix_script_t domain.
358
359
360 Paths:
361 /usr/lib/zabbix/externalscripts(/.*)?, /var/lib/zabbix/exter‐
362 nalscripts(/.*)?
363
364
365 zabbix_tmp_t
366
367 - Set files with the zabbix_tmp_t type, if you want to store zabbix
368 temporary files in the /tmp directories.
369
370
371
372 zabbix_tmpfs_t
373
374 - Set files with the zabbix_tmpfs_t type, if you want to store zabbix
375 files on a tmpfs file system.
376
377
378
379 zabbix_var_lib_t
380
381 - Set files with the zabbix_var_lib_t type, if you want to store the
382 zabbix files under the /var/lib directory.
383
384
385 Paths:
386 /var/lib/zabbix(/.*)?, /var/lib/zabbixsrv(/.*)?
387
388
389 zabbix_var_run_t
390
391 - Set files with the zabbix_var_run_t type, if you want to store the
392 zabbix files under the /run or /var/run directory.
393
394
395
396 zabbixd_var_lib_t
397
398 - Set files with the zabbixd_var_lib_t type, if you want to store the
399 zabbixd files under the /var/lib directory.
400
401
402
403 Note: File context can be temporarily modified with the chcon command.
404 If you want to permanently change the file context you need to use the
405 semanage fcontext command. This will modify the SELinux labeling data‐
406 base. You will need to use restorecon to apply the labels.
407
408
410 semanage fcontext can also be used to manipulate default file context
411 mappings.
412
413 semanage permissive can also be used to manipulate whether or not a
414 process type is permissive.
415
416 semanage module can also be used to enable/disable/install/remove pol‐
417 icy modules.
418
419 semanage port can also be used to manipulate the port definitions
420
421 semanage boolean can also be used to manipulate the booleans
422
423
424 system-config-selinux is a GUI tool available to customize SELinux pol‐
425 icy settings.
426
427
429 This manual page was auto-generated using sepolicy manpage .
430
431
433 selinux(8), zabbix(8), semanage(8), restorecon(8), chcon(1) , setse‐
434 bool(8), zabbix_agent_selinux(8), zabbix_agent_selinux(8), zab‐
435 bix_script_selinux(8), zabbix_script_selinux(8)
436
437
438
439zabbix 15-06-03 zabbix_selinux(8)