aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-08-11 09:38:37 +0000
committerWerner Koch <[email protected]>2021-08-17 08:42:38 +0000
commit013f2e4672b1565002700e307d3bb95d9352c4d5 (patch)
treef2758a8209940dea1e6ec57374c2e7961367b300
parentagent: Make QT_QPA_PLATFORMTHEME=qt5ct work for the pient (diff)
downloadgnupg-013f2e4672b1565002700e307d3bb95d9352c4d5.tar.gz
gnupg-013f2e4672b1565002700e307d3bb95d9352c4d5.zip
gpgconf,w32: Print more registry diagnostics with --list-dirs.
* tools/gpgconf.c (list_dirs): Figure out classes with the key. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--tools/gpgconf.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 6b499b3f9..f1779923a 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -293,11 +293,45 @@ list_dirs (estream_t fp, char **names)
"HomeDir");
if (tmp)
{
+ int hkcu = 0;
+ int hklm = 0;
+
+ xfree (tmp);
+ if ((tmp = read_w32_registry_string ("HKEY_CURRENT_USER",
+ GNUPG_REGISTRY_DIR,
+ "HomeDir")))
+ {
+ xfree (tmp);
+ hkcu = 1;
+ }
+ if ((tmp = read_w32_registry_string ("HKEY_LOCAL_MACHINE",
+ GNUPG_REGISTRY_DIR,
+ "HomeDir")))
+ {
+ xfree (tmp);
+ hklm = 1;
+ }
+
es_fflush (fp);
- log_info ("Warning: homedir taken from registry key (%s %s)\n",
- GNUPG_REGISTRY_DIR, "HomeDir");
+ log_info ("Warning: homedir taken from registry key (%s:%s) in%s%s\n",
+ GNUPG_REGISTRY_DIR, "HomeDir",
+ hkcu?" HKCU":"",
+ hklm?" HKLM":"");
+
+
+
+ }
+ else if ((tmp = read_w32_registry_string (NULL,
+ GNUPG_REGISTRY_DIR,
+ NULL)))
+ {
xfree (tmp);
+ es_fflush (fp);
+ log_info ("Warning: registry key (%s) without value in HKCU or HKLM\n",
+ GNUPG_REGISTRY_DIR);
}
+
+
#endif /*HAVE_W32_SYSTEM*/
}