-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for sysctl-based evdev property enumeration #8
Conversation
e0a08ce
to
66ff411
Compare
This needs to be made (if it isn't already) so that this works on FreeBSD versions both with and without the sysctls in your base patch. It looks like this is already done. |
I have no objections, but would like to see where the FreeBSD base part of this goes first. |
Hm. I probably made a mistake there, I only intended to add myself to reviewers, not remove the other ones. |
Yeah, it is compatible with the old way, of course: goto use_ioctl; Just retested with an old kernel, no problems, the old one requires |
Yeah, I noticed that when I took a closer look at the code. |
891ae40
to
4b1e63d
Compare
4b1e63d
to
cc1d9a5
Compare
Is this current with the changes that just went into the kernel, or does it need adjusting? |
"input_id" was renamed to just "id". I pushed the corresponding change here. Will re-test everything later today when I get home. |
Yep, everything works great, this is good to go. |
cc1d9a5
to
60d80e2
Compare
ping |
A big security advantage of Wayland is not allowing applications to read input devices all the time. Having /dev/input/* accessible to the user account subverts this advantage. libudev-devd was opening the evdev devices to detect their types (mouse, keyboard, touchpad, etc). This does not work when /dev/input/* is inaccessible. With the kernel exposing this information via sysctls, we can work without /dev/input/* access, preserving the Wayland security model.
60d80e2
to
3311b24
Compare
rebased. wooo CI works nice |
@zeising ping |
pong! Looks like things are in the kernel. Are we good to merge this and update the port? |
Yeah the things have been in kernel (including -STABLE) for a while. |
Sorry, I've been focusing on other things. |
A big security advantage of Wayland is not allowing applications to read input devices all the time. Having
/dev/input/*
accessible to the user account subverts this advantage.libudev-devd was opening the evdev devices to detect their types (mouse, keyboard, touchpad, etc). This does not work when
/dev/input/*
is inaccessible.With the kernel exposing this information as sysctls, we can work without
/dev/input/*
access, preserving the Wayland security model.Even more: thanks to libcasper, it was pretty easy to add Capsicum support, so now my capsicumized Weston can hotplug devices! :) (UPD: left that out for now)