1rpm_selinux(8)                SELinux Policy rpm                rpm_selinux(8)
2
3
4

NAME

6       rpm_selinux - Security Enhanced Linux Policy for the rpm processes
7

DESCRIPTION

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

ENTRYPOINTS

23       The rpm_t SELinux  type  can  be  entered  via  the  rpm_script_exec_t,
24       rpm_exec_t, debuginfo_exec_t file types.
25
26       The default entrypoint paths for the rpm_t domain are the following:
27
28       /usr/bin/dnf-[0-9]+,                 /usr/sbin/rhn_check-[0-9]+.[0-9]+,
29       /usr/libexec/yumDBUSBackend.py, /bin/rpm,  /usr/bin/dnf,  /usr/bin/rpm,
30       /usr/bin/yum,      /usr/bin/zif,     /usr/sbin/pup,     /usr/bin/smart,
31       /usr/sbin/bcfg2, /usr/sbin/pirut, /usr/bin/apt-get,  /bin/yum-builddep,
32       /usr/sbin/up2date,        /usr/bin/repoquery,       /usr/sbin/yum-cron,
33       /usr/sbin/synaptic,      /usr/bin/apt-shell,       /usr/sbin/rhn_check,
34       /usr/sbin/rhnreg_ks,    /usr/bin/anaconda-yum,   /usr/bin/yum-builddep,
35       /usr/sbin/packagekitd, /usr/bin/dnf-automatic,  /usr/sbin/yum-updatesd,
36       /usr/bin/yum-deprecated,   /usr/libexec/packagekitd,  /usr/bin/package-
37       cleanup,   /usr/bin/fedora-rmdevelrpms,    /usr/bin/rpmdev-rmdevelrpms,
38       /usr/sbin/system-install-packages,   /usr/share/yumex/yum_childtask.py,
39       /usr/sbin/yum-complete-transaction, /usr/share/yumex/yumex-yum-backend,
40       /usr/libexec/pegasus/pycmpiLMI_Software-cimprovagt, /usr/bin/debuginfo-
41       install
42

PROCESS TYPES

44       SELinux defines process types (domains) for each process running on the
45       system
46
47       You can see the context of a process using the -Z option to ps
48
49       Policy  governs  the  access confined processes have to files.  SELinux
50       rpm policy is very flexible allowing users to setup their rpm processes
51       in as secure a method as possible.
52
53       The following process types are defined for rpm:
54
55       rpm_t, rpm_script_t
56
57       Note: semanage permissive -a rpm_t can be used to make the process type
58       rpm_t permissive. SELinux does not deny access  to  permissive  process
59       types, but the AVC (SELinux denials) messages are still generated.
60
61

BOOLEANS

