1xdm_selinux(8)                SELinux Policy xdm                xdm_selinux(8)
2
3
4

NAME

6       xdm_selinux - Security Enhanced Linux Policy for the xdm processes
7

DESCRIPTION

9       Security-Enhanced  Linux  secures the xdm processes via flexible manda‐
10       tory access control.
11
12       The xdm processes execute with the xdm_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 xdm_t
19
20
21

ENTRYPOINTS

23       The xdm_t SELinux type can be entered via the xdm_exec_t file type.
24
25       The default entrypoint paths for the xdm_t domain are the following:
26
27       /usr/s?bin/nodm,        /usr/s?bin/gdm(3)?,        /usr/s?bin/lightdm*,
28       /usr/s?bin/[mxgkw]dm, /usr/s?bin/gdm-binary, /usr/s?bin/lxdm(-binary)?,
29       /usr/X11R6/bin/[xgkw]dm,   /usr/bin/razor-lightdm-.*,    /usr/bin/sddm,
30       /usr/bin/slim,   /usr/bin/gpe-dm,   /opt/kde3/bin/kdm,   /usr/sbin/mdm-
31       binary,       /usr/bin/sddm-greeter,       /etc/rc.d/init.d/x11-common,
32       /usr/libexec/gdm-disable-wayland
33

PROCESS TYPES

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

BOOLEANS

54       SELinux policy is customizable based on  least  access  required.   xdm
55       policy is extremely flexible and has several booleans that allow you to
56       manipulate the policy and run xdm with the tightest access possible.
57
58
59
60       If you want to allows xdm_t to bind on vnc_port_t(5910), you must  turn
61       on the xdm_bind_vnc_tcp_port boolean. Disabled by default.
62
63       setsebool -P xdm_bind_vnc_tcp_port 1
64
65
66
67       If  you  want  to  allow  the  graphical login program to create, read,
68       write, and delete files in the /boot director and DOS  filesystem,  you
69       must turn on the xdm_manage_bootloader boolean. Enabled by default.
70
71       setsebool -P xdm_manage_bootloader 1
72
73
74
75       If  you  want to allow the graphical login program to login directly as
76       sysadm_r:sysadm_t, you must turn on the xdm_sysadm_login boolean.  Dis‐
77       abled by default.
78
79       setsebool -P xdm_sysadm_login 1
80
81
82
83       If you want to deny user domains applications to map a memory region as
84       both executable and writable, this  is  dangerous  and  the  executable
85       should be reported in bugzilla, you must turn on the deny_execmem bool‐
86       ean. Enabled by default.
87
88       setsebool -P deny_execmem 1
89
90
91
92       If you want to deny any process from ptracing or  debugging  any  other
93       processes,  you  must  turn  on  the  deny_ptrace  boolean.  Enabled by
94       default.
95
96       setsebool -P deny_ptrace 1
97
98
99
100       If you want to allow all domains to execute in fips_mode, you must turn
101       on the fips_mode boolean. Enabled by default.
102
103       setsebool -P fips_mode 1
104
105
106
107       If  you  want  to allow confined applications to run with kerberos, you
108       must turn on the kerberos_enabled boolean. Disabled by default.
109
110       setsebool -P kerberos_enabled 1
111
112
113
114       If you want to allow system to run with  NIS,  you  must  turn  on  the
115       nis_enabled boolean. Disabled by default.
116
117       setsebool -P nis_enabled 1
118
119
120
121       If you want to enable polyinstantiated directory support, you must turn
122       on the polyinstantiation_enabled boolean. Disabled by default.
123
124       setsebool -P polyinstantiation_enabled 1
125
126
127
128       If you want to allow unconfined executables to make  their  stack  exe‐
129       cutable.   This  should  never, ever be necessary. Probably indicates a
130       badly coded executable, but could indicate an attack.  This  executable
131       should  be reported in bugzilla, you must turn on the selinuxuser_exec‐
132       stack boolean. Disabled by default.
133
134       setsebool -P selinuxuser_execstack 1
135
136
137
138       If you want to support ecryptfs home directories, you must turn on  the
139       use_ecryptfs_home_dirs boolean. Disabled by default.
140
141       setsebool -P use_ecryptfs_home_dirs 1
142
143
144
145       If  you  want  to support fusefs home directories, you must turn on the
146       use_fusefs_home_dirs boolean. Disabled by default.
147
148       setsebool -P use_fusefs_home_dirs 1
149
150
151
152       If you want to support NFS home  directories,  you  must  turn  on  the
153       use_nfs_home_dirs boolean. Enabled by default.
154
155       setsebool -P use_nfs_home_dirs 1
156
157
158
159       If  you  want  to  support SAMBA home directories, you must turn on the
160       use_samba_home_dirs boolean. Disabled by default.
161
162       setsebool -P use_samba_home_dirs 1
163
164
165

