aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine-assuan.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-05-10 11:03:34 +0000
committerJustus Winter <[email protected]>2016-05-10 11:03:34 +0000
commitf531608539b45f0bbd036f430943b390ec21aa65 (patch)
tree56cf3f4db0c38e668645668ebb3dec418bed77a5 /src/engine-assuan.c
parentMore GTK2 removal (diff)
parentAllow cc to detect missing cases in a switch. (diff)
downloadgpgme-f531608539b45f0bbd036f430943b390ec21aa65.tar.gz
gpgme-f531608539b45f0bbd036f430943b390ec21aa65.zip
Merge branch 'master' into justus/pyme3
Diffstat (limited to 'src/engine-assuan.c')
-rw-r--r--src/engine-assuan.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/engine-assuan.c b/src/engine-assuan.c
index 663b2eab..99024675 100644
--- a/src/engine-assuan.c
+++ b/src/engine-assuan.c
@@ -282,12 +282,10 @@ llass_new (void **engine, const char *file_name, const char *home_dir)
char *dft_ttytype = NULL;
rc = ttyname_r (1, dft_ttyname, sizeof (dft_ttyname));
- if (rc)
- {
- err = gpg_error_from_errno (rc);
- goto leave;
- }
- else
+
+ /* Even though isatty() returns 1, ttyname_r() may fail in many
+ ways, e.g., when /dev/pts is not accessible under chroot. */
+ if (!rc)
{
if (asprintf (&optstr, "OPTION ttyname=%s", dft_ttyname) < 0)
{