commit ab81301

Michael Forney  ·  2020-09-16 05:31:54 +0000 UTC
parent c14bbfb
seat: Listen for uevents with group mask 4 by default

This way, the device manager can rebroadcast the uevents from the
kernel *after* setting the permissions.

Since Linux 5.8 no longer requires root to drop DRM master, we no
longer require setuid for the launcher. However, this means we can
longer expect to be able to open input devices based on uevents
from the kernel. Instead, expect the device manager to rebroadcast
the uevents when it has handled them.

Users that want to restore the previous behavior can build with
SWC_NETLINK_MASK=1.
1 files changed,  +5, -1
+5, -1
 1@@ -46,6 +46,10 @@
 2 # include <libudev.h>
 3 #endif
 4 
 5+#ifndef NETLINK_MASK
 6+# define NETLINK_MASK 4
 7+#endif
 8+
 9 struct seat {
10 	struct swc_seat base;
11 
12@@ -324,7 +328,7 @@ initialize_libinput(struct seat *seat)
13 
14 	seat->libinput = libinput_udev_create_context(&libinput_interface, NULL, seat->udev);
15 #else
16-	seat->libinput = libinput_netlink_create_context(&libinput_interface, NULL);
17+	seat->libinput = libinput_netlink_create_context(&libinput_interface, NULL, NETLINK_MASK);
18 #endif
19 
20 	if (!seat->libinput) {