pinentry-tty mishandles ctrl-C
Testing, NormalPublic

Description

Run gpg to decrypt a file, configured to use pinentry-tty. Enter the passphrase wrong, and on the second try, type ctrl-C. gpg exits, and the terminal mode is screwed up. Characters don't echo, etc.

Details

Version
gnupg 2.2.4, pinentry 1.1.0, Ubuntu 18.04.2
gniibe claimed this task.Jun 26 2019, 10:10 AM
gniibe triaged this task as Normal priority.
gniibe added a subscriber: gniibe.

Ah, yes, that signal thing should be handled correctly, when we support line edit by tty.

For master branch of GnuPG, it was fixed. See T2011: gnupg should notify cancellation of its operation to gpg-agent to kill pinentry.

I meant, GnuPG side was fixed in master, it sends SIGINT to pinentry process when gpg exits.

We need to fix pinentry side to receive SIGINT in order to recover TTY state (for curses and tty).

gniibe changed the task status from Open to Testing.Jun 28 2019, 2:50 AM