From: Peter Hutterer Date: Thu, 22 Jan 2015 01:36:02 +0000 (+1000) Subject: logind: fix sd_eviocrevoke ioctl call X-Git-Tag: v219~358 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8dbce34b0373923c7aa7d795024bbedb0a85c7ea;hp=b5b38b41c37dbe1a117af9bf99e94b58ac91239a;p=elogind.git 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 Signed-off-by: Peter Hutterer --- diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c index 932abb82f..c2de86225 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) {