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