SDL/src/joystick/linux
Simon McVittie b0eba1c55d joystick: Use inotify to detect joystick unplug if not using udev
This improves SDL's ability to detect joystick hotplug in a container
environment.

We cannot reliably receive events from udev in a container, because they
are delivered as netlink events, which are authenticated by their uid
being 0. However, in a user namespace created by an unprivileged user
(for example bubblewrap, as used by Flatpak and Steam's
pressure-vessel-wrap), the kernel does not allow us to map uid 0, and
the netlink events appear to be from the kernel's overflowuid (typically
65534/nobody), meaning libudev cannot distinguish between genuine uevents
from udevd and an attack by a malicious local user.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-11-11 19:15:32 -08:00
..
SDL_sysjoystick_c.h joystick: Linux joysticks now recover better from dropped events. 2020-06-28 16:23:05 -04:00
SDL_sysjoystick.c joystick: Use inotify to detect joystick unplug if not using udev 2020-11-11 19:15:32 -08:00