Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37562604
en ru br
ALT Linux repos
S:1.2.1-alt1
5.0: 0.7.5-alt3
4.1: 0.7.4-alt2
4.0: 0.7.4-alt2
3.0: 0.7.2-alt1

Group :: File tools
RPM: pinentry

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0002-Fix-sigabrt-on-fail-grab-r229.patch
Download


Index: gtk+-2/pinentry-gtk-2.c
===================================================================
--- gtk+-2/pinentry-gtk-2.c	(revision 228)
+++ gtk+-2/pinentry-gtk-2.c	(revision 229)
@@ -52,6 +52,7 @@
 #endif
 
 static pinentry_t pinentry;
+static int grab_failed;
 static int passphrase_ok;
 typedef enum { CONFIRM_CANCEL, CONFIRM_OK, CONFIRM_NOTOK } confirm_value_t;
 static confirm_value_t confirm_value;
@@ -135,7 +136,11 @@
     return;
 
   if (gdk_keyboard_grab (win->window, FALSE, gdk_event_get_time (event)))
-    g_error ("could not grab keyboard");
+    {
+      g_critical ("could not grab keyboard");
+      grab_failed = 1;
+      gtk_main_quit ();
+    }
 }
 
 
@@ -520,7 +525,7 @@
   while (gtk_events_pending ())
     gtk_main_iteration ();
 
-  if (confirm_value == CONFIRM_CANCEL)
+  if (confirm_value == CONFIRM_CANCEL || grab_failed)
     pe->canceled = 1;
 
   pinentry = NULL;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin