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.
This commit is contained in:
Daniel Kahn Gillmor 2015-08-18 13:34:57 +02:00 committed by Werner Koch
parent 8b5cb544a8
commit 751b287179
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 9 additions and 0 deletions

View File

@ -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;