PORT TYPES

167       SELinux defines port types to represent TCP and UDP ports.
168
169       You can see the types associated with a port  by  using  the  following
170       command:
171
172       semanage port -l
173
174
175       Policy  governs  the  access  confined  processes  have to these ports.
176       SELinux xdm policy is very flexible allowing users to setup  their  xdm
177       processes in as secure a method as possible.
178
179       The following port types are defined for xdm:
180
181
182       xdmcp_port_t
183
184
185
186       Default Defined Ports:
187                 tcp 177
188                 udp 177
189

MANAGED FILES

191       The  SELinux  process type xdm_t can manage files labeled with the fol‐
192       lowing file types.  The paths listed are the default  paths  for  these
193       file types.  Note the processes UID still need to have DAC permissions.
194
195       anon_inodefs_t
196
197
198       auth_cache_t
199
200            /var/cache/coolkey(/.*)?
201
202       auth_home_t
203
204            /root/.yubico(/.*)?
205            /root/.google_authenticator
206            /root/.google_authenticator~
207            /home/[^/]+/.yubico(/.*)?
208            /home/[^/]+/.google_authenticator
209            /home/[^/]+/.google_authenticator~
210
211       cgroup_t
212
213            /sys/fs/cgroup
214
215       cifs_t
216
217
218       dosfs_t
219
220
221       faillog_t
222
223            /var/log/btmp.*
224            /var/log/faillog.*
225            /var/log/tallylog.*
226            /var/run/faillock(/.*)?
227
228       fusefs_t
229
230            /var/run/user/[^/]*/gvfs
231
232       initrc_var_run_t
233
234            /var/run/utmp
235            /var/run/random-seed
236            /var/run/runlevel.dir
237            /var/run/setmixer_flag
238
239       kdbusfs_t
240
241
242       lastlog_t
243
244            /var/log/lastlog.*
245
246       nfs_t
247
248
249       pam_var_console_t
250
251            /var/run/console(/.*)?
252
253       pam_var_run_t
254
255            /var/(db|adm)/sudo(/.*)?
256            /var/lib/sudo(/.*)?
257            /var/run/sudo(/.*)?
258            /var/run/motd.d(/.*)?
259            /var/run/pam_ssh(/.*)?
260            /var/run/sepermit(/.*)?
261            /var/run/pam_mount(/.*)?
262            /var/run/pam_timestamp(/.*)?
263            /var/run/motd
264
265       security_t
266
267            /selinux
268
269       sysfs_t
270
271            /sys(/.*)?
272
273       systemd_passwd_var_run_t
274
275            /var/run/systemd/ask-password(/.*)?
276            /var/run/systemd/ask-password-block(/.*)?
277
278       var_auth_t
279
280            /var/ace(/.*)?
281            /var/rsa(/.*)?
282            /var/lib/abl(/.*)?
283            /var/lib/rsa(/.*)?
284            /var/lib/pam_ssh(/.*)?
285            /var/lib/pam_shield(/.*)?
286            /var/opt/quest/vas/vasd(/.*)?
287            /var/lib/google-authenticator(/.*)?
288
289       wtmp_t
290
291            /var/log/wtmp.*
292
293       xdm_lock_t
294
295
296       xdm_log_t
297
298            /var/log/[mkwx]dm.log.*
299            /var/log/mdm(/.*)?
300            /var/log/lxdm.log.*
301            /var/log/slim.log.*
302
303       xdm_spool_t
304
305            /var/spool/[mg]dm(/.*)?
306
307       xdm_tmpfs_t
308
309
310       xdm_var_lib_t
311
312            /var/lib/[mxkwg]dm(/.*)?
313            /var/cache/[mg]dm(/.*)?
314            /var/lib/gdm(3)?(/.*)?
315            /var/lib/lxdm(/.*)?
316            /var/lib/sddm(/.*)?
317            /var/lib/lightdm(/.*)?
318            /var/cache/lightdm(/.*)?
319            /var/lib/lightdm-data(/.*)?
320
321       xdm_var_run_t
322
323            /etc/kde[34]?/kdm/backgroundrc
324            /var/run/[kgm]dm(/.*)?
325            /var/run/gdm(3)?.pid
326            /var/run/gdm(3)?(/.*)?
327            /usr/lib/qt-.*/etc/settings(/.*)?
328            /var/run/slim.*
329            /var/run/lxdm(/.*)?
330            /var/run/sddm(/.*)?
331            /var/run/xauth(/.*)?
332            /var/run/xdmctl(/.*)?
333            /var/run/lightdm(/.*)?
334            /var/run/systemd/multi-session-x(/.*)?
335            /var/run/xdm.pid
336            /var/run/lxdm.pid
337            /var/run/lxdm.auth
338            /var/run/gdm_socket
339
340       xkb_var_lib_t
341
342            /var/lib/xkb(/.*)?
343            /usr/X11R6/lib/X11/xkb/.*
344            /usr/X11R6/lib/X11/xkb
345
346       xserver_log_t
347
348            /var/[xgkw]dm(/.*)?
349            /usr/var/[xgkw]dm(/.*)?
350            /var/log/gdm(3)?(/.*)?
351            /var/log/Xorg.*
352            /var/log/XFree86.*
353            /var/log/lightdm(/.*)?
354            /var/log/nvidia-installer.log.*
355
356

