Sweden-Number/dlls/winebus.sys
Simon McVittie ab3416c61f winebus.sys: Add code path to bypass udevd and use inotify.
In a container with a non-trivial user namespace, we cannot rely on
libudev communicating with udevd as a way to monitor device nodes,
for the following reasons:

* If uid 0 from the host is not mapped to uid 0 in the container, libudev
  cannot authenticate netlink messages from the host, because their sender
  uid appears to be the overflowuid. Resolving this by mapping uid 0 into
  the container is not allowed when creating user namespaces as an
  unprivileged user, and even when running as a privileged user, it might
  be desirable for the real uid 0 to not be mapped as a way to harden the
  security boundary between container and host.

* Depending on the container configuration, initial enumeration might
  not be able to read /run/udev from the host system. If it can't, sysfs
  attributes will still work because those are read directly from the
  kernel via sysfs, but udev properties coming from user-space rules
  (in particular ID_INPUT_JOYSTICK and friends) will appear to be missing.

* The protocols between udevd and libudev (netlink messages for monitoring,
  and /run/udev for initial enumeration) are considered to be private to
  a particular version of udev, and are not a stable API; but in a
  container, we cannot expect that our copy of libudev is at exactly the
  same version as udevd on the host system.

Sidestep this by adding a code path that continues to use libudev for
the parts that work regardless of whether udevd is running or can be
communicated with.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 16:16:07 +02:00
..
Makefile.in winebus.sys: Query and parse device report descriptor on device start. 2021-10-08 15:27:25 +02:00
bus_iohid.c winebus.sys: Convert the product strings to Unicode on the Unix-side. 2021-10-05 11:51:04 +02:00
bus_sdl.c winebus.sys: Only use SDL_JoystickRumble as a fallback. 2021-10-18 18:36:30 +02:00
bus_udev.c winebus.sys: Add code path to bypass udevd and use inotify. 2021-10-20 16:16:07 +02:00
hid.c winebus.sys: Add a PID set ramp force output report. 2021-10-08 15:27:25 +02:00
main.c winebus.sys: Add code path to bypass udevd and use inotify. 2021-10-20 16:16:07 +02:00
pop_hid_macros.h winebus.sys: Use macros to define HID reports. 2021-06-02 20:28:03 +02:00
psh_hid_macros.h winebus.sys: Use macros to define HID reports. 2021-06-02 20:28:03 +02:00
unix_private.h winebus.sys: Process quirky DS4 bluetooth reports. 2021-10-18 18:36:32 +02:00
unixlib.c winebus.sys: Process quirky DS4 bluetooth reports. 2021-10-18 18:36:32 +02:00
unixlib.h winebus.sys: Add code path to bypass udevd and use inotify. 2021-10-20 16:16:07 +02:00
winebus.inf
winebus.rc
winebus.sys.spec