1mount_selinux(8)             SELinux Policy mount             mount_selinux(8)
2
3
4

NAME

6       mount_selinux - Security Enhanced Linux Policy for the mount processes
7

DESCRIPTION

9       Security-Enhanced Linux secures the mount processes via flexible manda‐
10       tory access control.
11
12       The mount processes execute with the  mount_t  SELinux  type.  You  can
13       check  if  you have these processes running by executing the ps command
14       with the -Z qualifier.
15
16       For example:
17
18       ps -eZ | grep mount_t
19
20
21

ENTRYPOINTS

23       The mount_t SELinux type can be entered via  the  mount_exec_t,  fuser‐
24       mount_exec_t file types.
25
26       The default entrypoint paths for the mount_t domain are the following:
27
28       /bin/mount.*,     /bin/umount.*,     /sbin/mount.*,     /sbin/umount.*,
29       /usr/bin/mount.*,         /usr/bin/umount.*,         /usr/sbin/mount.*,
30       /usr/sbin/umount.*, /bin/fusermount, /usr/bin/fusermount
31

PROCESS TYPES

33       SELinux defines process types (domains) for each process running on the
34       system
35
36       You can see the context of a process using the -Z option to ps
37
38       Policy governs the access confined processes have  to  files.   SELinux
39       mount  policy is very flexible allowing users to setup their mount pro‐
40       cesses in as secure a method as possible.
41
42       The following process types are defined for mount:
43
44       mount_t, mount_ecryptfs_t
45
46       Note: semanage permissive -a mount_t can be used to  make  the  process
47       type  mount_t  permissive.  SELinux  does not deny access to permissive
48       process types, but the AVC (SELinux denials) messages are still  gener‐
49       ated.
50
51

BOOLEANS

