1rpm_selinux(8) SELinux Policy rpm rpm_selinux(8)
2
3
4
6 rpm_selinux - Security Enhanced Linux Policy for the rpm processes
7
9 Security-Enhanced Linux secures the rpm processes via flexible manda‐
10 tory access control.
11
12 The rpm processes execute with the rpm_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 rpm_t
19
20
21
23 The rpm_t SELinux type can be entered via the file_type, unlabeled_t,
24 proc_type, filesystem_type, rpm_exec_t, mtrr_device_t, sysctl_type,
25 debuginfo_exec_t, rpm_script_exec_t file types.
26
27 The default entrypoint paths for the rpm_t domain are the following:
28
29 all files on the system, /usr/libexec/yumDBUSBackend.py, /bin/rpm,
30 /usr/bin/rpm, /usr/bin/yum, /usr/sbin/pup, /usr/bin/smart,
31 /usr/sbin/bcfg2, /usr/sbin/pirut, /usr/bin/apt-get, /usr/sbin/up2date,
32 /usr/sbin/synaptic, /usr/bin/apt-shell, /usr/sbin/rhn_check,
33 /usr/sbin/rhnreg_ks, /usr/bin/yum-builddep, /usr/sbin/packagekitd,
34 /usr/sbin/yum-updatesd, /usr/bin/package-cleanup, /usr/libexec/pack‐
35 agekitd, /usr/bin/fedora-rmdevelrpms, /usr/bin/rpmdev-rmdevelrpms,
36 /usr/share/yumex/yum_childtask.py, /usr/sbin/system-install-packages,
37 /usr/sbin/yum-complete-transaction, /usr/share/yumex/yumex-yum-backend,
38 /dev/cpu/mtrr, /usr/bin/debuginfo-install
39
41 SELinux defines process types (domains) for each process running on the
42 system
43
44 You can see the context of a process using the -Z option to ps
45
46 Policy governs the access confined processes have to files. SELinux
47 rpm policy is very flexible allowing users to setup their rpm processes
48 in as secure a method as possible.
49
50 The following process types are defined for rpm:
51
52 rpm_t, rpm_script_t
53
54 Note: semanage permissive -a rpm_t can be used to make the process type
55 rpm_t permissive. SELinux does not deny access to permissive process
56 types, but the AVC (SELinux denials) messages are still generated.
57
58
60 SELinux policy is customizable based on least access required. rpm
61 policy is extremely flexible and has several booleans that allow you to
62 manipulate the policy and run rpm with the tightest access possible.
63
64
65
66 If you want to allow all daemons the ability to read/write terminals,
67 you must turn on the allow_daemons_use_tty boolean. Disabled by
68 default.
69
70 setsebool -P allow_daemons_use_tty 1
71
72
73
74 If you want to allow all domains to use other domains file descriptors,
75 you must turn on the allow_domain_fd_use boolean. Enabled by default.
76
77 setsebool -P allow_domain_fd_use 1
78
79
80
81 If you want to allow unconfined executables to make their heap memory
82 executable. Doing this is a really bad idea. Probably indicates a
83 badly coded executable, but could indicate an attack. This executable
84 should be reported in bugzilla, you must turn on the allow_execheap
85 boolean. Disabled by default.
86
87 setsebool -P allow_execheap 1
88
89
90
91 If you want to allow unconfined executables to map a memory region as
92 both executable and writable, this is dangerous and the executable
93 should be reported in bugzilla), you must turn on the allow_execmem
94 boolean. Enabled by default.
95
96 setsebool -P allow_execmem 1
97
98
99
100 If you want to allow all unconfined executables to use libraries
101 requiring text relocation that are not labeled textrel_shlib_t), you
102 must turn on the allow_execmod boolean. Enabled by default.
103
104 setsebool -P allow_execmod 1
105
106
107
108 If you want to allow unconfined executables to make their stack exe‐
109 cutable. This should never, ever be necessary. Probably indicates a
110 badly coded executable, but could indicate an attack. This executable
111 should be reported in bugzilla), you must turn on the allow_execstack
112 boolean. Enabled by default.
113
114 setsebool -P allow_execstack 1
115
116
117
118 If you want to allow confined applications to run with kerberos, you
119 must turn on the allow_kerberos boolean. Enabled by default.
120
121 setsebool -P allow_kerberos 1
122
123
124
125 If you want to allow sysadm to debug or ptrace all processes, you must
126 turn on the allow_ptrace boolean. Disabled by default.
127
128 setsebool -P allow_ptrace 1
129
130
131
132 If you want to allow system to run with NIS, you must turn on the
133 allow_ypbind boolean. Disabled by default.
134
135 setsebool -P allow_ypbind 1
136
137
138
139 If you want to allow all domains to have the kernel load modules, you
140 must turn on the domain_kernel_load_modules boolean. Disabled by
141 default.
142
143 setsebool -P domain_kernel_load_modules 1
144
145
146
147 If you want to allow all domains to execute in fips_mode, you must turn
148 on the fips_mode boolean. Enabled by default.
149
150 setsebool -P fips_mode 1
151
152
153
154 If you want to enable reading of urandom for all domains, you must turn
155 on the global_ssp boolean. Disabled by default.
156
157 setsebool -P global_ssp 1
158
159
160
161 If you want to allow certain domains to map low memory in the kernel,
162 you must turn on the mmap_low_allowed boolean. Disabled by default.
163
164 setsebool -P mmap_low_allowed 1
165
166
167
168 If you want to allow confined applications to use nscd shared memory,
169 you must turn on the nscd_use_shm boolean. Enabled by default.
170
171 setsebool -P nscd_use_shm 1
172
173
174
175 If you want to boolean to determine whether the system permits loading
176 policy, setting enforcing mode, and changing boolean values. Set this
177 to true and you have to reboot to set it back, you must turn on the
178 secure_mode_policyload boolean. Disabled by default.
179
180 setsebool -P secure_mode_policyload 1
181
182
183
184 If you want to support X userspace object manager, you must turn on the
185 xserver_object_manager boolean. Disabled by default.
186
187 setsebool -P xserver_object_manager 1
188
189
190
192 The SELinux process type rpm_t can manage files labeled with the fol‐
193 lowing file types. The paths listed are the default paths for these
194 file types. Note the processes UID still need to have DAC permissions.
195
196 file_type
197
198 all files on the system
199
200
202 SELinux requires files to have an extended attribute to define the file
203 type.
204
205 You can see the context of a file using the -Z option to ls
206
207 Policy governs the access confined processes have to these files.
208 SELinux rpm policy is very flexible allowing users to setup their rpm
209 processes in as secure a method as possible.
210
211 STANDARD FILE CONTEXT
212
213 SELinux defines the file context types for the rpm, if you wanted to
214 store files with these types in a diffent paths, you need to execute
215 the semanage command to sepecify alternate labeling and then use
216 restorecon to put the labels on disk.
217
218 semanage fcontext -a -t rpm_var_run_t '/srv/myrpm_content(/.*)?'
219 restorecon -R -v /srv/myrpm_content
220
221 Note: SELinux often uses regular expressions to specify labels that
222 match multiple files.
223
224 The following file types are defined for rpm:
225
226
227
228 rpm_exec_t
229
230 - Set files with the rpm_exec_t type, if you want to transition an exe‐
231 cutable to the rpm_t domain.
232
233
234 Paths:
235 /usr/libexec/yumDBUSBackend.py, /bin/rpm, /usr/bin/rpm,
236 /usr/bin/yum, /usr/sbin/pup, /usr/bin/smart, /usr/sbin/bcfg2,
237 /usr/sbin/pirut, /usr/bin/apt-get, /usr/sbin/up2date,
238 /usr/sbin/synaptic, /usr/bin/apt-shell, /usr/sbin/rhn_check,
239 /usr/sbin/rhnreg_ks, /usr/bin/yum-builddep, /usr/sbin/packagekitd,
240 /usr/sbin/yum-updatesd, /usr/bin/package-cleanup,
241 /usr/libexec/packagekitd, /usr/bin/fedora-rmdevelrpms,
242 /usr/bin/rpmdev-rmdevelrpms, /usr/share/yumex/yum_childtask.py,
243 /usr/sbin/system-install-packages, /usr/sbin/yum-complete-transac‐
244 tion, /usr/share/yumex/yumex-yum-backend
245
246
247 rpm_file_t
248
249 - Set files with the rpm_file_t type, if you want to treat the files as
250 rpm content.
251
252
253
254 rpm_log_t
255
256 - Set files with the rpm_log_t type, if you want to treat the data as
257 rpm log data, usually stored under the /var/log directory.
258
259
260
261 rpm_script_exec_t
262
263 - Set files with the rpm_script_exec_t type, if you want to transition
264 an executable to the rpm_script_t domain.
265
266
267
268 rpm_script_tmp_t
269
270 - Set files with the rpm_script_tmp_t type, if you want to store rpm
271 script temporary files in the /tmp directories.
272
273
274
275 rpm_script_tmpfs_t
276
277 - Set files with the rpm_script_tmpfs_t type, if you want to store rpm
278 script files on a tmpfs file system.
279
280
281
282 rpm_tmp_t
283
284 - Set files with the rpm_tmp_t type, if you want to store rpm temporary
285 files in the /tmp directories.
286
287
288
289 rpm_tmpfs_t
290
291 - Set files with the rpm_tmpfs_t type, if you want to store rpm files
292 on a tmpfs file system.
293
294
295
296 rpm_var_cache_t
297
298 - Set files with the rpm_var_cache_t type, if you want to store the
299 files under the /var/cache directory.
300
301
302 Paths:
303 /var/cache/yum(/.*)?, /var/spool/up2date(/.*)?
304
305
306 rpm_var_lib_t
307
308 - Set files with the rpm_var_lib_t type, if you want to store the rpm
309 files under the /var/lib directory.
310
311
312 Paths:
313 /var/lib/rpm(/.*)?, /var/lib/yum(/.*)?, /var/lib/alterna‐
314 tives(/.*)?
315
316
317 rpm_var_run_t
318
319 - Set files with the rpm_var_run_t type, if you want to store the rpm
320 files under the /run or /var/run directory.
321
322
323 Paths:
324 /var/run/yum.*, /var/run/PackageKit(/.*)?
325
326
327 Note: File context can be temporarily modified with the chcon command.
328 If you want to permanently change the file context you need to use the
329 semanage fcontext command. This will modify the SELinux labeling data‐
330 base. You will need to use restorecon to apply the labels.
331
332
334 semanage fcontext can also be used to manipulate default file context
335 mappings.
336
337 semanage permissive can also be used to manipulate whether or not a
338 process type is permissive.
339
340 semanage module can also be used to enable/disable/install/remove pol‐
341 icy modules.
342
343 semanage boolean can also be used to manipulate the booleans
344
345
346 system-config-selinux is a GUI tool available to customize SELinux pol‐
347 icy settings.
348
349
351 This manual page was auto-generated using sepolicy manpage .
352
353
355 selinux(8), rpm(8), semanage(8), restorecon(8), chcon(1) , setse‐
356 bool(8), rpm_script_selinux(8), rpm_script_selinux(8)
357
358
359
360rpm 15-06-03 rpm_selinux(8)