From fa800e7c86a9c927af4f46d3a6c0822fcc5dc9dc Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 6 Mar 2008 18:28:47 +0000 Subject: Comment fixes. Convey the new envvars when using simple-pwquery. --- common/simple-pwquery.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'common/simple-pwquery.c') diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index 13617d2b9..fdaa34f07 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -207,6 +207,8 @@ agent_send_all_options (int fd) char *dft_display = NULL; char *dft_ttyname = NULL; char *dft_ttytype = NULL; + char *dft_xauthority = NULL; + char *dft_pinentry_user_data = NULL; int rc = 0; dft_display = getenv ("DISPLAY"); @@ -285,6 +287,25 @@ agent_send_all_options (int fd) } #endif /*HAVE_SETLOCALE*/ + /* Send the XAUTHORITY variable. */ + dft_xauthority = getenv ("XAUTHORITY"); + if (dft_xauthority) + { + /* We ignore errors here because older gpg-agents don't support + this option. */ + send_one_option (ctx, errsource, "xauthority", dft_xauthority); + } + + /* Send the PINENTRY_USER_DATA variable. */ + dft_pinentry_user_data = getenv ("PINENTRY_USER_DATA"); + if (dft_pinentry_user_data) + { + /* We ignore errors here because older gpg-agents don't support + this option. */ + send_one_option (ctx, errsource, "pinentry-user-data", + opt_pinentry_user_data); + } + return 0; } -- cgit v1.2.3