53       SELinux  policy  is customizable based on least access required.  mount
54       policy is extremely flexible and has several booleans that allow you to
55       manipulate the policy and run mount with the tightest access possible.
56
57
58
59       If you want to allow the mount commands to mount any directory or file,
60       you must turn on the mount_anyfile boolean. Enabled by default.
61
62       setsebool -P mount_anyfile 1
63
64
65
66       If you want to allow users to resolve user passwd entries directly from
67       ldap  rather  then  using  a  sssd server, you must turn on the authlo‐
68       gin_nsswitch_use_ldap boolean. Disabled by default.
69
70       setsebool -P authlogin_nsswitch_use_ldap 1
71
72
73
74       If you want to allow all daemons the ability to  read/write  terminals,
75       you must turn on the daemons_use_tty boolean. Disabled by default.
76
77       setsebool -P daemons_use_tty 1
78
79
80
81       If you want to deny user domains applications to map a memory region as
82       both executable and writable, this  is  dangerous  and  the  executable
83       should be reported in bugzilla, you must turn on the deny_execmem bool‐
84       ean. Enabled by default.
85
86       setsebool -P deny_execmem 1
87
88
89
90       If you want to deny any process from ptracing or  debugging  any  other
91       processes,  you  must  turn  on  the  deny_ptrace  boolean.  Enabled by
92       default.
93
94       setsebool -P deny_ptrace 1
95
96
97
98       If you want to allow any process  to  mmap  any  file  on  system  with
99       attribute  file_type,  you must turn on the domain_can_mmap_files bool‐
100       ean. Enabled by default.
101
102       setsebool -P domain_can_mmap_files 1
103
104
105
106       If you want to allow all domains write to kmsg_device, while kernel  is
107       executed  with  systemd.log_target=kmsg parameter, you must turn on the
108       domain_can_write_kmsg boolean. Disabled by default.
109
110       setsebool -P domain_can_write_kmsg 1
111
112
113
114       If you want to allow all domains to use other domains file descriptors,
115       you must turn on the domain_fd_use boolean. Enabled by default.
116
117       setsebool -P domain_fd_use 1
118
119
120
121       If  you  want to allow all domains to have the kernel load modules, you
122       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
123       default.
124
125       setsebool -P domain_kernel_load_modules 1
126
127
128
129       If you want to allow all domains to execute in fips_mode, you must turn
130       on the fips_mode boolean. Enabled by default.
131
132       setsebool -P fips_mode 1
133
134
135
136       If you want to enable reading of urandom for all domains, you must turn
137       on the global_ssp boolean. Disabled by default.
138
139       setsebool -P global_ssp 1
140
141
142
143       If  you  want  to allow confined applications to run with kerberos, you
144       must turn on the kerberos_enabled boolean. Enabled by default.
145
146       setsebool -P kerberos_enabled 1
147
148
149
150       If you want to control the ability to mmap a low area  of  the  address
151       space,  as  configured  by /proc/sys/vm/mmap_min_addr, you must turn on
152       the mmap_low_allowed boolean. Disabled by default.
153
154       setsebool -P mmap_low_allowed 1
155
156
157
158       If you want to allow system to run with  NIS,  you  must  turn  on  the
159       nis_enabled boolean. Disabled by default.
160
161       setsebool -P nis_enabled 1
162
163
164
165       If  you  want to allow confined applications to use nscd shared memory,
166       you must turn on the nscd_use_shm boolean. Disabled by default.
167
168       setsebool -P nscd_use_shm 1
169
170
171
172       If you want to disable kernel module loading,  you  must  turn  on  the
173       secure_mode_insmod boolean. Enabled by default.
174
175       setsebool -P secure_mode_insmod 1
176
177
178
179       If  you want to boolean to determine whether the system permits loading
180       policy, setting enforcing mode, and changing boolean values.  Set  this
181       to  true  and  you  have to reboot to set it back, you must turn on the
182       secure_mode_policyload boolean. Enabled by default.
183
184       setsebool -P secure_mode_policyload 1
185
186
187
188       If you want to allow unconfined executables to make their  heap  memory
189       executable.   Doing  this  is  a  really bad idea. Probably indicates a
190       badly coded executable, but could indicate an attack.  This  executable
191       should   be   reported  in  bugzilla,  you  must  turn  on  the  selin‐
192       uxuser_execheap boolean. Disabled by default.
193
194       setsebool -P selinuxuser_execheap 1
195
196
197
198       If you want to  allow  all  unconfined  executables  to  use  libraries
199       requiring  text  relocation  that  are not labeled textrel_shlib_t, you
200       must turn on the selinuxuser_execmod boolean. Enabled by default.
201
202       setsebool -P selinuxuser_execmod 1
203
204
205
206       If you want to allow unconfined executables to make  their  stack  exe‐
207       cutable.   This  should  never, ever be necessary. Probably indicates a
208       badly coded executable, but could indicate an attack.  This  executable
209       should  be reported in bugzilla, you must turn on the selinuxuser_exec‐
210       stack boolean. Enabled by default.
211
212       setsebool -P selinuxuser_execstack 1
213
214
215
216       If you want to support X userspace object manager, you must turn on the
217       xserver_object_manager boolean. Enabled by default.
218
219       setsebool -P xserver_object_manager 1
220
221
222

PORT TYPES

224       SELinux defines port types to represent TCP and UDP ports.
225
226       You  can  see  the  types associated with a port by using the following
227       command:
228
229       semanage port -l
230
231
232       Policy governs the access  confined  processes  have  to  these  ports.
233       SELinux  mount  policy  is  very flexible allowing users to setup their
234       mount processes in as secure a method as possible.
235
236       The following port types are defined for mount:
237
238
239       mountd_port_t
240
241
242
243       Default Defined Ports:
244                 tcp 20048
245                 udp 20048
246

MANAGED FILES

248       The SELinux process type mount_t can manage files labeled with the fol‐
249       lowing  file  types.   The paths listed are the default paths for these
250       file types.  Note the processes UID still need to have DAC permissions.
251
252       file_type
253
254            all files on the system
255
256

