aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2015-08-18 11:34:57 +0000
committerWerner Koch <[email protected]>2015-12-17 14:14:56 +0000
commit751b287179c3a485261051a8bc838ee9405fa890 (patch)
tree9f7d3e73c685659820f7a4543f679144bb88d49a
parentgpg: Avoid cluttering stdout with trustdb info in verbose mode. (diff)
downloadgnupg-751b287179c3a485261051a8bc838ee9405fa890.tar.gz
gnupg-751b287179c3a485261051a8bc838ee9405fa890.zip
Pass DBUS_SESSION_BUS_ADDRESS for gnome3
* g10/passphrase.c (stdenvnames): Add DBUS_SESSION_BUS_ADDRESS. -- pinentry-gnome3 talks to the gcr prompter via dbus. Without this environment variable, it can't find the correct session to talk to.
-rw-r--r--g10/passphrase.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 9003ea4d6..7cc9f6ebb 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -195,6 +195,7 @@ agent_send_all_options (assuan_context_t ctx)
char *dft_display = NULL;
const char *dft_ttyname = NULL;
char *dft_ttytype = NULL;
+ char *dbus_session_address = NULL;
char *old_lc = NULL;
char *dft_lc = NULL;
int rc = 0;
@@ -207,6 +208,14 @@ agent_send_all_options (assuan_context_t ctx)
return -1;
}
+ dbus_session_address = getenv ("DBUS_SESSION_BUS_ADDRESS");
+ if (dbus_session_address)
+ {
+ if (agent_send_option (ctx, "putenv=DBUS_SESSION_BUS_ADDRESS",
+ dbus_session_address))
+ return -1;
+ }
+
if (!opt.ttyname)
{
const char *tmp;