Relax ttyname_r error checks
authorDaiki Ueno <ueno@gnu.org>
Mon, 27 Jul 2015 07:19:52 +0000 (16:19 +0900)
committerWerner Koch <wk@gnupg.org>
Tue, 25 Aug 2015 17:11:30 +0000 (19:11 +0200)
commit028a0ef3336c5180797fb247448683195376c007
treebc399a9d05095ee3b277dce3eebb50ba437419ea
parent97f1f3e883808743da5ee144abab25de062f34ac
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>
src/engine-assuan.c
src/engine-g13.c
src/engine-gpg.c
src/engine-gpgsm.c
src/engine-uiserver.c