[systemd-commits] src/login

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Thu Jan 22 07:58:36 PST 2015


 src/login/logind-session-device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8dbce34b0373923c7aa7d795024bbedb0a85c7ea
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jan 22 11:36:02 2015 +1000

    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 at gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

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) {



More information about the systemd-commits mailing list