kernel/evdev: create input devices with UID_ROOT and GID_WHEEL
authorPeeter Must <karu.pruun@gmail.com>
Sat, 1 Jun 2019 06:56:05 +0000 (09:56 +0300)
committerPeeter Must <karu.pruun@gmail.com>
Sat, 1 Jun 2019 06:56:05 +0000 (09:56 +0300)
* In preparation to follow the same scheme as in drm devices:
  access rights will be set using the devfs system, see commit
  82aec1d31805500239e50c9b6ed8d25802b0a17c.

sys/dev/misc/evdev/cdev.c

index 1190d69..4a38062 100644 (file)
@@ -65,7 +65,6 @@
 #endif
 
 #define        DEF_RING_REPORTS        8
-#define GID_INPUT              107     /* input group */
 
 static d_open_t                evdev_open;
 static d_read_t                evdev_read;
@@ -699,8 +698,8 @@ evdev_cdev_create(struct evdev_dev *evdev)
         * will make st_rdev unique. This is needed by libinput, which
         * determines eventX from st_rdev.
         */
-       dev = make_dev(&evdev_cdevsw, unit, UID_ROOT, GID_INPUT,
-                                 0660, "input/event%d", unit);
+       dev = make_dev(&evdev_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600,
+           "input/event%d", unit);
 
        if (dev != NULL) {
                dev->si_drv1 = evdev;