Commit graph

4 commits

Author SHA1 Message Date
Vlad Zahorodnii
c5e91b94c4 xwayland: Refuse to create connection sockets if sockets dir doesn't exist
Since kwin runs as a normal user, it cannot create the X11 connection
socket directory because any user process can easily compromise the
security of the system by unsetting the sticky bit.

In order to guarantee the security of the system, the socket directory
must be created by root and have the sticky bit on.
2021-02-12 10:03:02 +02:00
Vlad Zahorodnii
118b817134 xwayland: Reserve enough space for sun_path
We also need to reserve space for the final null terminator.
2021-02-11 20:57:48 +00:00
Vlad Zahorodnii
93d5901c85 Fix build on FreeBSD 2021-02-11 18:21:32 +02:00
Vlad Zahorodnii
9f0f452702 xwayland: Manually create sockets
This provides kwin greater control over how X11 sockets are created for
Xwayland. For example, it can be used to ensure that the DISPLAY remains
the same across Xwayland server restarts or launching Xwayland on
demand.

Even though -listen <fd> option is deprecated, we still pass it because
older versions of Xwayland may not have the -listenfd option.
2021-02-11 15:10:01 +00:00