Skip to content

xwayland: rely on the system to manage /tmp correctly

Sebastian Wick requested to merge swick/mutter:tmp-x11-unix into main

If the /tmp/.X11-unix directory is owned by another user, the socket created in that directory is under that users control and makes symlink attacks possible. There is system mechanisms in place to prevent that from happening like systemd-tmpfiles or SELinux polyinstantiation. We used to check the permissions on the tmp directory to figure out if such a system was set up. The check doesn't work in certain user namespaces because the parent root user is mapped to /proc/sys/kernel/overflowuid just like other users, making it impossible ro start Xwayland on valid configurations.

This commit removes the checks and starts relying on the system to properly manage /tmp .

Merge request reports