1xserver_selinux(8)          SELinux Policy xserver          xserver_selinux(8)
2
3
4

NAME

6       xserver_selinux  -  Security Enhanced Linux Policy for the xserver pro‐
7       cesses
8

DESCRIPTION

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

ENTRYPOINTS

24       The  xserver_t  SELinux type can be entered via the xserver_exec_t file
25       type.
26
27       The default entrypoint paths for the xserver_t domain are  the  follow‐
28       ing:
29
30       /usr/bin/nvidia.*,    /usr/bin/Xair,    /usr/bin/Xorg,   /usr/bin/Xvnc,
31       /usr/bin/Xephyr, /usr/bin/x11vnc, /usr/X11R6/bin/X,  /usr/bin/Xwayland,
32       /usr/X11R6/bin/Xorg,    /usr/X11R6/bin/Xipaq,    /usr/libexec/Xorg.bin,
33       /usr/X11R6/bin/XFree86,  /usr/libexec/Xorg.wrap,  /usr/X11R6/bin/Xwrap‐
34       per, /usr/libexec/gsd-backlight-helper
35

PROCESS TYPES

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

BOOLEANS

57       SELinux policy is customizable based on least access required.  xserver
58       policy is extremely flexible and has several booleans that allow you to
59       manipulate  the  policy and run xserver with the tightest access possi‐
60       ble.
61
62
63
64       If you want to allows XServer to execute writable memory, you must turn
65       on the xserver_execmem boolean. Disabled by default.
66
67       setsebool -P xserver_execmem 1
68
69
70
71       If you want to support X userspace object manager, you must turn on the
72       xserver_object_manager boolean. Disabled by default.
73
74       setsebool -P xserver_object_manager 1
75
76
77
78       If you want to deny user domains applications to map a memory region as
79       both  executable  and  writable,  this  is dangerous and the executable
80       should be reported in bugzilla, you must turn on the deny_execmem bool‐
81       ean. Disabled by default.
82
83       setsebool -P deny_execmem 1
84
85
86
87       If  you  want  to control the ability to mmap a low area of the address
88       space, as configured by /proc/sys/vm/mmap_min_addr, you  must  turn  on
89       the mmap_low_allowed boolean. Disabled by default.
90
91       setsebool -P mmap_low_allowed 1
92
93
94
95       If  you  want  to  allow  system  to run with NIS, you must turn on the
96       nis_enabled boolean. Disabled by default.
97
98       setsebool -P nis_enabled 1
99
100
101
102       If you want to disable kernel module loading, you must turn on the  se‐
103       cure_mode_insmod boolean. Disabled by default.
104
105       setsebool -P secure_mode_insmod 1
106
107
108
109       If  you  want to allow unconfined executables to make their heap memory
110       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
111       badly  coded  executable, but could indicate an attack. This executable
112       should be reported in bugzilla, you must turn  on  the  selinuxuser_ex‐
113       echeap boolean. Disabled by default.
114
115       setsebool -P selinuxuser_execheap 1
116
117
118
119       If  you  want  to allow unconfined executables to make their stack exe‐
120       cutable.  This should never, ever be necessary.  Probably  indicates  a
121       badly  coded  executable, but could indicate an attack. This executable
122       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
123       stack boolean. Enabled by default.
124
125       setsebool -P selinuxuser_execstack 1
126
127
128

PORT TYPES

130       SELinux defines port types to represent TCP and UDP ports.
131
132       You  can  see  the  types associated with a port by using the following
133       command:
134
135       semanage port -l
136
137
138       Policy governs the access  confined  processes  have  to  these  ports.
139       SELinux  xserver  policy is very flexible allowing users to setup their
140       xserver processes in as secure a method as possible.
141
142       The following port types are defined for xserver:
143
144
145       xserver_port_t
146
147
148
149       Default Defined Ports:
150                 tcp 6000-6020
151

MANAGED FILES

153       The SELinux process type xserver_t can manage files  labeled  with  the
154       following file types.  The paths listed are the default paths for these
155       file types.  Note the processes UID still need to have DAC permissions.
156
157       file_type
158
159            all files on the system
160
161

