Commit 2d0f077b authored by Martin Pitt's avatar Martin Pitt
Browse files

logind: Fix sd_eviocrevoke ioctl call

To make forced input device release after log out actually work. Cherry-picked
from upstream git head.
parent 37ce19d2
...@@ -9,6 +9,8 @@ systemd (215-11) UNRELEASED; urgency=medium ...@@ -9,6 +9,8 @@ systemd (215-11) UNRELEASED; urgency=medium
net.ifnames by default. (Closes: #762101, LP: #1411992) net.ifnames by default. (Closes: #762101, LP: #1411992)
* logind: handle closing sessions over daemon restarts. (Closes: #759515, * logind: handle closing sessions over daemon restarts. (Closes: #759515,
LP: #1415104) LP: #1415104)
* logind: Fix sd_eviocrevoke ioctl call, to make forced input device release
after log out actually work.
-- Martin Pitt <mpitt@debian.org> Mon, 26 Jan 2015 08:20:18 +0100 -- Martin Pitt <mpitt@debian.org> Mon, 26 Jan 2015 08:20:18 +0100
......
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 22 Jan 2015 11:36:02 +1000
Subject: 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) {
...@@ -127,6 +127,7 @@ systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch ...@@ -127,6 +127,7 @@ systemd-tmpfiles-Fix-IGNORE_DIRECTORY_PATH-age-handl.patch
sysv-generator-handle-Provides-for-non-virtual-facil.patch sysv-generator-handle-Provides-for-non-virtual-facil.patch
journal-Fix-syslog-forwarding-without-CAP_SYS_ADMIN.patch journal-Fix-syslog-forwarding-without-CAP_SYS_ADMIN.patch
logind-handle-closing-sessions-over-daemon-restarts.patch logind-handle-closing-sessions-over-daemon-restarts.patch
logind-fix-sd_eviocrevoke-ioctl-call.patch
## Debian specific patches: ## Debian specific patches:
Add-back-support-for-Debian-specific-config-files.patch Add-back-support-for-Debian-specific-config-files.patch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment