Home GnuPG
Diffusion GPGME 028a0ef3336c

Relax ttyname_r error checks
028a0ef3336cUnpublished

Unpublished Commit · Learn More

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

Description

Relax ttyname_r error checks

* src/engine-assuan.c (llass_new): Don't treat ttyname_r error as
fatal.
* src/engine-g13.c (g13_new): Likewise.
* src/engine-gpg.c (gpg_new): Likewise.
* src/engine-gpgsm.c (gpgsm_new): Likewise.
* src/engine-uiserver.c (uiserver_new): Likewise.

Even though isatty() returns 1, ttyname_r() may fail in many ways, e.g.,
when /dev/pts is not accessible under chroot. Since all our uses of
ttyname_r() require that the function works, we can treat the failure as
if isatty() fails.

  • Signed-off-by: Daiki Ueno <ueno@gnu.org>

Details

Provenance
uenoAuthored on Jul 27 2015, 9:19 AM
wernerCommitted on Aug 25 2015, 7:11 PM
Parents
rM97f1f3e88380: Cleanup layout of gpgme.h
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rM028a0ef3336c: Relax ttyname_r error checks (authored by Daiki Ueno <ueno@gnu.org>).Aug 25 2015, 7:11 PM