After starting agent, sometimes pinentry shows on terminal under which agent
was started.
- run xterm, rxvt or similar, notice that is for example /dev/pts/1
- run gpg-agent in it (*without* keep-tty option)
- run another xterm, notice that is, for example, /dev/pts/2
- try to use gpg with agent
- pinentry shows on first xterm
My suspect: in session-env.c
in function
static gpg_error_t
update_var (session_env_t se, const char *string, size_t namelen,
const char *explicit_value, int set_default)
we have
#v+
if (strlen (se->array[idx]->value) == valuelen)
#v-
shouldn't be something like:
#v+
if (!strncmp(se->array[idx]->value,explicit_value, valuelen))
#v-
here?