1nsd_selinux(8) SELinux Policy nsd nsd_selinux(8)
2
3
4
6 nsd_selinux - Security Enhanced Linux Policy for the nsd processes
7
9 Security-Enhanced Linux secures the nsd processes via flexible manda‐
10 tory access control.
11
12 The nsd processes execute with the nsd_t SELinux type. You can check if
13 you have these processes running by executing the ps command with the
14 -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep nsd_t
19
20
21
23 The nsd_t SELinux type can be entered via the nsd_exec_t file type.
24
25 The default entrypoint paths for the nsd_t domain are the following:
26
27 /usr/sbin/nsd, /usr/sbin/nsdc, /usr/sbin/zonec, /usr/sbin/nsd-notify,
28 /usr/sbin/nsd-control, /usr/sbin/nsd-checkconf, /usr/sbin/nsd-check‐
29 zone, /usr/sbin/nsd-control-setup
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 nsd policy is very flexible allowing users to setup their nsd processes
39 in as secure a method as possible.
40
41 The following process types are defined for nsd:
42
43 nsd_t, nsd_crond_t
44
45 Note: semanage permissive -a nsd_t can be used to make the process type
46 nsd_t permissive. SELinux does not deny access to permissive process
47 types, but the AVC (SELinux denials) messages are still generated.
48
49
51 SELinux policy is customizable based on least access required. nsd
52 policy is extremely flexible and has several booleans that allow you to
53 manipulate the policy and run nsd with the tightest access possible.
54
55
56
57 If you want to allow users to resolve user passwd entries directly from
58 ldap rather then using a sssd server, you must turn on the authlo‐
59 gin_nsswitch_use_ldap boolean. Disabled by default.
60
61 setsebool -P authlogin_nsswitch_use_ldap 1
62
63
64
65 If you want to allow all daemons to write corefiles to /, you must turn
66 on the daemons_dump_core boolean. Disabled by default.
67
68 setsebool -P daemons_dump_core 1
69
70
71
72 If you want to enable cluster mode for daemons, you must turn on the
73 daemons_enable_cluster_mode boolean. Enabled by default.
74
75 setsebool -P daemons_enable_cluster_mode 1
76
77
78
79 If you want to allow all daemons to use tcp wrappers, you must turn on
80 the daemons_use_tcp_wrapper boolean. Disabled by default.
81
82 setsebool -P daemons_use_tcp_wrapper 1
83
84
85
86 If you want to allow all daemons the ability to read/write terminals,
87 you must turn on the daemons_use_tty boolean. Disabled by default.
88
89 setsebool -P daemons_use_tty 1
90
91
92
93 If you want to deny any process from ptracing or debugging any other
94 processes, you must turn on the deny_ptrace boolean. Enabled by
95 default.
96
97 setsebool -P deny_ptrace 1
98
99
100
101 If you want to allow any process to mmap any file on system with
102 attribute file_type, you must turn on the domain_can_mmap_files bool‐
103 ean. Enabled by default.
104
105 setsebool -P domain_can_mmap_files 1
106
107
108
109 If you want to allow all domains write to kmsg_device, while kernel is
110 executed with systemd.log_target=kmsg parameter, you must turn on the
111 domain_can_write_kmsg boolean. Disabled by default.
112
113 setsebool -P domain_can_write_kmsg 1
114
115
116
117 If you want to allow all domains to use other domains file descriptors,
118 you must turn on the domain_fd_use boolean. Enabled by default.
119
120 setsebool -P domain_fd_use 1
121
122
123
124 If you want to allow all domains to have the kernel load modules, you
125 must turn on the domain_kernel_load_modules boolean. Disabled by
126 default.
127
128 setsebool -P domain_kernel_load_modules 1
129
130
131
132 If you want to allow all domains to execute in fips_mode, you must turn
133 on the fips_mode boolean. Enabled by default.
134
135 setsebool -P fips_mode 1
136
137
138
139 If you want to enable reading of urandom for all domains, you must turn
140 on the global_ssp boolean. Disabled by default.
141
142 setsebool -P global_ssp 1
143
144
145
146 If you want to allow confined applications to run with kerberos, you
147 must turn on the kerberos_enabled boolean. Enabled by default.
148
149 setsebool -P kerberos_enabled 1
150
151
152
153 If you want to allow system to run with NIS, you must turn on the
154 nis_enabled boolean. Disabled by default.
155
156 setsebool -P nis_enabled 1
157
158
159
160 If you want to allow confined applications to use nscd shared memory,
161 you must turn on the nscd_use_shm boolean. Disabled by default.
162
163 setsebool -P nscd_use_shm 1
164
165
166
168 SELinux defines port types to represent TCP and UDP ports.
169
170 You can see the types associated with a port by using the following
171 command:
172
173 semanage port -l
174
175
176 Policy governs the access confined processes have to these ports.
177 SELinux nsd policy is very flexible allowing users to setup their nsd
178 processes in as secure a method as possible.
179
180 The following port types are defined for nsd:
181
182
183 nsd_control_port_t
184
185
186
187 Default Defined Ports:
188 tcp 8952
189
191 The SELinux process type nsd_t can manage files labeled with the fol‐
192 lowing file types. The paths listed are the default paths for these
193 file types. Note the processes UID still need to have DAC permissions.
194
195 cluster_conf_t
196
197 /etc/cluster(/.*)?
198
199 cluster_var_lib_t
200
201 /var/lib/pcsd(/.*)?
202 /var/lib/cluster(/.*)?
203 /var/lib/openais(/.*)?
204 /var/lib/pengine(/.*)?
205 /var/lib/corosync(/.*)?
206 /usr/lib/heartbeat(/.*)?
207 /var/lib/heartbeat(/.*)?
208 /var/lib/pacemaker(/.*)?
209
210 cluster_var_run_t
211
212 /var/run/crm(/.*)?
213 /var/run/cman_.*
214 /var/run/rsctmp(/.*)?
215 /var/run/aisexec.*
216 /var/run/heartbeat(/.*)?
217 /var/run/corosync-qnetd(/.*)?
218 /var/run/corosync-qdevice(/.*)?
219 /var/run/cpglockd.pid
220 /var/run/corosync.pid
221 /var/run/rgmanager.pid
222 /var/run/cluster/rgmanager.sk
223
224 nsd_conf_t
225
226 /etc/nsd(/.*)?
227
228 nsd_log_t
229
230 /var/log/nsd.log.*
231
232 nsd_tmp_t
233
234
235 nsd_var_run_t
236
237 /var/run/nsd.pid
238
239 nsd_zone_t
240
241 /var/lib/nsd(/.*)?
242 /etc/nsd/primary(/.*)?
243 /etc/nsd/secondary(/.*)?
244 /etc/nsd/nsd.db
245
246 root_t
247
248 /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
249 /
250 /initrd
251
252
254 SELinux requires files to have an extended attribute to define the file
255 type.
256
257 You can see the context of a file using the -Z option to ls
258
259 Policy governs the access confined processes have to these files.
260 SELinux nsd policy is very flexible allowing users to setup their nsd
261 processes in as secure a method as possible.
262
263 STANDARD FILE CONTEXT
264
265 SELinux defines the file context types for the nsd, if you wanted to
266 store files with these types in a diffent paths, you need to execute
267 the semanage command to sepecify alternate labeling and then use
268 restorecon to put the labels on disk.
269
270 semanage fcontext -a -t nsd_zone_t '/srv/mynsd_content(/.*)?'
271 restorecon -R -v /srv/mynsd_content
272
273 Note: SELinux often uses regular expressions to specify labels that
274 match multiple files.
275
276 The following file types are defined for nsd:
277
278
279
280 nsd_conf_t
281
282 - Set files with the nsd_conf_t type, if you want to treat the files as
283 nsd configuration data, usually stored under the /etc directory.
284
285
286
287 nsd_exec_t
288
289 - Set files with the nsd_exec_t type, if you want to transition an exe‐
290 cutable to the nsd_t domain.
291
292
293 Paths:
294 /usr/sbin/nsd, /usr/sbin/nsdc, /usr/sbin/zonec, /usr/sbin/nsd-
295 notify, /usr/sbin/nsd-control, /usr/sbin/nsd-checkconf,
296 /usr/sbin/nsd-checkzone, /usr/sbin/nsd-control-setup
297
298
299 nsd_log_t
300
301 - Set files with the nsd_log_t type, if you want to treat the data as
302 nsd log data, usually stored under the /var/log directory.
303
304
305
306 nsd_tmp_t
307
308 - Set files with the nsd_tmp_t type, if you want to store nsd temporary
309 files in the /tmp directories.
310
311
312
313 nsd_var_run_t
314
315 - Set files with the nsd_var_run_t type, if you want to store the nsd
316 files under the /run or /var/run directory.
317
318
319
320 nsd_zone_t
321
322 - Set files with the nsd_zone_t type, if you want to treat the files as
323 nsd zone data.
324
325
326 Paths:
327 /var/lib/nsd(/.*)?, /etc/nsd/primary(/.*)?, /etc/nsd/sec‐
328 ondary(/.*)?, /etc/nsd/nsd.db
329
330
331 Note: File context can be temporarily modified with the chcon command.
332 If you want to permanently change the file context you need to use the
333 semanage fcontext command. This will modify the SELinux labeling data‐
334 base. You will need to use restorecon to apply the labels.
335
336
338 semanage fcontext can also be used to manipulate default file context
339 mappings.
340
341 semanage permissive can also be used to manipulate whether or not a
342 process type is permissive.
343
344 semanage module can also be used to enable/disable/install/remove pol‐
345 icy modules.
346
347 semanage port can also be used to manipulate the port definitions
348
349 semanage boolean can also be used to manipulate the booleans
350
351
352 system-config-selinux is a GUI tool available to customize SELinux pol‐
353 icy settings.
354
355
357 This manual page was auto-generated using sepolicy manpage .
358
359
361 selinux(8), nsd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) ,
362 setsebool(8), nsd_crond_selinux(8)
363
364
365
366nsd 19-04-25 nsd_selinux(8)