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,
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. Enabled 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. Enabled 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  disable  kernel module loading, you must turn on the
96       secure_mode_insmod boolean. Enabled by default.
97
98       setsebool -P secure_mode_insmod 1
99
100
101
102       If you want to allow unconfined executables to make their  heap  memory
103       executable.   Doing  this  is  a  really bad idea. Probably indicates a
104       badly coded executable, but could indicate an attack.  This  executable
105       should   be   reported  in  bugzilla,  you  must  turn  on  the  selin‐
106       uxuser_execheap boolean. Disabled by default.
107
108       setsebool -P selinuxuser_execheap 1
109
110
111
112       If you want to allow unconfined executables to make  their  stack  exe‐
113       cutable.   This  should  never, ever be necessary. Probably indicates a
114       badly coded executable, but could indicate an attack.  This  executable
115       should  be reported in bugzilla, you must turn on the selinuxuser_exec‐
116       stack boolean. Disabled by default.
117
118       setsebool -P selinuxuser_execstack 1
119
120
121

PORT TYPES

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

MANAGED FILES

146       The  SELinux  process  type xserver_t can manage files labeled with the
147       following file types.  The paths listed are the default paths for these
148       file types.  Note the processes UID still need to have DAC permissions.
149
150       file_type
151
152            all files on the system
153
154

FILE CONTEXTS

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

COMMANDS

246       semanage  fcontext  can also be used to manipulate default file context
247       mappings.
248
249       semanage permissive can also be used to manipulate  whether  or  not  a
250       process type is permissive.
251
252       semanage  module can also be used to enable/disable/install/remove pol‐
253       icy modules.
254
255       semanage port can also be used to manipulate the port definitions
256
257       semanage boolean can also be used to manipulate the booleans
258
259
260       system-config-selinux is a GUI tool available to customize SELinux pol‐
261       icy settings.
262
263

AUTHOR

265       This manual page was auto-generated using sepolicy manpage .
266
267

SEE ALSO

269       selinux(8),  xserver(8),  semanage(8),  restorecon(8), chcon(1), sepol‐
270       icy(8), setsebool(8)
271
272
273
274xserver                            21-03-26                 xserver_selinux(8)
Impressum