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