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 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/pegasus/pycmpiLMI_Software-cimprovagt, /usr/libexec/dnf-
41 utils, /usr/bin/debuginfo-install
42
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, rpmdb_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
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 control the ability to mmap a low area of the address
70 space, as configured by /proc/sys/vm/mmap_min_addr, you must turn on
71 the mmap_low_allowed boolean. Disabled by default.
72
73 setsebool -P mmap_low_allowed 1
74
75
76
77 If you want to disable kernel module loading, you must turn on the se‐
78 cure_mode_insmod boolean. Enabled by default.
79
80 setsebool -P secure_mode_insmod 1
81
82
83
84 If you want to allow unconfined executables to make their heap memory
85 executable. Doing this is a really bad idea. Probably indicates a
86 badly coded executable, but could indicate an attack. This executable
87 should be reported in bugzilla, you must turn on the selinuxuser_ex‐
88 echeap boolean. Disabled by default.
89
90 setsebool -P selinuxuser_execheap 1
91
92
93
94 If you want to allow unconfined executables to make their stack exe‐
95 cutable. This should never, ever be necessary. Probably indicates a
96 badly coded executable, but could indicate an attack. This executable
97 should be reported in bugzilla, you must turn on the selinuxuser_exec‐
98 stack boolean. Enabled by default.
99
100 setsebool -P selinuxuser_execstack 1
101
102
103
105 The SELinux process type rpm_t can manage files labeled with the fol‐
106 lowing file types. The paths listed are the default paths for these
107 file types. Note the processes UID still need to have DAC permissions.
108
109 file_type
110
111 all files on the system
112
113
115 SELinux requires files to have an extended attribute to define the file
116 type.
117
118 You can see the context of a file using the -Z option to ls
119
120 Policy governs the access confined processes have to these files.
121 SELinux rpm policy is very flexible allowing users to setup their rpm
122 processes in as secure a method as possible.
123
124 EQUIVALENCE DIRECTORIES
125
126
127 rpm policy stores data with multiple different file context types under
128 the /var/lib/rpm directory. If you would like to store the data in a
129 different directory you can use the semanage command to create an
130 equivalence mapping. If you wanted to store this data under the /srv
131 directory you would execute the following command:
132
133 semanage fcontext -a -e /var/lib/rpm /srv/rpm
134 restorecon -R -v /srv/rpm
135
136 STANDARD FILE CONTEXT
137
138 SELinux defines the file context types for the rpm, if you wanted to
139 store files with these types in a diffent paths, you need to execute
140 the semanage command to sepecify alternate labeling and then use re‐
141 storecon to put the labels on disk.
142
143 semanage fcontext -a -t rpm_script_tmpfs_t '/srv/myrpm_content(/.*)?'
144 restorecon -R -v /srv/myrpm_content
145
146 Note: SELinux often uses regular expressions to specify labels that
147 match multiple files.
148
149 The following file types are defined for rpm:
150
151
152
153 rpm_exec_t
154
155 - Set files with the rpm_exec_t type, if you want to transition an exe‐
156 cutable to the rpm_t domain.
157
158
159 Paths:
160 /usr/bin/dnf-[0-9]+, /usr/sbin/rhn_check-[0-9]+.[0-9]+,
161 /usr/libexec/yumDBUSBackend.py, /bin/rpm, /usr/bin/dnf,
162 /usr/bin/rpm, /usr/bin/yum, /usr/bin/zif, /usr/sbin/pup,
163 /usr/bin/smart, /usr/sbin/bcfg2, /usr/sbin/pirut, /usr/bin/apt-
164 get, /bin/yum-builddep, /usr/sbin/up2date, /usr/bin/apt-shell,
165 /usr/bin/repoquery, /usr/sbin/synaptic, /usr/sbin/yum-cron,
166 /usr/sbin/rhn_check, /usr/sbin/rhnreg_ks, /usr/bin/anaconda-yum,
167 /usr/bin/yum-builddep, /usr/sbin/packagekitd, /usr/bin/dnf-auto‐
168 matic, /usr/sbin/yum-updatesd, /usr/bin/yum-deprecated,
169 /usr/bin/package-cleanup, /usr/libexec/packagekitd, /usr/bin/fe‐
170 dora-rmdevelrpms, /usr/bin/rpmdev-rmdevelrpms, /usr/sbin/system-
171 install-packages, /usr/share/yumex/yum_childtask.py,
172 /usr/sbin/yum-complete-transaction, /usr/share/yumex/yumex-yum-
173 backend, /usr/libexec/pegasus/pycmpiLMI_Software-cimprovagt
174
175
176 rpm_file_t
177
178 - Set files with the rpm_file_t type, if you want to treat the files as
179 rpm content.
180
181
182
183 rpm_log_t
184
185 - Set files with the rpm_log_t type, if you want to treat the data as
186 rpm log data, usually stored under the /var/log directory.
187
188
189 Paths:
190 /var/log/dnf.log.*, /var/log/dnf.rpm.log.*, /var/log/dnf.li‐
191 brepo.log.*, /var/log/hawkey.*, /var/log/up2date.*,
192 /var/log/yum.log.*
193
194
195 rpm_script_exec_t
196
197 - Set files with the rpm_script_exec_t type, if you want to transition
198 an executable to the rpm_script_t domain.
199
200
201
202 rpm_script_tmp_t
203
204 - Set files with the rpm_script_tmp_t type, if you want to store rpm
205 script temporary files in the /tmp directories.
206
207
208
209 rpm_script_tmpfs_t
210
211 - Set files with the rpm_script_tmpfs_t type, if you want to store rpm
212 script files on a tmpfs file system.
213
214
215
216 rpm_tmp_t
217
218 - Set files with the rpm_tmp_t type, if you want to store rpm temporary
219 files in the /tmp directories.
220
221
222
223 rpm_tmpfs_t
224
225 - Set files with the rpm_tmpfs_t type, if you want to store rpm files
226 on a tmpfs file system.
227
228
229
230 rpm_var_cache_t
231
232 - Set files with the rpm_var_cache_t type, if you want to store the
233 files under the /var/cache directory.
234
235
236 Paths:
237 /var/cache/dnf(/.*)?, /var/cache/yum(/.*)?,
238 /var/spool/up2date(/.*)?, /var/cache/PackageKit(/.*)?
239
240
241 rpm_var_lib_t
242
243 - Set files with the rpm_var_lib_t type, if you want to store the rpm
244 files under the /var/lib directory.
245
246
247 Paths:
248 /var/lib/dnf(/.*)?, /var/lib/rpm(/.*)?, /var/lib/yum(/.*)?,
249 /var/lib/PackageKit(/.*)?, /var/lib/alternatives(/.*)?,
250 /var/lib/rpmrebuilddb.*(/.*)?
251
252
253 rpm_var_run_t
254
255 - Set files with the rpm_var_run_t type, if you want to store the rpm
256 files under the /run or /var/run directory.
257
258
259 Paths:
260 /var/run/yum.*, /var/run/PackageKit(/.*)?
261
262
263 rpmdb_exec_t
264
265 - Set files with the rpmdb_exec_t type, if you want to transition an
266 executable to the rpmdb_t domain.
267
268
269
270 rpmdb_tmp_t
271
272 - Set files with the rpmdb_tmp_t type, if you want to store rpmdb tem‐
273 porary files in the /tmp directories.
274
275
276
277 Note: File context can be temporarily modified with the chcon command.
278 If you want to permanently change the file context you need to use the
279 semanage fcontext command. This will modify the SELinux labeling data‐
280 base. You will need to use restorecon to apply the labels.
281
282
284 semanage fcontext can also be used to manipulate default file context
285 mappings.
286
287 semanage permissive can also be used to manipulate whether or not a
288 process type is permissive.
289
290 semanage module can also be used to enable/disable/install/remove pol‐
291 icy modules.
292
293 semanage boolean can also be used to manipulate the booleans
294
295
296 system-config-selinux is a GUI tool available to customize SELinux pol‐
297 icy settings.
298
299
301 This manual page was auto-generated using sepolicy manpage .
302
303
305 selinux(8), rpm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
306 setsebool(8), rpm_script_selinux(8), rpm_script_selinux(8)
307
308
309
310rpm 21-06-09 rpm_selinux(8)