pinentry-gtk-2 SIGABRT when unable to grab keyboard

Werner Koch wk at gnupg.org
Mon Apr 26 18:08:28 CEST 2010


On Mon, 26 Apr 2010 14:31, sochotnicky at redhat.com said:

> Code causing behaviour in question:
> if (gdk_keyboard_grab (win->window, FALSE, gdk_event_get_time (event)))
>     g_error ("could not grab keyboard");

The g_error causes the abort.  This is probably because the function
name g_error does not indicate that this is fatal.  It would have been
much better if the gtk folks would have named this g_fatal or g_die.  I
stepped into this trap several times in the past.

Anyway I changed it so that the output will be

OK Your orders please

** (pinentry-gtk-2:20766): CRITICAL **: could not grab keyboard
ERR 83886179 canceled

> I believe changing workspace should not cause pinentry-gtk-2 to abort
> because this could be used for example to change to workspace with
> password manager program. There are also other ways to trigger this

It is actually intended that you can't use a password manager -
gpg-agent is the password manager!  If it would be possible to cut and
paste between windows other programs could do this as well; we try to
make this harder by grabbing the keyboard.  Put "no-grab" into
gpg-agent.conf if you don't like this feature.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gpa-dev mailing list