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 file_type, unla‐
25       beled_t,  proc_type,  xserver_exec_t,  filesystem_type,  mtrr_device_t,
26       sysctl_type file types.
27
28       The  default  entrypoint paths for the xserver_t domain are the follow‐
29       ing:
30
31       all files on the system, /usr/bin/Xair, /usr/bin/Xorg, /usr/bin/Xephyr,
32       /usr/X11R6/bin/X,       /usr/X11R6/bin/Xorg,      /usr/X11R6/bin/Xipaq,
33       /usr/local/bin/x11vnc, /usr/X11R6/bin/XFree86, /usr/X11R6/bin/Xwrapper,
34       /etc/init.d/xfree86-common, /dev/cpu/mtrr
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 support X userspace object manager, you must turn on the
65       xserver_object_manager boolean. Disabled by default.
66
67       setsebool -P xserver_object_manager 1
68
69
70
71       If  you  want to allow all daemons the ability to read/write terminals,
72       you  must  turn  on  the  allow_daemons_use_tty  boolean.  Disabled  by
73       default.
74
75       setsebool -P allow_daemons_use_tty 1
76
77
78
79       If you want to allow all domains to use other domains file descriptors,
80       you must turn on the allow_domain_fd_use boolean. Enabled by default.
81
82       setsebool -P allow_domain_fd_use 1
83
84
85
86       If you want to allow unconfined executables to make their  heap  memory
87       executable.   Doing  this  is  a  really bad idea. Probably indicates a
88       badly coded executable, but could indicate an attack.  This  executable
89       should  be  reported  in  bugzilla, you must turn on the allow_execheap
90       boolean. Disabled by default.
91
92       setsebool -P allow_execheap 1
93
94
95
96       If you want to allow unconfined executables to map a memory  region  as
97       both  executable  and  writable,  this  is dangerous and the executable
98       should be reported in bugzilla), you must  turn  on  the  allow_execmem
99       boolean. Enabled by default.
100
101       setsebool -P allow_execmem 1
102
103
104
105       If  you  want  to  allow  all  unconfined  executables to use libraries
106       requiring text relocation that are not  labeled  textrel_shlib_t),  you
107       must turn on the allow_execmod boolean. Enabled by default.
108
109       setsebool -P allow_execmod 1
110
111
112
113       If  you  want  to allow unconfined executables to make their stack exe‐
114       cutable.  This should never, ever be necessary.  Probably  indicates  a
115       badly  coded  executable, but could indicate an attack. This executable
116       should be reported in bugzilla), you must turn on  the  allow_execstack
117       boolean. Enabled by default.
118
119       setsebool -P allow_execstack 1
120
121
122
123       If  you  want  to allow confined applications to run with kerberos, you
124       must turn on the allow_kerberos boolean. Enabled by default.
125
126       setsebool -P allow_kerberos 1
127
128
129
130       If you want to allow sysadm to debug or ptrace all processes, you  must
131       turn on the allow_ptrace boolean. Disabled by default.
132
133       setsebool -P allow_ptrace 1
134
135
136
137       If you want to allows XServer to execute writable memory, you must turn
138       on the allow_xserver_execmem boolean. Disabled by default.
139
140       setsebool -P allow_xserver_execmem 1
141
142
143
144       If you want to allow system to run with  NIS,  you  must  turn  on  the
145       allow_ypbind boolean. Disabled by default.
146
147       setsebool -P allow_ypbind 1
148
149
150
151       If  you  want to allow all domains to have the kernel load modules, you
152       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
153       default.
154
155       setsebool -P domain_kernel_load_modules 1
156
157
158
159       If you want to allow all domains to execute in fips_mode, you must turn
160       on the fips_mode boolean. Enabled by default.
161
162       setsebool -P fips_mode 1
163
164
165
166       If you want to enable reading of urandom for all domains, you must turn
167       on the global_ssp boolean. Disabled by default.
168
169       setsebool -P global_ssp 1
170
171
172
173       If  you  want to allow certain domains to map low memory in the kernel,
174       you must turn on the mmap_low_allowed boolean. Disabled by default.
175
176       setsebool -P mmap_low_allowed 1
177
178
179
180       If you want to allow confined applications to use nscd  shared  memory,
181       you must turn on the nscd_use_shm boolean. Enabled by default.
182
183       setsebool -P nscd_use_shm 1
184
185
186
187       If  you  want  to  disable  transitions to insmod, you must turn on the
188       secure_mode_insmod boolean. Disabled by default.
189
190       setsebool -P secure_mode_insmod 1
191
192
193
194       If you want to boolean to determine whether the system permits  loading
195       policy,  setting enforcing mode, and changing boolean values.  Set this
196       to true and you have to reboot to set it back, you  must  turn  on  the
197       secure_mode_policyload boolean. Disabled by default.
198
199       setsebool -P secure_mode_policyload 1
200
201
202
203       If  you  want  to  support  NFS  home directories, you must turn on the
204       use_nfs_home_dirs boolean. Disabled by default.
205
206       setsebool -P use_nfs_home_dirs 1
207
208
209
210       If you want to support SAMBA home directories, you  must  turn  on  the
211       use_samba_home_dirs boolean. Disabled by default.
212
213       setsebool -P use_samba_home_dirs 1
214
215
216

