Bug#345826: pinentry-gtk2: pinentry waits for input it can never read

Peter Eisentraut peter_e at gmx.net
Wed Jan 4 22:49:03 CET 2006


This has been reported to the Debian bug tracking system.  Comments?

> Package: pinentry-gtk2
> Version: 0.7.2-3
> Severity: normal
>
> When using pinentry from the console program without setting the ttyname
> OPTION pinentry waits forever for input it can never read because there
> is no input available. I think this should not happen and pinentry should
> abort with an error if it can not get the TTY for the input itself like
> it does when it is directly started from the console.
>
> The following perl program demonstrates the problem:
> ---->8----
> #! /usr/bin/perl
>
> use FileHandle;
> use IPC::Open2;
>
> open2(*PINOUT, *PININ, "pinentry");
> print PININ "GETPIN\n";
> while (<PINOUT>) {
>     print $_
> }
> ---->8----
>
> This works fine when it is run from an X terminal. In my opinion it
> should not be the responsibility of the program using pinentry to find
> out if pinentry can use X or must fallback to the console.
>
> pinentry also only seems to check for the DISPLAY environment variable
> of find out which input method it should use. It would be better if it
> would fall back to console input if connecting to the X server fails for
> some reason and a ttyname is set. That would make using pinentry much
> easier as the using program can set ttyname whenever it is available and
> pinentry will use the first input method that works (X if DISPLAY is set,
> Console if ttyname is set, abort if both fails).



More information about the Gpa-dev mailing list