diff options
Diffstat (limited to 'gpgme/rungpg.c')
-rw-r--r-- | gpgme/rungpg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gpgme/rungpg.c b/gpgme/rungpg.c index df84ee5d..dcc96bfd 100644 --- a/gpgme/rungpg.c +++ b/gpgme/rungpg.c @@ -577,7 +577,14 @@ build_argv (GpgObject gpg) size_t datac=0, argc=0; char **argv; int need_special = 0; - int use_agent = !!getenv ("GPG_AGENT_INFO"); + int use_agent = 0; + char *p; + + /* We don't want to use the agent with a malformed environment + variable. This is only a very basic test but sufficient to make + our life in the regression tests easier. */ + p = getenv ("GPG_AGENT_INFO"); + use_agent = (p && strchr (p, ':')); if (gpg->argv) { |