63       SELinux  policy  is  customizable  based on least access required.  rpm
64       policy is extremely flexible and has several booleans that allow you to
65       manipulate the policy and run rpm with the tightest access possible.
66
67
68
69       If you want to allow users to resolve user passwd entries directly from
70       ldap rather then using a sssd server, you  must  turn  on  the  authlo‐
71       gin_nsswitch_use_ldap boolean. Disabled by default.
72
73       setsebool -P authlogin_nsswitch_use_ldap 1
74
75
76
77       If  you  want to allow all daemons the ability to read/write terminals,
78       you must turn on the daemons_use_tty boolean. Disabled by default.
79
80       setsebool -P daemons_use_tty 1
81
82
83
84       If you want to deny user domains applications to map a memory region as
85       both  executable  and  writable,  this  is dangerous and the executable
86       should be reported in bugzilla, you must turn on the deny_execmem bool‐
87       ean. Enabled by default.
88
89       setsebool -P deny_execmem 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 control the ability to mmap a low area of the address
154       space, as configured by /proc/sys/vm/mmap_min_addr, you  must  turn  on
155       the mmap_low_allowed boolean. Disabled by default.
156
157       setsebool -P mmap_low_allowed 1
158
159
160
161       If  you  want  to  allow  system  to run with NIS, you must turn on the
162       nis_enabled boolean. Disabled by default.
163
164       setsebool -P nis_enabled 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. Disabled by default.
170
171       setsebool -P nscd_use_shm 1
172
173
174
175       If  you  want  to  disable  kernel module loading, you must turn on the
176       secure_mode_insmod boolean. Enabled by default.
177
178       setsebool -P secure_mode_insmod 1
179
180
181
182       If you want to boolean to determine whether the system permits  loading
183       policy,  setting enforcing mode, and changing boolean values.  Set this
184       to true and you have to reboot to set it back, you  must  turn  on  the
185       secure_mode_policyload boolean. Enabled by default.
186
187       setsebool -P secure_mode_policyload 1
188
189
190
191       If  you  want to allow unconfined executables to make their heap memory
192       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
193       badly  coded  executable, but could indicate an attack. This executable
194       should  be  reported  in  bugzilla,  you  must  turn  on   the   selin‐
195       uxuser_execheap boolean. Disabled by default.
196
197       setsebool -P selinuxuser_execheap 1
198
199
200
201       If  you  want  to  allow  all  unconfined  executables to use libraries
202       requiring text relocation that are  not  labeled  textrel_shlib_t,  you
203       must turn on the selinuxuser_execmod boolean. Enabled by default.
204
205       setsebool -P selinuxuser_execmod 1
206
207
208
209       If  you  want  to allow unconfined executables to make their stack exe‐
210       cutable.  This should never, ever be necessary.  Probably  indicates  a
211       badly  coded  executable, but could indicate an attack. This executable
212       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
213       stack boolean. Enabled by default.
214
215       setsebool -P selinuxuser_execstack 1
216
217
218
219       If you want to support X userspace object manager, you must turn on the
220       xserver_object_manager boolean. Enabled by default.
221
222       setsebool -P xserver_object_manager 1
223
224
225

MANAGED FILES

227       The SELinux process type rpm_t can manage files labeled with  the  fol‐
228       lowing  file  types.   The paths listed are the default paths for these
229       file types.  Note the processes UID still need to have DAC permissions.
230
231       file_type
232
233            all files on the system
234
235

FILE CONTEXTS

