]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
evdev: export event device properties through sysctl interface
authorwulf <wulf@FreeBSD.org>
Sun, 24 Feb 2019 18:47:04 +0000 (18:47 +0000)
committerwulf <wulf@FreeBSD.org>
Sun, 24 Feb 2019 18:47:04 +0000 (18:47 +0000)
commitfea6adbc283e9b2fae4f90d567aea71dfe68ed10
tree1fe791e1296dd88b1ed2997d309686301805e8b6
parent9b119019bfd4d305d8e83fad60229ffbfe01563f
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
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18694
sbin/sysctl/sysctl.c
sys/dev/evdev/evdev.c
sys/dev/evdev/evdev_private.h