Home GnuPG

Check if we are on tty before initializing curses.
3803fd15942fUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Check if we are on tty before initializing curses.

* pinentry/pinentry-curses.c (dialog_run): Check stant stdin and stout
are connected to ttys.

When we did not have a ttyname we just used stdin/out without checking
if it's a proper TTY or a pipe. In some cases this can cause endless
loop or escape seqeunces on the terminal.

This commit changes behaviour so that if stdin/out is not tty and no
ttyname is specified we error-out with errno set to ENOTTY

Details

Provenance
sochotnickyAuthored on Feb 14 2014, 12:58 PM
wernerCommitted on Oct 26 2014, 11:05 AM
Parents
rP4f4af9056d1c: gtk: Allow pasting using the mouse.
Branches
Unknown
Tags
Unknown