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/apt-shell,       /usr/bin/repoquery,
33       /usr/sbin/synaptic,      /usr/sbin/yum-cron,       /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/bin/package-cleanup,  /usr/libexec/pack‐
37       agekitd,   /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 deny user domains applications to map a memory region as
78       both executable and writable, this  is  dangerous  and  the  executable
79       should be reported in bugzilla, you must turn on the deny_execmem bool‐
80       ean. Enabled by default.
81
82       setsebool -P deny_execmem 1
83
84
85
86       If you want to allow all domains to execute in fips_mode, you must turn
87       on the fips_mode boolean. Enabled by default.
88
89       setsebool -P fips_mode 1
90
91
92
93       If  you  want  to allow confined applications to run with kerberos, you
94       must turn on the kerberos_enabled boolean. Enabled by default.
95
96       setsebool -P kerberos_enabled 1
97
98
99
100       If you want to control the ability to mmap a low area  of  the  address
101       space,  as  configured  by /proc/sys/vm/mmap_min_addr, you must turn on
102       the mmap_low_allowed boolean. Disabled by default.
103
104       setsebool -P mmap_low_allowed 1
105
106
107
108       If you want to allow system to run with  NIS,  you  must  turn  on  the
109       nis_enabled boolean. Disabled by default.
110
111       setsebool -P nis_enabled 1
112
113
114
115       If  you  want to allow confined applications to use nscd shared memory,
116       you must turn on the nscd_use_shm boolean. Disabled by default.
117
118       setsebool -P nscd_use_shm 1
119
120
121
122       If you want to disable kernel module loading,  you  must  turn  on  the
123       secure_mode_insmod boolean. Enabled by default.
124
125       setsebool -P secure_mode_insmod 1
126
127
128
129       If  you  want to allow unconfined executables to make their heap memory
130       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
131       badly  coded  executable, but could indicate an attack. This executable
132       should  be  reported  in  bugzilla,  you  must  turn  on   the   selin‐
133       uxuser_execheap boolean. Disabled by default.
134
135       setsebool -P selinuxuser_execheap 1
136
137
138
139       If  you  want  to allow unconfined executables to make their stack exe‐
140       cutable.  This should never, ever be necessary.  Probably  indicates  a
141       badly  coded  executable, but could indicate an attack. This executable
142       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
143       stack boolean. Enabled by default.
144
145       setsebool -P selinuxuser_execstack 1
146
147
148

MANAGED FILES

150       The  SELinux  process type rpm_t can manage files labeled with the fol‐
151       lowing file types.  The paths listed are the default  paths  for  these
152       file types.  Note the processes UID still need to have DAC permissions.
153
154       file_type
155
156            all files on the system
157
158

FILE CONTEXTS

