[PATCH] pinentry-curses: Make sure we've got a real terminal
wk at gnupg.org
Fri Oct 24 21:01:01 CEST 2014
On Tue, 14 Oct 2014 14:10, mk at mkoskar.com said:
> I think more robust solution is for pinentry to make sure it "talks" to real
> terminal device, hence following patch. It is solving problem above, having
> pinentry to fail right away as expected.
Any other opinons on this?
> + if (!isatty(fileno(ttyfi)) || !isatty(fileno(ttyfo)))
> + return -1;
> screen = newterm (tty_type, ttyfo, ttyfi);
Hmmm, we don't check for an error from newterm? At least for memory
problems it will return NULL. That code is pretty old , I can't
remember the details.
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gnupg-devel