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_exec_t,
24       rpm_script_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/rhc/rhc-package-manager-worker,   /usr/libexec/pegasus/py‐
41       cmpiLMI_Software-cimprovagt,  /usr/libexec/dnf-utils,   /usr/bin/debug‐
42       info-install
43

PROCESS TYPES

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

BOOLEANS

64       SELinux policy is customizable based on  least  access  required.   rpm
65       policy is extremely flexible and has several booleans that allow you to
66       manipulate the policy and run rpm with the tightest access possible.
67
68
69
70       If you want to control the ability to mmap a low area  of  the  address
71       space,  as  configured  by /proc/sys/vm/mmap_min_addr, you must turn on
72       the mmap_low_allowed boolean. Disabled by default.
73
74       setsebool -P mmap_low_allowed 1
75
76
77
78       If you want to disable kernel module loading, you must turn on the  se‐
79       cure_mode_insmod boolean. Enabled by default.
80
81       setsebool -P secure_mode_insmod 1
82
83
84
85       If  you  want to allow unconfined executables to make their heap memory
86       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
87       badly  coded  executable, but could indicate an attack. This executable
88       should be reported in bugzilla, you must turn  on  the  selinuxuser_ex‐
89       echeap boolean. Disabled by default.
90
91       setsebool -P selinuxuser_execheap 1
92
93
94
95       If  you  want  to allow unconfined executables to make their stack exe‐
96       cutable.  This should never, ever be necessary.  Probably  indicates  a
97       badly  coded  executable, but could indicate an attack. This executable
98       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
99       stack boolean. Enabled by default.
100
101       setsebool -P selinuxuser_execstack 1
102
103
104

MANAGED FILES

106       The  SELinux  process type rpm_t can manage files labeled with the fol‐
107       lowing file types.  The paths listed are the default  paths  for  these
108       file types.  Note the processes UID still need to have DAC permissions.
109
110       file_type
111
112            all files on the system
113
114

FILE CONTEXTS

