1nscd_selinux(8) SELinux Policy nscd nscd_selinux(8)
2
3
4
6 nscd_selinux - Security Enhanced Linux Policy for the nscd processes
7
9 Security-Enhanced Linux secures the nscd processes via flexible manda‐
10 tory access control.
11
12 The nscd processes execute with the nscd_t SELinux type. You can check
13 if you have these processes running by executing the ps command with
14 the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep nscd_t
19
20
21
23 The nscd_t SELinux type can be entered via the nscd_exec_t file type.
24
25 The default entrypoint paths for the nscd_t domain are the following:
26
27 /usr/sbin/nscd
28
30 SELinux defines process types (domains) for each process running on the
31 system
32
33 You can see the context of a process using the -Z option to ps
34
35 Policy governs the access confined processes have to files. SELinux
36 nscd policy is very flexible allowing users to setup their nscd pro‐
37 cesses in as secure a method as possible.
38
39 The following process types are defined for nscd:
40
41 nscd_t
42
43 Note: semanage permissive -a nscd_t can be used to make the process
44 type nscd_t permissive. SELinux does not deny access to permissive
45 process types, but the AVC (SELinux denials) messages are still gener‐
46 ated.
47
48
50 SELinux policy is customizable based on least access required. nscd
51 policy is extremely flexible and has several booleans that allow you to
52 manipulate the policy and run nscd with the tightest access possible.
53
54
55
56 If you want to allow confined applications to use nscd shared memory,
57 you must turn on the nscd_use_shm boolean. Enabled by default.
58
59 setsebool -P nscd_use_shm 1
60
61
62
63 If you want to allow all daemons to write corefiles to /, you must turn
64 on the allow_daemons_dump_core boolean. Disabled by default.
65
66 setsebool -P allow_daemons_dump_core 1
67
68
69
70 If you want to allow all daemons to use tcp wrappers, you must turn on
71 the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
72
73 setsebool -P allow_daemons_use_tcp_wrapper 1
74
75
76
77 If you want to allow all daemons the ability to read/write terminals,
78 you must turn on the allow_daemons_use_tty boolean. Disabled by
79 default.
80
81 setsebool -P allow_daemons_use_tty 1
82
83
84
85 If you want to allow all domains to use other domains file descriptors,
86 you must turn on the allow_domain_fd_use boolean. Enabled by default.
87
88 setsebool -P allow_domain_fd_use 1
89
90
91
92 If you want to allow confined applications to run with kerberos, you
93 must turn on the allow_kerberos boolean. Enabled by default.
94
95 setsebool -P allow_kerberos 1
96
97
98
99 If you want to allow sysadm to debug or ptrace all processes, you must
100 turn on the allow_ptrace boolean. Disabled by default.
101
102 setsebool -P allow_ptrace 1
103
104
105
106 If you want to allow host key based authentication, you must turn on
107 the allow_ssh_keysign boolean. Disabled by default.
108
109 setsebool -P allow_ssh_keysign 1
110
111
112
113 If you want to allow system to run with NIS, you must turn on the
114 allow_ypbind boolean. Disabled by default.
115
116 setsebool -P allow_ypbind 1
117
118
119
120 If you want to enable cluster mode for daemons, you must turn on the
121 daemons_enable_cluster_mode boolean. Disabled by default.
122
123 setsebool -P daemons_enable_cluster_mode 1
124
125
126
127 If you want to allow all domains to have the kernel load modules, you
128 must turn on the domain_kernel_load_modules boolean. Disabled by
129 default.
130
131 setsebool -P domain_kernel_load_modules 1
132
133
134
135 If you want to allow all domains to execute in fips_mode, you must turn
136 on the fips_mode boolean. Enabled by default.
137
138 setsebool -P fips_mode 1
139
140
141
142 If you want to enable reading of urandom for all domains, you must turn
143 on the global_ssp boolean. Disabled by default.
144
145 setsebool -P global_ssp 1
146
147
148
149 If you want to enable support for upstart as the init program, you must
150 turn on the init_upstart boolean. Enabled by default.
151
152 setsebool -P init_upstart 1
153
154
155
156 If you want to allow samba to act as the domain controller, add users,
157 groups and change passwords, you must turn on the samba_domain_con‐
158 troller boolean. Disabled by default.
159
160 setsebool -P samba_domain_controller 1
161
162
163
165 The SELinux process type nscd_t can manage files labeled with the fol‐
166 lowing file types. The paths listed are the default paths for these
167 file types. Note the processes UID still need to have DAC permissions.
168
169 cluster_conf_t
170
171 /etc/cluster(/.*)?
172
173 cluster_var_lib_t
174
175 /var/lib(64)?/openais(/.*)?
176 /var/lib(64)?/pengine(/.*)?
177 /var/lib(64)?/corosync(/.*)?
178 /usr/lib(64)?/heartbeat(/.*)?
179 /var/lib(64)?/heartbeat(/.*)?
180 /var/lib(64)?/pacemaker(/.*)?
181 /var/lib/cluster(/.*)?
182
183 cluster_var_run_t
184
185 /var/run/crm(/.*)?
186 /var/run/cman_.*
187 /var/run/rsctmp(/.*)?
188 /var/run/aisexec.*
189 /var/run/heartbeat(/.*)?
190 /var/run/cpglockd.pid
191 /var/run/corosync.pid
192 /var/run/rgmanager.pid
193 /var/run/cluster/rgmanager.sk
194
195 initrc_tmp_t
196
197
198 mnt_t
199
200 /mnt(/[^/]*)
201 /mnt(/[^/]*)?
202 /rhev(/[^/]*)?
203 /media(/[^/]*)
204 /media(/[^/]*)?
205 /etc/rhgb(/.*)?
206 /media/.hal-.*
207 /net
208 /afs
209 /rhev
210 /misc
211
212 nscd_log_t
213
214 /var/log/nscd.log.*
215
216 nscd_var_run_t
217
218 /var/db/nscd(/.*)?
219 /var/run/nscd(/.*)?
220 /var/cache/nscd(/.*)?
221 /var/run/nscd.pid
222 /var/run/.nscd_socket
223
224 root_t
225
226 /
227 /initrd
228
229 security_t
230
231
232 tmp_t
233
234 /tmp
235 /usr/tmp
236 /var/tmp
237 /tmp-inst
238 /var/tmp-inst
239 /var/tmp/vi.recover
240
241
243 SELinux requires files to have an extended attribute to define the file
244 type.
245
246 You can see the context of a file using the -Z option to ls
247
248 Policy governs the access confined processes have to these files.
249 SELinux nscd policy is very flexible allowing users to setup their nscd
250 processes in as secure a method as possible.
251
252 EQUIVALENCE DIRECTORIES
253
254
255 nscd policy stores data with multiple different file context types
256 under the /var/run/nscd directory. If you would like to store the data
257 in a different directory you can use the semanage command to create an
258 equivalence mapping. If you wanted to store this data under the /srv
259 dirctory you would execute the following command:
260
261 semanage fcontext -a -e /var/run/nscd /srv/nscd
262 restorecon -R -v /srv/nscd
263
264 STANDARD FILE CONTEXT
265
266 SELinux defines the file context types for the nscd, if you wanted to
267 store files with these types in a diffent paths, you need to execute
268 the semanage command to sepecify alternate labeling and then use
269 restorecon to put the labels on disk.
270
271 semanage fcontext -a -t nscd_var_run_t '/srv/mynscd_content(/.*)?'
272 restorecon -R -v /srv/mynscd_content
273
274 Note: SELinux often uses regular expressions to specify labels that
275 match multiple files.
276
277 The following file types are defined for nscd:
278
279
280
281 nscd_exec_t
282
283 - Set files with the nscd_exec_t type, if you want to transition an
284 executable to the nscd_t domain.
285
286
287
288 nscd_initrc_exec_t
289
290 - Set files with the nscd_initrc_exec_t type, if you want to transition
291 an executable to the nscd_initrc_t domain.
292
293
294
295 nscd_log_t
296
297 - Set files with the nscd_log_t type, if you want to treat the data as
298 nscd log data, usually stored under the /var/log directory.
299
300
301
302 nscd_var_run_t
303
304 - Set files with the nscd_var_run_t type, if you want to store the nscd
305 files under the /run or /var/run directory.
306
307
308 Paths:
309 /var/db/nscd(/.*)?, /var/run/nscd(/.*)?, /var/cache/nscd(/.*)?,
310 /var/run/nscd.pid, /var/run/.nscd_socket
311
312
313 Note: File context can be temporarily modified with the chcon command.
314 If you want to permanently change the file context you need to use the
315 semanage fcontext command. This will modify the SELinux labeling data‐
316 base. You will need to use restorecon to apply the labels.
317
318
320 semanage fcontext can also be used to manipulate default file context
321 mappings.
322
323 semanage permissive can also be used to manipulate whether or not a
324 process type is permissive.
325
326 semanage module can also be used to enable/disable/install/remove pol‐
327 icy modules.
328
329 semanage boolean can also be used to manipulate the booleans
330
331
332 system-config-selinux is a GUI tool available to customize SELinux pol‐
333 icy settings.
334
335
337 This manual page was auto-generated using sepolicy manpage .
338
339
341 selinux(8), nscd(8), semanage(8), restorecon(8), chcon(1) , setse‐
342 bool(8)
343
344
345
346nscd 15-06-03 nscd_selinux(8)