]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r344494,r344495:
authorwulf <wulf@FreeBSD.org>
Sun, 10 Mar 2019 20:58:24 +0000 (20:58 +0000)
committerwulf <wulf@FreeBSD.org>
Sun, 10 Mar 2019 20:58:24 +0000 (20:58 +0000)
commit4d66ca41768ffe8ca574b4b5213428592fcdf3ee
treeeddb97399425367555de5a418cd6b0d9e0f3c4c2
parentd2223de2f9fe1c0c3c0f2b5326ecf0322f5ebec1
MFC r344494,r344495:

evdev: export event device properties through sysctl interface

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 don't work if /dev/input/* is inaccessible.
With the kernel exposing this information as sysctls (kern.evdev.input.*),
we can work w/o /dev/input/* access, preserving the Wayland security model.

Submitted by: Greg V <greg@unrelenting.technology>
Reviewed by: wulf, imp
Differential Revision: https://reviews.freebsd.org/D18694
sbin/sysctl/sysctl.c
sys/dev/evdev/evdev.c
sys/dev/evdev/evdev_private.h