PORT TYPES

218       SELinux defines port types to represent TCP and UDP ports.
219
220       You  can  see  the  types associated with a port by using the following
221       command:
222
223       semanage port -l
224
225
226       Policy governs the access  confined  processes  have  to  these  ports.
227       SELinux  xserver  policy is very flexible allowing users to setup their
228       xserver processes in as secure a method as possible.
229
230       The following port types are defined for xserver:
231
232
233       xserver_port_t
234
235
236
237       Default Defined Ports:
238                 tcp 6000-6150
239

MANAGED FILES

241       The SELinux process type xserver_t can manage files  labeled  with  the
242       following file types.  The paths listed are the default paths for these
243       file types.  Note the processes UID still need to have DAC permissions.
244
245       file_type
246
247            all files on the system
248
249

FILE CONTEXTS

251       SELinux requires files to have an extended attribute to define the file
252       type.
253
254       You can see the context of a file using the -Z option to ls
255
256       Policy  governs  the  access  confined  processes  have to these files.
257       SELinux xserver policy is very flexible allowing users to  setup  their
258       xserver processes in as secure a method as possible.
259
260       STANDARD FILE CONTEXT
261
262       SELinux  defines  the file context types for the xserver, if you wanted
263       to store files with these types in a diffent paths, you need to execute
264       the  semanage  command  to  sepecify  alternate  labeling  and then use
265       restorecon to put the labels on disk.
266
267       semanage  fcontext   -a   -t   xserver_var_run_t   '/srv/myxserver_con‐
268       tent(/.*)?'
269       restorecon -R -v /srv/myxserver_content
270
271       Note:  SELinux  often  uses  regular expressions to specify labels that
272       match multiple files.
273
274       The following file types are defined for xserver:
275
276
277
278       xserver_exec_t
279
280       - Set files with the xserver_exec_t type, if you want to transition  an
281       executable to the xserver_t domain.
282
283
284       Paths:
285            /usr/bin/Xair,  /usr/bin/Xorg,  /usr/bin/Xephyr, /usr/X11R6/bin/X,
286            /usr/X11R6/bin/Xorg, /usr/X11R6/bin/Xipaq,  /usr/local/bin/x11vnc,
287            /usr/X11R6/bin/XFree86,                   /usr/X11R6/bin/Xwrapper,
288            /etc/init.d/xfree86-common
289
290
291       xserver_log_t
292
293       - Set files with the xserver_log_t type, if you want to treat the  data
294       as xserver log data, usually stored under the /var/log directory.
295
296
297       Paths:
298            /var/[xgk]dm(/.*)?,                         /var/log/[kw]dm.log.*,
299            /usr/var/[xgkw]dm(/.*)?,   /var/log/Xorg.*,    /var/log/XFree86.*,
300            /var/log/nvidia-installer.log.*
301
302
303       xserver_tmpfs_t
304
305       - Set files with the xserver_tmpfs_t type, if you want to store xserver
306       files on a tmpfs file system.
307
308
309
310       xserver_var_lib_t
311
312       - Set files with the xserver_var_lib_t type, if you want to  store  the
313       xserver files under the /var/lib directory.
314
315
316
317       xserver_var_run_t
318
319       -  Set  files with the xserver_var_run_t type, if you want to store the
320       xserver files under the /run or /var/run directory.
321
322
323       Paths:
324            /var/run/xorg(/.*)?, /var/run/video.rom
325
326
327       Note: File context can be temporarily modified with the chcon  command.
328       If  you want to permanently change the file context you need to use the
329       semanage fcontext command.  This will modify the SELinux labeling data‐
330       base.  You will need to use restorecon to apply the labels.
331
332

COMMANDS

334       semanage  fcontext  can also be used to manipulate default file context
335       mappings.
336
337       semanage permissive can also be used to manipulate  whether  or  not  a
338       process type is permissive.
339
340       semanage  module can also be used to enable/disable/install/remove pol‐
341       icy modules.
342
343       semanage port can also be used to manipulate the port definitions
344
345       semanage boolean can also be used to manipulate the booleans
346
347
348       system-config-selinux is a GUI tool available to customize SELinux pol‐
349       icy settings.
350
351

AUTHOR

353       This manual page was auto-generated using sepolicy manpage .
354
355

SEE ALSO

357       selinux(8),  xserver(8),  semanage(8), restorecon(8), chcon(1) , setse‐
358       bool(8)
359
360
361
362xserver                            15-06-03                 xserver_selinux(8)
Impressum