summarylogtreecommitdiffstats
path: root/0016-logind-fix-sd_eviocrevoke-ioctl-call.patch
diff options
context:
space:
mode:
Diffstat (limited to '0016-logind-fix-sd_eviocrevoke-ioctl-call.patch')
-rw-r--r--0016-logind-fix-sd_eviocrevoke-ioctl-call.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/0016-logind-fix-sd_eviocrevoke-ioctl-call.patch b/0016-logind-fix-sd_eviocrevoke-ioctl-call.patch
new file mode 100644
index 000000000000..f32ba066098e
--- /dev/null
+++ b/0016-logind-fix-sd_eviocrevoke-ioctl-call.patch
@@ -0,0 +1,30 @@
+From 8dbce34b0373923c7aa7d795024bbedb0a85c7ea Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 22 Jan 2015 11:36:02 +1000
+Subject: [PATCH] logind: fix sd_eviocrevoke ioctl call
+
+If the third argument is non-null, the kernel will always error out with
+EINVAL and devices won't get revoked.
+
+Reported-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ src/login/logind-session-device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c
+index 932abb8..c2de862 100644
+--- a/src/login/logind-session-device.c
++++ b/src/login/logind-session-device.c
+@@ -107,7 +107,7 @@ static int sd_eviocrevoke(int fd) {
+
+ assert(fd >= 0);
+
+- r = ioctl(fd, EVIOCREVOKE, 1);
++ r = ioctl(fd, EVIOCREVOKE, NULL);
+ if (r < 0) {
+ r = -errno;
+ if (r == -EINVAL && !warned) {
+--
+2.3.0
+