FILE CONTEXTS

163       SELinux requires files to have an extended attribute to define the file
164       type.
165
166       You can see the context of a file using the -Z option to ls
167
168       Policy  governs  the  access  confined  processes  have to these files.
169       SELinux xserver policy is very flexible allowing users to  setup  their
170       xserver processes in as secure a method as possible.
171
172       STANDARD FILE CONTEXT
173
174       SELinux  defines  the file context types for the xserver, if you wanted
175       to store files with these types in a different paths, you need to  exe‐
176       cute  the  semanage  command to specify alternate labeling and then use
177       restorecon to put the labels on disk.
178
179       semanage fcontext -a -t xserver_var_lib_t '/srv/xserver/content(/.*)?'
180       restorecon -R -v /srv/myxserver_content
181
182       Note: SELinux often uses regular expressions  to  specify  labels  that
183       match multiple files.
184
185       The following file types are defined for xserver:
186
187
188
189       xserver_etc_t
190
191       -  Set  files with the xserver_etc_t type, if you want to store xserver
192       files in the /etc directories.
193
194
195
196       xserver_exec_t
197
198       - Set files with the xserver_exec_t type, if you want to transition  an
199       executable to the xserver_t domain.
200
201
202       Paths:
203            /usr/bin/nvidia.*,  /usr/bin/Xair,  /usr/bin/Xorg,  /usr/bin/Xvnc,
204            /usr/bin/Xephyr, /usr/bin/x11vnc, /usr/X11R6/bin/X, /usr/bin/Xway‐
205            land,          /usr/X11R6/bin/Xorg,          /usr/X11R6/bin/Xipaq,
206            /usr/libexec/Xorg.bin,                     /usr/X11R6/bin/XFree86,
207            /usr/libexec/Xorg.wrap, /usr/X11R6/bin/Xwrapper, /usr/libexec/gsd-
208            backlight-helper
209
210
211       xserver_log_t
212
213       - Set files with the xserver_log_t type, if you want to treat the  data
214       as xserver log data, usually stored under the /var/log directory.
215
216
217       Paths:
218            /var/[xgkw]dm(/.*)?,                      /usr/var/[xgkw]dm(/.*)?,
219            /var/log/gdm(3)?(/.*)?,    /var/log/Xorg.*,    /var/log/XFree86.*,
220            /var/log/lightdm(/.*)?, /var/log/nvidia-installer.log.*
221
222
223       xserver_tmpfs_t
224
225       - Set files with the xserver_tmpfs_t type, if you want to store xserver
226       files on a tmpfs file system.
227
228
229
230       xserver_var_lib_t
231
232       - Set files with the xserver_var_lib_t type, if you want to  store  the
233       xserver files under the /var/lib directory.
234
235
236
237       xserver_var_run_t
238
239       -  Set  files with the xserver_var_run_t type, if you want to store the
240       xserver files under the /run or /var/run directory.
241
242
243       Paths:
244            /var/run/xorg(/.*)?, /var/run/video.rom
245
246
247       Note: File context can be temporarily modified with the chcon  command.
248       If  you want to permanently change the file context you need to use the
249       semanage fcontext command.  This will modify the SELinux labeling data‐
250       base.  You will need to use restorecon to apply the labels.
251
252

COMMANDS

254       semanage  fcontext  can also be used to manipulate default file context
255       mappings.
256
257       semanage permissive can also be used to manipulate  whether  or  not  a
258       process type is permissive.
259
260       semanage  module can also be used to enable/disable/install/remove pol‐
261       icy modules.
262
263       semanage port can also be used to manipulate the port definitions
264
265       semanage boolean can also be used to manipulate the booleans
266
267
268       system-config-selinux is a GUI tool available to customize SELinux pol‐
269       icy settings.
270
271

AUTHOR

273       This manual page was auto-generated using sepolicy manpage .
274
275

SEE ALSO

277       selinux(8),  xserver(8),  semanage(8),  restorecon(8), chcon(1), sepol‐
278       icy(8), setsebool(8)
279
280
281
282xserver                            23-10-20                 xserver_selinux(8)
Impressum