160       SELinux requires files to have an extended attribute to define the file
161       type.
162
163       You can see the context of a file using the -Z option to ls
164
165       Policy governs the access  confined  processes  have  to  these  files.
166       SELinux  rpm  policy is very flexible allowing users to setup their rpm
167       processes in as secure a method as possible.
168
169       EQUIVALENCE DIRECTORIES
170
171
172       rpm policy stores data with multiple different file context types under
173       the  /var/lib/rpm  directory.  If you would like to store the data in a
174       different directory you can use  the  semanage  command  to  create  an
175       equivalence  mapping.   If you wanted to store this data under the /srv
176       dirctory you would execute the following command:
177
178       semanage fcontext -a -e /var/lib/rpm /srv/rpm
179       restorecon -R -v /srv/rpm
180
181       STANDARD FILE CONTEXT
182
183       SELinux defines the file context types for the rpm, if  you  wanted  to
184       store  files  with  these types in a diffent paths, you need to execute
185       the semanage command  to  sepecify  alternate  labeling  and  then  use
186       restorecon to put the labels on disk.
187
188       semanage fcontext -a -t rpm_script_tmpfs_t '/srv/myrpm_content(/.*)?'
189       restorecon -R -v /srv/myrpm_content
190
191       Note:  SELinux  often  uses  regular expressions to specify labels that
192       match multiple files.
193
194       The following file types are defined for rpm:
195
196
197
198       rpm_exec_t
199
200       - Set files with the rpm_exec_t type, if you want to transition an exe‐
201       cutable to the rpm_t domain.
202
203
204       Paths:
205            /usr/bin/dnf-[0-9]+,            /usr/sbin/rhn_check-[0-9]+.[0-9]+,
206            /usr/libexec/yumDBUSBackend.py,      /bin/rpm,       /usr/bin/dnf,
207            /usr/bin/rpm,     /usr/bin/yum,    /usr/bin/zif,    /usr/sbin/pup,
208            /usr/bin/smart,  /usr/sbin/bcfg2,  /usr/sbin/pirut,  /usr/bin/apt-
209            get,   /bin/yum-builddep,  /usr/sbin/up2date,  /usr/bin/apt-shell,
210            /usr/bin/repoquery,    /usr/sbin/synaptic,     /usr/sbin/yum-cron,
211            /usr/sbin/rhn_check,  /usr/sbin/rhnreg_ks,  /usr/bin/anaconda-yum,
212            /usr/bin/yum-builddep,  /usr/sbin/packagekitd,  /usr/bin/dnf-auto‐
213            matic,       /usr/sbin/yum-updatesd,      /usr/bin/yum-deprecated,
214            /usr/bin/package-cleanup,                /usr/libexec/packagekitd,
215            /usr/bin/fedora-rmdevelrpms,          /usr/bin/rpmdev-rmdevelrpms,
216            /usr/sbin/system-install-packages,     /usr/share/yumex/yum_child‐
217            task.py,                       /usr/sbin/yum-complete-transaction,
218            /usr/share/yumex/yumex-yum-backend,             /usr/libexec/pega‐
219            sus/pycmpiLMI_Software-cimprovagt
220
221
222       rpm_file_t
223
224       - Set files with the rpm_file_t type, if you want to treat the files as
225       rpm content.
226
227
228
229       rpm_log_t
230
231       - Set files with the rpm_log_t type, if you want to treat the  data  as
232       rpm log data, usually stored under the /var/log directory.
233
234
235       Paths:
236            /var/log/up2date.*, /var/log/yum.log.*
237
238
239       rpm_script_exec_t
240
241       -  Set files with the rpm_script_exec_t type, if you want to transition
242       an executable to the rpm_script_t domain.
243
244
245
246       rpm_script_tmp_t
247
248       - Set files with the rpm_script_tmp_t type, if you want  to  store  rpm
249       script temporary files in the /tmp directories.
250
251
252
253       rpm_script_tmpfs_t
254
255       -  Set files with the rpm_script_tmpfs_t type, if you want to store rpm
256       script files on a tmpfs file system.
257
258
259
260       rpm_tmp_t
261
262       - Set files with the rpm_tmp_t type, if you want to store rpm temporary
263       files in the /tmp directories.
264
265
266
267       rpm_tmpfs_t
268
269       -  Set  files with the rpm_tmpfs_t type, if you want to store rpm files
270       on a tmpfs file system.
271
272
273
274       rpm_var_cache_t
275
276       - Set files with the rpm_var_cache_t type, if you  want  to  store  the
277       files under the /var/cache directory.
278
279
280       Paths:
281            /var/cache/dnf(/.*)?,                        /var/cache/yum(/.*)?,
282            /var/spool/up2date(/.*)?, /var/cache/PackageKit(/.*)?
283
284
285       rpm_var_lib_t
286
287       - Set files with the rpm_var_lib_t type, if you want to store  the  rpm
288       files under the /var/lib directory.
289
290
291       Paths:
292            /var/lib/dnf(/.*)?,     /var/lib/rpm(/.*)?,    /var/lib/yum(/.*)?,
293            /var/lib/PackageKit(/.*)?,            /var/lib/alternatives(/.*)?,
294            /var/lib/rpmrebuilddb.*(/.*)?
295
296
297       rpm_var_run_t
298
299       -  Set  files with the rpm_var_run_t type, if you want to store the rpm
300       files under the /run or /var/run directory.
301
302
303       Paths:
304            /var/run/yum.*, /var/run/PackageKit(/.*)?
305
306
307       Note: File context can be temporarily modified with the chcon  command.
308       If  you want to permanently change the file context you need to use the
309       semanage fcontext command.  This will modify the SELinux labeling data‐
310       base.  You will need to use restorecon to apply the labels.
311
312

COMMANDS

314       semanage  fcontext  can also be used to manipulate default file context
315       mappings.
316
317       semanage permissive can also be used to manipulate  whether  or  not  a
318       process type is permissive.
319
320       semanage  module can also be used to enable/disable/install/remove pol‐
321       icy modules.
322
323       semanage boolean can also be used to manipulate the booleans
324
325
326       system-config-selinux is a GUI tool available to customize SELinux pol‐
327       icy settings.
328
329

AUTHOR

331       This manual page was auto-generated using sepolicy manpage .
332
333

SEE ALSO

335       selinux(8),  rpm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
336       setsebool(8), rpm_script_selinux(8), rpm_script_selinux(8)
337
338
339
340rpm                                19-05-30                     rpm_selinux(8)
Impressum