FILE CONTEXTS

258       SELinux requires files to have an extended attribute to define the file
259       type.
260
261       You can see the context of a file using the -Z option to ls
262
263       Policy  governs  the  access  confined  processes  have to these files.
264       SELinux mount policy is very flexible allowing  users  to  setup  their
265       mount processes in as secure a method as possible.
266
267       STANDARD FILE CONTEXT
268
269       SELinux  defines the file context types for the mount, if you wanted to
270       store files with these types in a diffent paths, you  need  to  execute
271       the  semanage  command  to  sepecify  alternate  labeling  and then use
272       restorecon to put the labels on disk.
273
274       semanage fcontext -a -t mount_var_run_t '/srv/mymount_content(/.*)?'
275       restorecon -R -v /srv/mymount_content
276
277       Note: SELinux often uses regular expressions  to  specify  labels  that
278       match multiple files.
279
280       The following file types are defined for mount:
281
282
283
284       mount_ecryptfs_exec_t
285
286       - Set files with the mount_ecryptfs_exec_t type, if you want to transi‐
287       tion an executable to the mount_ecryptfs_t domain.
288
289
290       Paths:
291            /usr/sbin/mount.ecryptfs,               /usr/sbin/umount.ecryptfs,
292            /usr/sbin/mount.ecryptfs_private,   /usr/sbin/umount.ecryptfs_pri‐
293            vate
294
295
296       mount_ecryptfs_tmpfs_t
297
298       - Set files with the mount_ecryptfs_tmpfs_t type, if you want to  store
299       mount ecryptfs files on a tmpfs file system.
300
301
302
303       mount_exec_t
304
305       -  Set  files  with the mount_exec_t type, if you want to transition an
306       executable to the mount_t domain.
307
308
309       Paths:
310            /bin/mount.*,   /bin/umount.*,   /sbin/mount.*,    /sbin/umount.*,
311            /usr/bin/mount.*,       /usr/bin/umount.*,      /usr/sbin/mount.*,
312            /usr/sbin/umount.*
313
314
315       mount_loopback_t
316
317       - Set files with the mount_loopback_t type, if you want  to  treat  the
318       files as mount loopback data.
319
320
321
322       mount_tmp_t
323
324       -  Set files with the mount_tmp_t type, if you want to store mount tem‐
325       porary files in the /tmp directories.
326
327
328
329       mount_var_run_t
330
331       - Set files with the mount_var_run_t type, if you  want  to  store  the
332       mount files under the /run or /var/run directory.
333
334
335       Paths:
336            /run/mount(/.*)?,     /dev/.mount(/.*)?,     /var/run/mount(/.*)?,
337            /var/run/davfs2(/.*)?, /var/cache/davfs2(/.*)?
338
339
340       Note: File context can be temporarily modified with the chcon  command.
341       If  you want to permanently change the file context you need to use the
342       semanage fcontext command.  This will modify the SELinux labeling data‐
343       base.  You will need to use restorecon to apply the labels.
344
345

COMMANDS

347       semanage  fcontext  can also be used to manipulate default file context
348       mappings.
349
350       semanage permissive can also be used to manipulate  whether  or  not  a
351       process type is permissive.
352
353       semanage  module can also be used to enable/disable/install/remove pol‐
354       icy modules.
355
356       semanage port can also be used to manipulate the port definitions
357
358       semanage boolean can also be used to manipulate the booleans
359
360
361       system-config-selinux is a GUI tool available to customize SELinux pol‐
362       icy settings.
363
364

AUTHOR

366       This manual page was auto-generated using sepolicy manpage .
367
368

SEE ALSO

370       selinux(8), mount(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
371       , setsebool(8), mount_ecryptfs_selinux(8), mount_ecryptfs_selinux(8)
372
373
374
375mount                              19-04-25                   mount_selinux(8)
Impressum