aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-connect-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-07-07 10:02:41 +0000
committerWerner Koch <[email protected]>2009-07-07 10:02:41 +0000
commitf6f5430e5014f90b685420447dffe89b220e2663 (patch)
tree0a8c28fc24f291bbc3a148f7240d1c49421f9077 /tools/gpg-connect-agent.c
parent* debugging.texi (Common Problems): Add a note about corrupted (diff)
downloadgnupg-f6f5430e5014f90b685420447dffe89b220e2663.tar.gz
gnupg-f6f5430e5014f90b685420447dffe89b220e2663.zip
Reworked passing of envars to Pinentry.
Diffstat (limited to 'tools/gpg-connect-agent.c')
-rw-r--r--tools/gpg-connect-agent.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c
index 06dafd5c9..90f54a44d 100644
--- a/tools/gpg-connect-agent.c
+++ b/tools/gpg-connect-agent.c
@@ -2079,6 +2079,12 @@ start_agent (void)
int rc = 0;
char *infostr, *p;
assuan_context_t ctx;
+ session_env_t session_env;
+
+ session_env = session_env_new ();
+ if (!session_env)
+ log_fatal ("error allocating session environment block: %s\n",
+ strerror (errno));
infostr = getenv ("GPG_AGENT_INFO");
if (!infostr || !*infostr)
@@ -2169,7 +2175,7 @@ start_agent (void)
}
rc = send_pinentry_environment (ctx, GPG_ERR_SOURCE_DEFAULT,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, session_env);
if (rc)
{
log_error (_("error sending standard options: %s\n"), gpg_strerror (rc));