From b7a2d6b8e2179e89184532bdde07c500607119c9 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 27 Dec 2013 16:26:07 +0100 Subject: do not crash if /dev/input/eventX doesn't exist (mga#10296) do not attempt to create /dev/* if not root like previous commit, issue introduced in commit eea2f8ef9ddf7e461702d8fda0b8e98e623694c2 by Arnaud Patard on Mar 18 2011 --- perl-install/NEWS | 1 + perl-install/detect_devices.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index d9ce9e379..61efd0828 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,5 +1,6 @@ - detecting input devices: o display the real accessed /dev/input/eventX file (mga#8232) + o do not crash if /dev/input/eventX doesn't exist (mga#10296) - draksec: o use expanders for clarity diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 184a1db31..76e6e2a24 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -565,7 +565,7 @@ sub getInputDevices() { #- KEY=30000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT #- KEY=70000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE #- KEY=1f0000 0 0 0 0 0 0 0 0 #=> BTN_LEFT BTN_RIGHT BTN_MIDDLE BTN_SIDE BTN_EXTRA - if (! -f "/dev/input/$event") { + if (!$> && ! -f "/dev/input/$event") { devices::make("/dev/input/$event"); } my @KEYS = c::EVIocGBitKey("/dev/input/$event"); -- cgit v1.2.1