116       SELinux requires files to have an extended attribute to define the file
117       type.
118
119       You can see the context of a file using the -Z option to ls
120
121       Policy governs the access  confined  processes  have  to  these  files.
122       SELinux  rpm  policy is very flexible allowing users to setup their rpm
123       processes in as secure a method as possible.
124
125       EQUIVALENCE DIRECTORIES
126
127
128       rpm policy stores data with multiple different file context types under
129       the  /var/lib/rpm  directory.  If you would like to store the data in a
130       different directory you can use  the  semanage  command  to  create  an
131       equivalence  mapping.   If you wanted to store this data under the /srv
132       directory you would execute the following command:
133
134       semanage fcontext -a -e /var/lib/rpm /srv/rpm
135       restorecon -R -v /srv/rpm
136
137       STANDARD FILE CONTEXT
138
139       SELinux defines the file context types for the rpm, if  you  wanted  to
140       store  files  with  these types in a diffent paths, you need to execute
141       the semanage command to specify alternate labeling  and  then  use  re‐
142       storecon to put the labels on disk.
143
144       semanage fcontext -a -t rpm_script_tmpfs_t '/srv/myrpm_content(/.*)?'
145       restorecon -R -v /srv/myrpm_content
146
147       Note:  SELinux  often  uses  regular expressions to specify labels that
148       match multiple files.
149
150       The following file types are defined for rpm:
151
152
153
154       rpm_exec_t
155
156       - Set files with the rpm_exec_t type, if you want to transition an exe‐
157       cutable to the rpm_t domain.
158
159
160       Paths:
161            /usr/bin/dnf-[0-9]+,            /usr/sbin/rhn_check-[0-9]+.[0-9]+,
162            /usr/libexec/yumDBUSBackend.py,      /bin/rpm,       /usr/bin/dnf,
163            /usr/bin/rpm,     /usr/bin/yum,    /usr/bin/zif,    /usr/sbin/pup,
164            /usr/bin/smart,  /usr/sbin/bcfg2,  /usr/sbin/pirut,  /usr/bin/apt-
165            get,   /bin/yum-builddep,  /usr/sbin/up2date,  /usr/bin/apt-shell,
166            /usr/bin/repoquery,    /usr/sbin/synaptic,     /usr/sbin/yum-cron,
167            /usr/sbin/rhn_check,  /usr/sbin/rhnreg_ks,  /usr/bin/anaconda-yum,
168            /usr/bin/yum-builddep,  /usr/sbin/packagekitd,  /usr/bin/dnf-auto‐
169            matic,       /usr/sbin/yum-updatesd,      /usr/bin/yum-deprecated,
170            /usr/bin/package-cleanup,  /usr/libexec/packagekitd,  /usr/bin/fe‐
171            dora-rmdevelrpms,  /usr/bin/rpmdev-rmdevelrpms,  /usr/sbin/system-
172            install-packages,               /usr/share/yumex/yum_childtask.py,
173            /usr/sbin/yum-complete-transaction,    /usr/share/yumex/yumex-yum-
174            backend,              /usr/libexec/rhc/rhc-package-manager-worker,
175            /usr/libexec/pegasus/pycmpiLMI_Software-cimprovagt
176
177
178       rpm_file_t
179
180       - Set files with the rpm_file_t type, if you want to treat the files as
181       rpm content.
182
183
184
185       rpm_log_t
186
187       - Set files with the rpm_log_t type, if you want to treat the  data  as
188       rpm log data, usually stored under the /var/log directory.
189
190
191       Paths:
192            /var/log/dnf.log.*,    /var/log/dnf.rpm.log.*,    /var/log/dnf.li‐
193            brepo.log.*,        /var/log/hawkey.*,         /var/log/up2date.*,
194            /var/log/yum.log.*
195
196
197       rpm_script_exec_t
198
199       -  Set files with the rpm_script_exec_t type, if you want to transition
200       an executable to the rpm_script_t domain.
201
202
203
204       rpm_script_tmp_t
205
206       - Set files with the rpm_script_tmp_t type, if you want  to  store  rpm
207       script temporary files in the /tmp directories.
208
209
210
211       rpm_script_tmpfs_t
212
213       -  Set files with the rpm_script_tmpfs_t type, if you want to store rpm
214       script files on a tmpfs file system.
215
216
217
218       rpm_tmp_t
219
220       - Set files with the rpm_tmp_t type, if you want to store rpm temporary
221       files in the /tmp directories.
222
223
224
225       rpm_tmpfs_t
226
227       -  Set  files with the rpm_tmpfs_t type, if you want to store rpm files
228       on a tmpfs file system.
229
230
231
232       rpm_var_cache_t
233
234       - Set files with the rpm_var_cache_t type, if you  want  to  store  the
235       files under the /var/cache directory.
236
237
238       Paths:
239            /var/cache/dnf(/.*)?,                        /var/cache/yum(/.*)?,
240            /var/spool/up2date(/.*)?, /var/cache/PackageKit(/.*)?
241
242
243       rpm_var_lib_t
244
245       - Set files with the rpm_var_lib_t type, if you want to store  the  rpm
246       files under the /var/lib directory.
247
248
249       Paths:
250            /var/lib/dnf(/.*)?,     /var/lib/rpm(/.*)?,    /var/lib/yum(/.*)?,
251            /var/lib/PackageKit(/.*)?,            /usr/lib/sysimage/rpm(/.*)?,
252            /var/lib/alternatives(/.*)?, /var/lib/rpmrebuilddb.*(/.*)?
253
254
255       rpm_var_run_t
256
257       -  Set  files with the rpm_var_run_t type, if you want to store the rpm
258       files under the /run or /var/run directory.
259
260
261       Paths:
262            /var/run/yum.*, /var/run/PackageKit(/.*)?
263
264
265       rpmdb_exec_t
266
267       - Set files with the rpmdb_exec_t type, if you want  to  transition  an
268       executable to the rpmdb_t domain.
269
270
271       Paths:
272            /usr/bin/rpmdb, /usr/lib/rpm/rpmdb_migrate
273
274
275       rpmdb_tmp_t
276
277       -  Set files with the rpmdb_tmp_t type, if you want to store rpmdb tem‐
278       porary files in the /tmp directories.
279
280
281
282       Note: File context can be temporarily modified with the chcon  command.
283       If  you want to permanently change the file context you need to use the
284       semanage fcontext command.  This will modify the SELinux labeling data‐
285       base.  You will need to use restorecon to apply the labels.
286
287

COMMANDS

289       semanage  fcontext  can also be used to manipulate default file context
290       mappings.
291
292       semanage permissive can also be used to manipulate  whether  or  not  a
293       process type is permissive.
294
295       semanage  module can also be used to enable/disable/install/remove pol‐
296       icy modules.
297
298       semanage boolean can also be used to manipulate the booleans
299
300
301       system-config-selinux is a GUI tool available to customize SELinux pol‐
302       icy settings.
303
304

AUTHOR

306       This manual page was auto-generated using sepolicy manpage .
307
308

SEE ALSO

310       selinux(8),  rpm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
311       setsebool(8), rpm_script_selinux(8), rpm_script_selinux(8)
312
313
314
315rpm                                23-02-03                     rpm_selinux(8)
Impressum