[git] GnuPG - branch, master, updated. gnupg-2.2.7-140-g7ffc1ac
by Werner Koch
cvs at cvs.gnupg.org
Wed Jun 6 18:38:04 CEST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via 7ffc1ac7dd95d4cc1897a4c36d5cd628741c12f2 (commit)
from 70f26e4263364f4b521c7856c38ba7ee59e38445 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7ffc1ac7dd95d4cc1897a4c36d5cd628741c12f2
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jun 6 18:28:44 2018 +0200
agent: Add DBUS_SESSION_BUS_ADDRESS et al. to the startup list.
* agent/gpg-agent.c (agent_copy_startup_env): Replace explicit list
with the standard list.
--
Although the function agent_copy_startup_env is newer than
session_env_list_stdenvnames the latter was not used. When
DBUS_SESSION_BUS_ADDRESS was added to the latter it was forgotten to
add it to the former as well. Having all stdnames here seems to be
the Right Thing (tm) to do.
GnuPG-bug-id: 3947
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index bd9a471..1fdc94d 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1979,15 +1979,15 @@ agent_deinit_default_ctrl (ctrl_t ctrl)
gpg_error_t
agent_copy_startup_env (ctrl_t ctrl)
{
- static const char *names[] =
- {"GPG_TTY", "DISPLAY", "TERM", "XAUTHORITY", "PINENTRY_USER_DATA", NULL};
gpg_error_t err = 0;
- int idx;
- const char *value;
+ int iterator = 0;
+ const char *name, *value;
- for (idx=0; !err && names[idx]; idx++)
- if ((value = session_env_getenv (opt.startup_env, names[idx])))
- err = session_env_setenv (ctrl->session_env, names[idx], value);
+ while (!err && (name = session_env_list_stdenvnames (&iterator, NULL)))
+ {
+ if ((value = session_env_getenv (opt.startup_env, name)))
+ err = session_env_setenv (ctrl->session_env, name, value);
+ }
if (!err && !ctrl->lc_ctype && opt.startup_lc_ctype)
if (!(ctrl->lc_ctype = xtrystrdup (opt.startup_lc_ctype)))
-----------------------------------------------------------------------
Summary of changes:
agent/gpg-agent.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list