summaryrefslogtreecommitdiffstats
path: root/tools/gpgconf.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2023-02-28 14:41:04 +0100
committerWerner Koch <wk@gnupg.org>2023-02-28 14:41:20 +0100
commit523b3e1773f51195b5ac1a07ed0c630d1f9d462e (patch)
treef4557f0bb6bd1a560fde31354d3a146176bd378f /tools/gpgconf.c
parentgpgsm: Improve cert lookup callback from dirmngr. (diff)
downloadgnupg2-523b3e1773f51195b5ac1a07ed0c630d1f9d462e.tar.xz
gnupg2-523b3e1773f51195b5ac1a07ed0c630d1f9d462e.zip
gpgconf: Print some standard envvars with -X
* tools/gpgconf.c (show_configs): Add a list of envvars and print them. -- Note that for simplicity we to not distinguish between Windows and Linux here.
Diffstat (limited to 'tools/gpgconf.c')
-rw-r--r--tools/gpgconf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 4afc4e9fd..6dcdc9f3c 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -1509,6 +1509,11 @@ show_configs (estream_t outfp)
static const char *names[] = { "common.conf", "gpg-agent.conf",
"scdaemon.conf", "dirmngr.conf",
"gpg.conf", "gpgsm.conf" };
+ static const char *envvars[] = { "PATH",
+ "http_proxy", "HTTP_PROXY",
+ "https_proxy", "HTTPS_PROXY",
+ "LD_LIBRARY_PATH", "LD_PRELOAD",
+ "LD_AUDIT", "LD_ORIGIN_PATH" };
gpg_error_t err;
int idx;
char *fname;
@@ -1539,6 +1544,11 @@ show_configs (estream_t outfp)
list_dirs (outfp, NULL, 1);
es_fprintf (outfp, "\n");
+ for (idx=0; idx < DIM(envvars); idx++)
+ if ((s = getenv (envvars[idx])))
+ es_fprintf (outfp, "%s=%s\n", envvars[idx], s);
+ es_fprintf (outfp, "\n");
+
fname = make_filename (gnupg_sysconfdir (), "gpgconf.conf", NULL);
if (!gnupg_access (fname, F_OK))
{