FILE CONTEXTS

358       SELinux requires files to have an extended attribute to define the file
359       type.
360
361       You can see the context of a file using the -Z option to ls
362
363       Policy governs the access  confined  processes  have  to  these  files.
364       SELinux  xdm  policy is very flexible allowing users to setup their xdm
365       processes in as secure a method as possible.
366
367       EQUIVALENCE DIRECTORIES
368
369
370       xdm policy stores data with multiple different file context types under
371       the /var/lib/lightdm directory.  If you would like to store the data in
372       a different directory you can use the semanage  command  to  create  an
373       equivalence  mapping.   If you wanted to store this data under the /srv
374       directory you would execute the following command:
375
376       semanage fcontext -a -e /var/lib/lightdm /srv/lightdm
377       restorecon -R -v /srv/lightdm
378
379       xdm policy stores data with multiple different file context types under
380       the /var/run/gdm(3)? directory.  If you would like to store the data in
381       a different directory you can use the semanage  command  to  create  an
382       equivalence  mapping.   If you wanted to store this data under the /srv
383       directory you would execute the following command:
384
385       semanage fcontext -a -e /var/run/gdm(3)? /srv/gdm(3)?
386       restorecon -R -v /srv/gdm(3)?
387
388       xdm policy stores data with multiple different file context types under
389       the  /var/run/lxdm directory.  If you would like to store the data in a
390       different directory you can use  the  semanage  command  to  create  an
391       equivalence  mapping.   If you wanted to store this data under the /srv
392       directory you would execute the following command:
393
394       semanage fcontext -a -e /var/run/lxdm /srv/lxdm
395       restorecon -R -v /srv/lxdm
396
397       STANDARD FILE CONTEXT
398
399       SELinux defines the file context types for the xdm, if  you  wanted  to
400       store  files  with  these types in a diffent paths, you need to execute
401       the semanage command  to  sepecify  alternate  labeling  and  then  use
402       restorecon to put the labels on disk.
403
404       semanage fcontext -a -t xdm_log_t '/srv/myxdm_content(/.*)?'
405       restorecon -R -v /srv/myxdm_content
406
407       Note:  SELinux  often  uses  regular expressions to specify labels that
408       match multiple files.
409
410       The following file types are defined for xdm:
411
412
413
414       xdm_etc_t
415
416       - Set files with the xdm_etc_t type, if you want to store xdm files  in
417       the /etc directories.
418
419
420
421       xdm_exec_t
422
423       - Set files with the xdm_exec_t type, if you want to transition an exe‐
424       cutable to the xdm_t domain.
425
426
427       Paths:
428            /usr/s?bin/nodm,     /usr/s?bin/gdm(3)?,      /usr/s?bin/lightdm*,
429            /usr/s?bin/[mxgkw]dm,                       /usr/s?bin/gdm-binary,
430            /usr/s?bin/lxdm(-binary)?,                /usr/X11R6/bin/[xgkw]dm,
431            /usr/bin/razor-lightdm-.*,      /usr/bin/sddm,      /usr/bin/slim,
432            /usr/bin/gpe-dm,     /opt/kde3/bin/kdm,      /usr/sbin/mdm-binary,
433            /usr/bin/sddm-greeter,                /etc/rc.d/init.d/x11-common,
434            /usr/libexec/gdm-disable-wayland
435
436
437       xdm_home_t
438
439       - Set files with the xdm_home_t type, if you want to store xdm files in
440       the users home directory.
441
442
443       Paths:
444            /root/.dmrc.*,  /root/.wayland-errors.*, /root/.xsession-errors.*,
445            /home/[^/]+/.dmrc.*,                 /home/[^/]+/.cache/gdm(/.*)?,
446            /home/[^/]+/.wayland-errors.*,     /home/[^/]+/.xsession-errors.*,
447            /home/[^/]+/.local/share/xorg(/.*)?
448
449
450       xdm_lock_t
451
452       - Set files with the xdm_lock_t type, if you want to treat the files as
453       xdm lock data, stored under the /var/lock directory
454
455
456
457       xdm_log_t
458
459       -  Set  files with the xdm_log_t type, if you want to treat the data as
460       xdm log data, usually stored under the /var/log directory.
461
462
463       Paths:
464            /var/log/[mkwx]dm.log.*, /var/log/mdm(/.*)?,  /var/log/lxdm.log.*,
465            /var/log/slim.log.*
466
467
468       xdm_rw_etc_t
469
470       -  Set  files  with  the xdm_rw_etc_t type, if you want to store xdm rw
471       files in the /etc directories.
472
473
474       Paths:
475            /etc/X11/wdm(/.*)?, /etc/opt/VirtualGL(/.*)?
476
477
478       xdm_spool_t
479
480       - Set files with the xdm_spool_t type, if you want  to  store  the  xdm
481       files under the /var/spool directory.
482
483
484
485       xdm_tmpfs_t
486
487       -  Set  files with the xdm_tmpfs_t type, if you want to store xdm files
488       on a tmpfs file system.
489
490
491
492       xdm_unconfined_exec_t
493
494       - Set files with the xdm_unconfined_exec_t type, if you want to transi‐
495       tion an executable to the xdm_unconfined_t domain.
496
497
498       Paths:
499            /etc/[mg]dm/Init(/.*)?,               /etc/[mg]dm/PostLogin(/.*)?,
500            /etc/[mg]dm/PreSession(/.*)?, /etc/[mg]dm/PostSession(/.*)?
501
502
503       xdm_unit_file_t
504
505       - Set files with the xdm_unit_file_t type, if you  want  to  treat  the
506       files as xdm unit content.
507
508
509
510       xdm_var_lib_t
511
512       -  Set  files with the xdm_var_lib_t type, if you want to store the xdm
513       files under the /var/lib directory.
514
515
516       Paths:
517            /var/lib/[mxkwg]dm(/.*)?,                 /var/cache/[mg]dm(/.*)?,
518            /var/lib/gdm(3)?(/.*)?,  /var/lib/lxdm(/.*)?, /var/lib/sddm(/.*)?,
519            /var/lib/lightdm(/.*)?,                  /var/cache/lightdm(/.*)?,
520            /var/lib/lightdm-data(/.*)?
521
522
523       xdm_var_run_t
524
525       -  Set  files with the xdm_var_run_t type, if you want to store the xdm
526       files under the /run or /var/run directory.
527
528
529       Paths:
530            /etc/kde[34]?/kdm/backgroundrc,            /var/run/[kgm]dm(/.*)?,
531            /var/run/gdm(3)?.pid,                      /var/run/gdm(3)?(/.*)?,
532            /usr/lib/qt-.*/etc/settings(/.*)?,                /var/run/slim.*,
533            /var/run/lxdm(/.*)?,   /var/run/sddm(/.*)?,  /var/run/xauth(/.*)?,
534            /var/run/xdmctl(/.*)?,    /var/run/lightdm(/.*)?,    /var/run/sys‐
535            temd/multi-session-x(/.*)?,  /var/run/xdm.pid,  /var/run/lxdm.pid,
536            /var/run/lxdm.auth, /var/run/gdm_socket
537
538
539       Note: File context can be temporarily modified with the chcon  command.
540       If  you want to permanently change the file context you need to use the
541       semanage fcontext command.  This will modify the SELinux labeling data‐
542       base.  You will need to use restorecon to apply the labels.
543
544

COMMANDS

546       semanage  fcontext  can also be used to manipulate default file context
547       mappings.
548
549       semanage permissive can also be used to manipulate  whether  or  not  a
550       process type is permissive.
551
552       semanage  module can also be used to enable/disable/install/remove pol‐
553       icy modules.
554
555       semanage port can also be used to manipulate the port definitions
556
557       semanage boolean can also be used to manipulate the booleans
558
559
560       system-config-selinux is a GUI tool available to customize SELinux pol‐
561       icy settings.
562
563

AUTHOR

565       This manual page was auto-generated using sepolicy manpage .
566
567

SEE ALSO

569       selinux(8),  xdm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
570       setsebool(8), xdm_unconfined_selinux(8), xdm_unconfined_selinux(8)
571
572
573
574xdm                                20-05-05                     xdm_selinux(8)
Impressum