237       SELinux requires files to have an extended attribute to define the file
238       type.
239
240       You can see the context of a file using the -Z option to ls
241
242       Policy  governs  the  access  confined  processes  have to these files.
243       SELinux rpm policy is very flexible allowing users to setup  their  rpm
244       processes in as secure a method as possible.
245
246       EQUIVALENCE DIRECTORIES
247
248
249       rpm policy stores data with multiple different file context types under
250       the /var/lib/rpm directory.  If you would like to store the data  in  a
251       different  directory  you  can  use  the  semanage command to create an
252       equivalence mapping.  If you wanted to store this data under  the  /srv
253       dirctory you would execute the following command:
254
255       semanage fcontext -a -e /var/lib/rpm /srv/rpm
256       restorecon -R -v /srv/rpm
257
258       STANDARD FILE CONTEXT
259
260       SELinux  defines  the  file context types for the rpm, if you wanted to
261       store files with these types in a diffent paths, you  need  to  execute
262       the  semanage  command  to  sepecify  alternate  labeling  and then use
263       restorecon to put the labels on disk.
264
265       semanage fcontext -a -t rpm_var_run_t '/srv/myrpm_content(/.*)?'
266       restorecon -R -v /srv/myrpm_content
267
268       Note: SELinux often uses regular expressions  to  specify  labels  that
269       match multiple files.
270
271       The following file types are defined for rpm:
272
273
274
275       rpm_exec_t
276
277       - Set files with the rpm_exec_t type, if you want to transition an exe‐
278       cutable to the rpm_t domain.
279
280
281       Paths:
282            /usr/bin/dnf-[0-9]+,            /usr/sbin/rhn_check-[0-9]+.[0-9]+,
283            /usr/libexec/yumDBUSBackend.py,       /bin/rpm,      /usr/bin/dnf,
284            /usr/bin/rpm,    /usr/bin/yum,    /usr/bin/zif,     /usr/sbin/pup,
285            /usr/bin/smart,  /usr/sbin/bcfg2,  /usr/sbin/pirut,  /usr/bin/apt-
286            get,  /bin/yum-builddep,  /usr/sbin/up2date,   /usr/bin/repoquery,
287            /usr/sbin/yum-cron,     /usr/sbin/synaptic,    /usr/bin/apt-shell,
288            /usr/sbin/rhn_check,  /usr/sbin/rhnreg_ks,  /usr/bin/anaconda-yum,
289            /usr/bin/yum-builddep,  /usr/sbin/packagekitd,  /usr/bin/dnf-auto‐
290            matic,      /usr/sbin/yum-updatesd,       /usr/bin/yum-deprecated,
291            /usr/libexec/packagekitd,                /usr/bin/package-cleanup,
292            /usr/bin/fedora-rmdevelrpms,          /usr/bin/rpmdev-rmdevelrpms,
293            /usr/sbin/system-install-packages,     /usr/share/yumex/yum_child‐
294            task.py,                       /usr/sbin/yum-complete-transaction,
295            /usr/share/yumex/yumex-yum-backend,             /usr/libexec/pega‐
296            sus/pycmpiLMI_Software-cimprovagt
297
298
299       rpm_file_t
300
301       - Set files with the rpm_file_t type, if you want to treat the files as
302       rpm content.
303
304
305
306       rpm_log_t
307
308       -  Set  files with the rpm_log_t type, if you want to treat the data as
309       rpm log data, usually stored under the /var/log directory.
310
311
312       Paths:
313            /var/log/yum.log.*, /var/log/up2date.*
314
315
316       rpm_script_exec_t
317
318       - Set files with the rpm_script_exec_t type, if you want to  transition
319       an executable to the rpm_script_t domain.
320
321
322
323       rpm_script_tmp_t
324
325       -  Set  files  with the rpm_script_tmp_t type, if you want to store rpm
326       script temporary files in the /tmp directories.
327
328
329
330       rpm_script_tmpfs_t
331
332       - Set files with the rpm_script_tmpfs_t type, if you want to store  rpm
333       script files on a tmpfs file system.
334
335
336
337       rpm_tmp_t
338
339       - Set files with the rpm_tmp_t type, if you want to store rpm temporary
340       files in the /tmp directories.
341
342
343
344       rpm_tmpfs_t
345
346       - Set files with the rpm_tmpfs_t type, if you want to store  rpm  files
347       on a tmpfs file system.
348
349
350
351       rpm_var_cache_t
352
353       -  Set  files  with  the rpm_var_cache_t type, if you want to store the
354       files under the /var/cache directory.
355
356
357       Paths:
358            /var/cache/yum(/.*)?,                        /var/cache/dnf(/.*)?,
359            /var/spool/up2date(/.*)?, /var/cache/PackageKit(/.*)?
360
361
362       rpm_var_lib_t
363
364       -  Set  files with the rpm_var_lib_t type, if you want to store the rpm
365       files under the /var/lib directory.
366
367
368       Paths:
369            /var/lib/rpm(/.*)?,    /var/lib/yum(/.*)?,     /var/lib/dnf(/.*)?,
370            /usr/share/rpm(/.*)?, /var/lib/PackageKit(/.*)?, /var/lib/alterna‐
371            tives(/.*)?, /var/lib/rpmrebuilddb.*(/.*)?
372
373
374       rpm_var_run_t
375
376       - Set files with the rpm_var_run_t type, if you want to store  the  rpm
377       files under the /run or /var/run directory.
378
379
380       Paths:
381            /var/run/yum.*, /var/run/PackageKit(/.*)?
382
383
384       Note:  File context can be temporarily modified with the chcon command.
385       If you want to permanently change the file context you need to use  the
386       semanage fcontext command.  This will modify the SELinux labeling data‐
387       base.  You will need to use restorecon to apply the labels.
388
389

COMMANDS

391       semanage fcontext can also be used to manipulate default  file  context
392       mappings.
393
394       semanage  permissive  can  also  be used to manipulate whether or not a
395       process type is permissive.
396
397       semanage module can also be used to enable/disable/install/remove  pol‐
398       icy modules.
399
400       semanage boolean can also be used to manipulate the booleans
401
402
403       system-config-selinux is a GUI tool available to customize SELinux pol‐
404       icy settings.
405
406

AUTHOR

408       This manual page was auto-generated using sepolicy manpage .
409
410

SEE ALSO

412       selinux(8), rpm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) ,
413       setsebool(8), rpm_script_selinux(8), rpm_script_selinux(8)
414
415
416
417rpm                                19-04-25                     rpm_selinux(8)
Impressum