1mock_selinux(8) SELinux Policy mock mock_selinux(8)
2
3
4
6 mock_selinux - Security Enhanced Linux Policy for the mock processes
7
9 Security-Enhanced Linux secures the mock processes via flexible manda‐
10 tory access control.
11
12 The mock processes execute with the mock_t SELinux type. You can check
13 if you have these processes running by executing the ps command with
14 the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep mock_t
19
20
21
23 The mock_t SELinux type can be entered via the mock_exec_t file type.
24
25 The default entrypoint paths for the mock_t domain are the following:
26
27 /usr/sbin/mock, /usr/libexec/mock/mock
28
30 SELinux defines process types (domains) for each process running on the
31 system
32
33 You can see the context of a process using the -Z option to ps
34
35 Policy governs the access confined processes have to files. SELinux
36 mock policy is very flexible allowing users to setup their mock pro‐
37 cesses in as secure a method as possible.
38
39 The following process types are defined for mock:
40
41 mock_t, mock_build_t
42
43 Note: semanage permissive -a mock_t can be used to make the process
44 type mock_t permissive. SELinux does not deny access to permissive
45 process types, but the AVC (SELinux denials) messages are still gener‐
46 ated.
47
48
50 SELinux policy is customizable based on least access required. mock
51 policy is extremely flexible and has several booleans that allow you to
52 manipulate the policy and run mock with the tightest access possible.
53
54
55
56 If you want to allow mock to read files in home directories, you must
57 turn on the mock_enable_homedirs boolean. Disabled by default.
58
59 setsebool -P mock_enable_homedirs 1
60
61
62
63 If you want to allow system to run with NIS, you must turn on the
64 nis_enabled boolean. Disabled by default.
65
66 setsebool -P nis_enabled 1
67
68
69
70 If you want to support NFS home directories, you must turn on the
71 use_nfs_home_dirs boolean. Disabled by default.
72
73 setsebool -P use_nfs_home_dirs 1
74
75
76
77 If you want to support SAMBA home directories, you must turn on the
78 use_samba_home_dirs boolean. Disabled by default.
79
80 setsebool -P use_samba_home_dirs 1
81
82
83
85 The SELinux process type mock_t can manage files labeled with the fol‐
86 lowing file types. The paths listed are the default paths for these
87 file types. Note the processes UID still need to have DAC permissions.
88
89 cifs_t
90
91
92 krb5_host_rcache_t
93
94 /var/tmp/krb5_0.rcache2
95 /var/cache/krb5rcache(/.*)?
96 /var/tmp/nfs_0
97 /var/tmp/DNS_25
98 /var/tmp/host_0
99 /var/tmp/imap_0
100 /var/tmp/HTTP_23
101 /var/tmp/HTTP_48
102 /var/tmp/ldap_55
103 /var/tmp/ldap_487
104 /var/tmp/ldapmap1_0
105
106 lvm_lock_t
107
108 /etc/lvm/lock(/.*)?
109 /var/lock/lvm(/.*)?
110 /var/lock/dmraid(/.*)?
111
112 mock_cache_t
113
114 /var/cache/mock(/.*)?
115
116 mock_tmp_t
117
118
119 mock_var_lib_t
120
121 /var/lib/mock(/.*)?
122
123 mock_var_run_t
124
125
126 mount_var_run_t
127
128 /run/mount(/.*)?
129 /dev/.mount(/.*)?
130 /var/run/mount(/.*)?
131 /var/run/davfs2(/.*)?
132 /var/cache/davfs2(/.*)?
133
134 nfs_t
135
136
137 rpm_tmp_t
138
139
140 rpm_var_cache_t
141
142 /var/cache/dnf(/.*)?
143 /var/cache/yum(/.*)?
144 /var/spool/up2date(/.*)?
145 /var/cache/PackageKit(/.*)?
146
147 rpm_var_lib_t
148
149 /var/lib/dnf(/.*)?
150 /var/lib/rpm(/.*)?
151 /var/lib/yum(/.*)?
152 /var/lib/PackageKit(/.*)?
153 /usr/lib/sysimage/rpm(/.*)?
154 /var/lib/alternatives(/.*)?
155 /var/lib/rpmrebuilddb.*(/.*)?
156
157 sysfs_t
158
159 /sys(/.*)?
160
161 systemd_passwd_var_run_t
162
163 /var/run/systemd/ask-password(/.*)?
164 /var/run/systemd/ask-password-block(/.*)?
165
166 user_home_t
167
168 /home/[^/]+/.+
169
170
172 SELinux requires files to have an extended attribute to define the file
173 type.
174
175 You can see the context of a file using the -Z option to ls
176
177 Policy governs the access confined processes have to these files.
178 SELinux mock policy is very flexible allowing users to setup their mock
179 processes in as secure a method as possible.
180
181 STANDARD FILE CONTEXT
182
183 SELinux defines the file context types for the mock, if you wanted to
184 store files with these types in a different paths, you need to execute
185 the semanage command to specify alternate labeling and then use re‐
186 storecon to put the labels on disk.
187
188 semanage fcontext -a -t mock_exec_t '/srv/mock/content(/.*)?'
189 restorecon -R -v /srv/mymock_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 mock:
195
196
197
198 mock_build_exec_t
199
200 - Set files with the mock_build_exec_t type, if you want to transition
201 an executable to the mock_build_t domain.
202
203
204
205 mock_cache_t
206
207 - Set files with the mock_cache_t type, if you want to store the files
208 under the /var/cache directory.
209
210
211
212 mock_etc_t
213
214 - Set files with the mock_etc_t type, if you want to store mock files
215 in the /etc directories.
216
217
218
219 mock_exec_t
220
221 - Set files with the mock_exec_t type, if you want to transition an ex‐
222 ecutable to the mock_t domain.
223
224
225 Paths:
226 /usr/sbin/mock, /usr/libexec/mock/mock
227
228
229 mock_tmp_t
230
231 - Set files with the mock_tmp_t type, if you want to store mock tempo‐
232 rary files in the /tmp directories.
233
234
235
236 mock_var_lib_t
237
238 - Set files with the mock_var_lib_t type, if you want to store the mock
239 files under the /var/lib directory.
240
241
242
243 mock_var_run_t
244
245 - Set files with the mock_var_run_t type, if you want to store the mock
246 files under the /run or /var/run directory.
247
248
249
250 Note: File context can be temporarily modified with the chcon command.
251 If you want to permanently change the file context you need to use the
252 semanage fcontext command. This will modify the SELinux labeling data‐
253 base. You will need to use restorecon to apply the labels.
254
255
257 semanage fcontext can also be used to manipulate default file context
258 mappings.
259
260 semanage permissive can also be used to manipulate whether or not a
261 process type is permissive.
262
263 semanage module can also be used to enable/disable/install/remove pol‐
264 icy modules.
265
266 semanage boolean can also be used to manipulate the booleans
267
268
269 system-config-selinux is a GUI tool available to customize SELinux pol‐
270 icy settings.
271
272
274 This manual page was auto-generated using sepolicy manpage .
275
276
278 selinux(8), mock(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
279 setsebool(8), mock_build_selinux(8), mock_build_selinux(8)
280
281
282
283mock 23-10-20 mock_selinux(8)