agent: Allow TERM="".
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 4 Jun 2019 02:35:06 +0000 (11:35 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 4 Jun 2019 02:35:06 +0000 (11:35 +0900)
* agent/call-pinentry.c (start_pinentry): When TERM is none,
don't send OPTION ttytype to pinentry.

--

GnuPG-bug-id: 4137
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
agent/call-pinentry.c

index c2105cd..02ec1c8 100644 (file)
@@ -438,7 +438,7 @@ start_pinentry (ctrl_t ctrl)
         return unlock_pinentry (ctrl, rc);
     }
   value = session_env_getenv (ctrl->session_env, "TERM");
-  if (value)
+  if (value && *value)
     {
       char *optstr;
       if (asprintf (&optstr, "OPTION ttytype=%s", value) < 0 )