Package: pinentry / 1.1.0-4

0005-gnome3-correctly-detect-when-no-GNOME-screenlock-exi.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Wed, 17 Apr 2019 14:23:18 -0400
Subject: gnome3: correctly detect when no GNOME screenlock exists

* gnome3/pinentry-gnome3.c (pe_gnome_screen_locked): skip
G_IO_ERROR_IS_DIRECTORY responses, not G_IO_ERROR_TIMED_OUT responses
from dbus.

--

After the previous commit, testing demonstrates that the normal
response when no screenlock is running is G_IO_ERROR_IS_DIRECTORY, not
G_IO_ERROR_TIMED_OUT.

Debian-bug-id: 927105
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
(cherry picked from commit f74c4673e6b60508012c14f7574dbc3215345210)
---
 gnome3/pinentry-gnome3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index 40c72ac..158fbe1 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -452,9 +452,9 @@ pe_gnome_screen_locked (void)
   g_object_unref(dbus);
   if (!reply)
     {
-      /* G_IO_ERROR_TIMED_OUT is the expected response when there is
+      /* G_IO_ERROR_IS_DIRECTORY is the expected response when there is
        * no gnome screensaver at all, don't be noisy in that case: */
-      if (!(error && error->code == G_IO_ERROR_TIMED_OUT))
+      if (!(error && error->code == G_IO_ERROR_IS_DIRECTORY))
         fprintf (stderr, "Failed to get d-bus reply for org.gnome.ScreenSaver.GetActive (%d): %s\n",
                  error ? error->code : -1,
                  error ? error->message : "<no GError>");