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_checkconf_exec_t,
24 named_exec_t file types.
25
26 The default entrypoint paths for the named_t domain are the following:
27
28 /usr/sbin/named-checkconf, /usr/sbin/named, /usr/sbin/lwresd,
29 /usr/sbin/unbound, /usr/sbin/named-sdb, /usr/sbin/named-pkcs11,
30 /usr/sbin/unbound-anchor, /usr/sbin/unbound-control, /usr/sbin/unbound-
31 checkconf
32
34 SELinux defines process types (domains) for each process running on the
35 system
36
37 You can see the context of a process using the -Z option to ps
38
39 Policy governs the access confined processes have to files. SELinux
40 named policy is very flexible allowing users to setup their named pro‐
41 cesses in as secure a method as possible.
42
43 The following process types are defined for named:
44
45 named_t
46
47 Note: semanage permissive -a named_t can be used to make the process
48 type named_t permissive. SELinux does not deny access to permissive
49 process types, but the AVC (SELinux denials) messages are still gener‐
50 ated.
51
52
54 SELinux policy is customizable based on least access required. named
55 policy is extremely flexible and has several booleans that allow you to
56 manipulate the policy and run named with the tightest access possible.
57
58
59
60 If you want to determine whether Bind can bind tcp socket to http
61 ports, you must turn on the named_tcp_bind_http_port boolean. Disabled
62 by default.
63
64 setsebool -P named_tcp_bind_http_port 1
65
66
67
68 If you want to determine whether Bind can write to master zone files.
69 Generally this is used for dynamic DNS or zone transfers, you must turn
70 on the named_write_master_zones boolean. Enabled by default.
71
72 setsebool -P named_write_master_zones 1
73
74
75
76 If you want to dontaudit all daemons scheduling requests (setsched,
77 sys_nice), you must turn on the daemons_dontaudit_scheduling boolean.
78 Enabled by default.
79
80 setsebool -P daemons_dontaudit_scheduling 1
81
82
83
84 If you want to allow all domains to execute in fips_mode, you must turn
85 on the fips_mode boolean. Enabled by default.
86
87 setsebool -P fips_mode 1
88
89
90
91 If you want to allow system to run with NIS, you must turn on the
92 nis_enabled boolean. Disabled by default.
93
94 setsebool -P nis_enabled 1
95
96
97
99 The SELinux process type named_t can manage files labeled with the fol‐
100 lowing file types. The paths listed are the default paths for these
101 file types. Note the processes UID still need to have DAC permissions.
102
103 cluster_conf_t
104
105 /etc/cluster(/.*)?
106
107 cluster_var_lib_t
108
109 /var/lib/pcsd(/.*)?
110 /var/lib/cluster(/.*)?
111 /var/lib/openais(/.*)?
112 /var/lib/pengine(/.*)?
113 /var/lib/corosync(/.*)?
114 /usr/lib/heartbeat(/.*)?
115 /var/lib/heartbeat(/.*)?
116 /var/lib/pacemaker(/.*)?
117
118 cluster_var_run_t
119
120 /var/run/crm(/.*)?
121 /var/run/cman_.*
122 /var/run/rsctmp(/.*)?
123 /var/run/aisexec.*
124 /var/run/heartbeat(/.*)?
125 /var/run/pcsd-ruby.socket
126 /var/run/corosync-qnetd(/.*)?
127 /var/run/corosync-qdevice(/.*)?
128 /var/run/corosync.pid
129 /var/run/cpglockd.pid
130 /var/run/rgmanager.pid
131 /var/run/cluster/rgmanager.sk
132
133 dnssec_trigger_var_run_t
134
135 /var/run/dnssec.*
136
137 krb5_host_rcache_t
138
139 /var/tmp/krb5_0.rcache2
140 /var/cache/krb5rcache(/.*)?
141 /var/tmp/nfs_0
142 /var/tmp/DNS_25
143 /var/tmp/host_0
144 /var/tmp/imap_0
145 /var/tmp/HTTP_23
146 /var/tmp/HTTP_48
147 /var/tmp/ldap_55
148 /var/tmp/ldap_487
149 /var/tmp/ldapmap1_0
150
151 krb5_keytab_t
152
153 /var/kerberos/krb5(/.*)?
154 /etc/krb5.keytab
155 /etc/krb5kdc/kadm5.keytab
156 /var/kerberos/krb5kdc/kadm5.keytab
157
158 named_cache_t
159
160 /var/named/data(/.*)?
161 /var/lib/softhsm(/.*)?
162 /var/lib/unbound(/.*)?
163 /var/named/slaves(/.*)?
164 /var/named/dynamic(/.*)?
165 /var/named/chroot/var/tmp(/.*)?
166 /var/named/chroot/var/named/data(/.*)?
167 /var/named/chroot/var/named/slaves(/.*)?
168 /var/named/chroot/var/named/dynamic(/.*)?
169
170 named_log_t
171
172 /var/log/named.*
173 /var/named/chroot/var/log/named.*
174
175 named_tmp_t
176
177
178 named_var_run_t
179
180 /var/run/bind(/.*)?
181 /var/run/named(/.*)?
182 /var/run/unbound(/.*)?
183 /var/named/chroot/run/named.*
184 /var/named/chroot/var/run/named.*
185 /var/run/ndc
186
187 root_t
188
189 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
190 /
191 /initrd
192
193
195 SELinux requires files to have an extended attribute to define the file
196 type.
197
198 You can see the context of a file using the -Z option to ls
199
200 Policy governs the access confined processes have to these files.
201 SELinux named policy is very flexible allowing users to setup their
202 named processes in as secure a method as possible.
203
204 EQUIVALENCE DIRECTORIES
205
206
207 named policy stores data with multiple different file context types un‐
208 der the /var/named directory. If you would like to store the data in a
209 different directory you can use the semanage command to create an
210 equivalence mapping. If you wanted to store this data under the /srv
211 directory you would execute the following command:
212
213 semanage fcontext -a -e /var/named /srv/named
214 restorecon -R -v /srv/named
215
216 STANDARD FILE CONTEXT
217
218 SELinux defines the file context types for the named, if you wanted to
219 store files with these types in a different paths, you need to execute
220 the semanage command to specify alternate labeling and then use re‐
221 storecon to put the labels on disk.
222
223 semanage fcontext -a -t named_exec_t '/srv/named/content(/.*)?'
224 restorecon -R -v /srv/mynamed_content
225
226 Note: SELinux often uses regular expressions to specify labels that
227 match multiple files.
228
229 The following file types are defined for named:
230
231
232
233 named_cache_t
234
235 - Set files with the named_cache_t type, if you want to store the files
236 under the /var/cache directory.
237
238
239 Paths:
240 /var/named/data(/.*)?, /var/lib/softhsm(/.*)?, /var/lib/un‐
241 bound(/.*)?, /var/named/slaves(/.*)?, /var/named/dynamic(/.*)?,
242 /var/named/chroot/var/tmp(/.*)?, /var/named/ch‐
243 root/var/named/data(/.*)?, /var/named/ch‐
244 root/var/named/slaves(/.*)?, /var/named/chroot/var/named/dy‐
245 namic(/.*)?
246
247
248 named_checkconf_exec_t
249
250 - Set files with the named_checkconf_exec_t type, if you want to tran‐
251 sition an executable to the named_checkconf_t domain.
252
253
254
255 named_conf_t
256
257 - Set files with the named_conf_t type, if you want to treat the files
258 as named configuration data, usually stored under the /etc directory.
259
260
261 Paths:
262 /etc/rndc.*, /etc/named(/.*)?, /etc/unbound(/.*)?, /var/named/ch‐
263 root(/.*)?, /etc/named.rfc1912.zones, /var/named/ch‐
264 root/etc/named.rfc1912.zones, /etc/named.conf,
265 /var/named/named.ca, /etc/named.root.hints, /var/named/ch‐
266 root/etc/named.conf, /etc/named.caching-nameserver.conf,
267 /var/named/chroot/var/named/named.ca, /var/named/ch‐
268 root/etc/named.root.hints, /var/named/chroot/etc/named.caching-
269 nameserver.conf
270
271
272 named_exec_t
273
274 - Set files with the named_exec_t type, if you want to transition an
275 executable to the named_t domain.
276
277
278 Paths:
279 /usr/sbin/named, /usr/sbin/lwresd, /usr/sbin/unbound,
280 /usr/sbin/named-sdb, /usr/sbin/named-pkcs11, /usr/sbin/unbound-an‐
281 chor, /usr/sbin/unbound-control, /usr/sbin/unbound-checkconf
282
283
284 named_initrc_exec_t
285
286 - Set files with the named_initrc_exec_t type, if you want to transi‐
287 tion an executable to the named_initrc_t domain.
288
289
290 Paths:
291 /etc/rc.d/init.d/named, /etc/rc.d/init.d/unbound,
292 /etc/rc.d/init.d/named-sdb
293
294
295 named_keytab_t
296
297 - Set files with the named_keytab_t type, if you want to treat the
298 files as kerberos keytab files.
299
300
301
302 named_log_t
303
304 - Set files with the named_log_t type, if you want to treat the data as
305 named log data, usually stored under the /var/log directory.
306
307
308 Paths:
309 /var/log/named.*, /var/named/chroot/var/log/named.*
310
311
312 named_tmp_t
313
314 - Set files with the named_tmp_t type, if you want to store named tem‐
315 porary files in the /tmp directories.
316
317
318
319 named_unit_file_t
320
321 - Set files with the named_unit_file_t type, if you want to treat the
322 files as named unit content.
323
324
325 Paths:
326 /usr/lib/systemd/system/named.*, /usr/lib/systemd/system/un‐
327 bound.*, /usr/lib/systemd/system/named-sdb.*
328
329
330 named_var_run_t
331
332 - Set files with the named_var_run_t type, if you want to store the
333 named files under the /run or /var/run directory.
334
335
336 Paths:
337 /var/run/bind(/.*)?, /var/run/named(/.*)?, /var/run/unbound(/.*)?,
338 /var/named/chroot/run/named.*, /var/named/chroot/var/run/named.*,
339 /var/run/ndc
340
341
342 named_zone_t
343
344 - Set files with the named_zone_t type, if you want to treat the files
345 as named zone data.
346
347
348 Paths:
349 /var/named(/.*)?, /var/named/chroot/var/named(/.*)?
350
351
352 Note: File context can be temporarily modified with the chcon command.
353 If you want to permanently change the file context you need to use the
354 semanage fcontext command. This will modify the SELinux labeling data‐
355 base. You will need to use restorecon to apply the labels.
356
357
359 semanage fcontext can also be used to manipulate default file context
360 mappings.
361
362 semanage permissive can also be used to manipulate whether or not a
363 process type is permissive.
364
365 semanage module can also be used to enable/disable/install/remove pol‐
366 icy modules.
367
368 semanage boolean can also be used to manipulate the booleans
369
370
371 system-config-selinux is a GUI tool available to customize SELinux pol‐
372 icy settings.
373
374
376 This manual page was auto-generated using sepolicy manpage .
377
378
380 selinux(8), named(8), semanage(8), restorecon(8), chcon(1), sepol‐
381 icy(8), setsebool(8)
382
383
384
385named 23-10-20 named_selinux(8)