diff options
author | Werner Koch <wk@gnupg.org> | 2008-03-06 19:28:47 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-03-06 19:28:47 +0100 |
commit | fa800e7c86a9c927af4f46d3a6c0822fcc5dc9dc (patch) | |
tree | 06f650dca629a77b6165821e0bd5aeb9021541dc /common | |
parent | Add IF command and new variable functions to gpg-connect-agent. (diff) | |
download | gnupg2-fa800e7c86a9c927af4f46d3a6c0822fcc5dc9dc.tar.xz gnupg2-fa800e7c86a9c927af4f46d3a6c0822fcc5dc9dc.zip |
Comment fixes.
Convey the new envvars when using simple-pwquery.
Diffstat (limited to 'common')
-rw-r--r-- | common/ChangeLog | 5 | ||||
-rw-r--r-- | common/pka.c | 2 | ||||
-rw-r--r-- | common/simple-pwquery.c | 21 |
3 files changed, 27 insertions, 1 deletions
diff --git a/common/ChangeLog b/common/ChangeLog index 05f516fa2..60679a8ae 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,3 +1,8 @@ +2008-03-06 Werner Koch <wk@g10code.com> + + * simple-pwquery.c (agent_send_all_options): Add support for + XAUTHORITY and PINENTRY_USER_DATA. + 2008-02-15 Marcus Brinkmann <marcus@g10code.de> * exechelp.c (gnupg_spawn_process_fd): Add flag DETACHED_PROCESS diff --git a/common/pka.c b/common/pka.c index e8cdee61e..f592cb037 100644 --- a/common/pka.c +++ b/common/pka.c @@ -98,7 +98,7 @@ parse_txt_record (char *buffer, unsigned char *fpr) On success the 20 byte SHA-1 fingerprint is stored at FPR and the URI will be returned in an allocated buffer. Note that the URI - might be an zero length string as this information is optiobnal. + might be an zero length string as this information is optional. Caller must xfree the returned string. On error NULL is returned and the 20 bytes at FPR are not 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; } |