swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit ab8130100e17b0e06c26b895151a7c9315a597e6
parent c14bbfb37abcbea6227d3be1ec582b9422c57f29
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 15 Sep 2020 22:31:54 -0700

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.

Diffstat:
Mlibswc/seat.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libswc/seat.c b/libswc/seat.c @@ -46,6 +46,10 @@ # include <libudev.h> #endif +#ifndef NETLINK_MASK +# define NETLINK_MASK 4 +#endif + struct seat { struct swc_seat base; @@ -324,7 +328,7 @@ initialize_libinput(struct seat *seat) seat->libinput = libinput_udev_create_context(&libinput_interface, NULL, seat->udev); #else - seat->libinput = libinput_netlink_create_context(&libinput_interface, NULL); + seat->libinput = libinput_netlink_create_context(&libinput_interface, NULL, NETLINK_MASK); #endif if (!seat->libinput) {