Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 3dd8bca5a331f46a5ba1cbec6d91c01d > files > 16

systemd-217-11.2.mga5.src.rpm

From 51cd916a26b8bca72bdeec60ac12fe7c217b582c Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 22 Jan 2015 08:25:18 +0000
Subject: [PATCH 115/115] 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.2.2