1semanage_selinux(8) SELinux Policy semanage semanage_selinux(8)
2
3
4
6 semanage_selinux - Security Enhanced Linux Policy for the semanage pro‐
7 cesses
8
10 Security-Enhanced Linux secures the semanage processes via flexible
11 mandatory access control.
12
13 The semanage processes execute with the semanage_t SELinux type. You
14 can check if you have these processes running by executing the ps com‐
15 mand with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep semanage_t
20
21
22
24 The semanage_t SELinux type can be entered via the file_type, seman‐
25 age_exec_t, unlabeled_t, proc_type, filesystem_type, mtrr_device_t,
26 sysctl_type file types.
27
28 The default entrypoint paths for the semanage_t domain are the follow‐
29 ing:
30
31 all files on the system, /usr/sbin/semanage, /usr/sbin/semodule,
32 /usr/share/system-config-selinux/system-config-selinux-dbus.py,
33 /dev/cpu/mtrr
34
36 SELinux defines process types (domains) for each process running on the
37 system
38
39 You can see the context of a process using the -Z option to ps
40
41 Policy governs the access confined processes have to files. SELinux
42 semanage policy is very flexible allowing users to setup their semanage
43 processes in as secure a method as possible.
44
45 The following process types are defined for semanage:
46
47 semanage_t
48
49 Note: semanage permissive -a semanage_t can be used to make the process
50 type semanage_t permissive. SELinux does not deny access to permissive
51 process types, but the AVC (SELinux denials) messages are still gener‐
52 ated.
53
54
56 SELinux policy is customizable based on least access required. seman‐
57 age policy is extremely flexible and has several booleans that allow
58 you to manipulate the policy and run semanage with the tightest access
59 possible.
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 unconfined executables to make their heap memory
93 executable. Doing this is a really bad idea. Probably indicates a
94 badly coded executable, but could indicate an attack. This executable
95 should be reported in bugzilla, you must turn on the allow_execheap
96 boolean. Disabled by default.
97
98 setsebool -P allow_execheap 1
99
100
101
102 If you want to allow unconfined executables to map a memory region as
103 both executable and writable, this is dangerous and the executable
104 should be reported in bugzilla), you must turn on the allow_execmem
105 boolean. Enabled by default.
106
107 setsebool -P allow_execmem 1
108
109
110
111 If you want to allow all unconfined executables to use libraries
112 requiring text relocation that are not labeled textrel_shlib_t), you
113 must turn on the allow_execmod boolean. Enabled by default.
114
115 setsebool -P allow_execmod 1
116
117
118
119 If you want to allow unconfined executables to make their stack exe‐
120 cutable. This should never, ever be necessary. Probably indicates a
121 badly coded executable, but could indicate an attack. This executable
122 should be reported in bugzilla), you must turn on the allow_execstack
123 boolean. Enabled by default.
124
125 setsebool -P allow_execstack 1
126
127
128
129 If you want to allow confined applications to run with kerberos, you
130 must turn on the allow_kerberos boolean. Enabled by default.
131
132 setsebool -P allow_kerberos 1
133
134
135
136 If you want to allow sysadm to debug or ptrace all processes, you must
137 turn on the allow_ptrace boolean. Disabled by default.
138
139 setsebool -P allow_ptrace 1
140
141
142
143 If you want to allow system to run with NIS, you must turn on the
144 allow_ypbind boolean. Disabled by default.
145
146 setsebool -P allow_ypbind 1
147
148
149
150 If you want to enable cluster mode for daemons, you must turn on the
151 daemons_enable_cluster_mode boolean. Disabled by default.
152
153 setsebool -P daemons_enable_cluster_mode 1
154
155
156
157 If you want to allow all domains to have the kernel load modules, you
158 must turn on the domain_kernel_load_modules boolean. Disabled by
159 default.
160
161 setsebool -P domain_kernel_load_modules 1
162
163
164
165 If you want to allow all domains to execute in fips_mode, you must turn
166 on the fips_mode boolean. Enabled by default.
167
168 setsebool -P fips_mode 1
169
170
171
172 If you want to enable reading of urandom for all domains, you must turn
173 on the global_ssp boolean. Disabled by default.
174
175 setsebool -P global_ssp 1
176
177
178
179 If you want to enable support for upstart as the init program, you must
180 turn on the init_upstart boolean. Enabled by default.
181
182 setsebool -P init_upstart 1
183
184
185
186 If you want to allow certain domains to map low memory in the kernel,
187 you must turn on the mmap_low_allowed boolean. Disabled by default.
188
189 setsebool -P mmap_low_allowed 1
190
191
192
193 If you want to allow confined applications to use nscd shared memory,
194 you must turn on the nscd_use_shm boolean. Enabled by default.
195
196 setsebool -P nscd_use_shm 1
197
198
199
200 If you want to boolean to determine whether the system permits loading
201 policy, setting enforcing mode, and changing boolean values. Set this
202 to true and you have to reboot to set it back, you must turn on the
203 secure_mode_policyload boolean. Disabled by default.
204
205 setsebool -P secure_mode_policyload 1
206
207
208
209 If you want to support X userspace object manager, you must turn on the
210 xserver_object_manager boolean. Disabled by default.
211
212 setsebool -P xserver_object_manager 1
213
214
215
217 The SELinux process type semanage_t can manage files labeled with the
218 following file types. The paths listed are the default paths for these
219 file types. Note the processes UID still need to have DAC permissions.
220
221 file_type
222
223 all files on the system
224
225
227 SELinux requires files to have an extended attribute to define the file
228 type.
229
230 You can see the context of a file using the -Z option to ls
231
232 Policy governs the access confined processes have to these files.
233 SELinux semanage policy is very flexible allowing users to setup their
234 semanage processes in as secure a method as possible.
235
236 STANDARD FILE CONTEXT
237
238 SELinux defines the file context types for the semanage, if you wanted
239 to store files with these types in a diffent paths, you need to execute
240 the semanage command to sepecify alternate labeling and then use
241 restorecon to put the labels on disk.
242
243 semanage fcontext -a -t semanage_trans_lock_t '/srv/mysemanage_con‐
244 tent(/.*)?'
245 restorecon -R -v /srv/mysemanage_content
246
247 Note: SELinux often uses regular expressions to specify labels that
248 match multiple files.
249
250 The following file types are defined for semanage:
251
252
253
254 semanage_exec_t
255
256 - Set files with the semanage_exec_t type, if you want to transition an
257 executable to the semanage_t domain.
258
259
260 Paths:
261 /usr/sbin/semanage, /usr/sbin/semodule, /usr/share/system-config-
262 selinux/system-config-selinux-dbus.py
263
264
265 semanage_read_lock_t
266
267 - Set files with the semanage_read_lock_t type, if you want to treat
268 the files as semanage read lock data, stored under the /var/lock direc‐
269 tory
270
271
272
273 semanage_store_t
274
275 - Set files with the semanage_store_t type, if you want to treat the
276 files as semanage store data.
277
278
279 Paths:
280 /etc/selinux/([^/]*/)?policy(/.*)?, /etc/selinux/([^/]*/)?mod‐
281 ules/(active|tmp|previous)(/.*)?, /etc/share/selinux/mls(/.*)?,
282 /etc/share/selinux/targeted(/.*)?
283
284
285 semanage_tmp_t
286
287 - Set files with the semanage_tmp_t type, if you want to store semanage
288 temporary files in the /tmp directories.
289
290
291
292 semanage_trans_lock_t
293
294 - Set files with the semanage_trans_lock_t type, if you want to treat
295 the files as semanage trans lock data, stored under the /var/lock
296 directory
297
298
299
300 Note: File context can be temporarily modified with the chcon command.
301 If you want to permanently change the file context you need to use the
302 semanage fcontext command. This will modify the SELinux labeling data‐
303 base. You will need to use restorecon to apply the labels.
304
305
307 semanage fcontext can also be used to manipulate default file context
308 mappings.
309
310 semanage permissive can also be used to manipulate whether or not a
311 process type is permissive.
312
313 semanage module can also be used to enable/disable/install/remove pol‐
314 icy modules.
315
316 semanage boolean can also be used to manipulate the booleans
317
318
319 system-config-selinux is a GUI tool available to customize SELinux pol‐
320 icy settings.
321
322
324 This manual page was auto-generated using sepolicy manpage .
325
326
328 selinux(8), semanage(8), semanage(8), restorecon(8), chcon(1) , setse‐
329 bool(8)
330
331
332
333semanage 15-06-03 semanage_selinux(8)