aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgconf.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-01-17 13:23:13 +0000
committerWerner Koch <[email protected]>2020-01-17 13:24:24 +0000
commit7f12fb55f9757cd68147eca8f162c85378538405 (patch)
tree72534e92dc9dbfeb2ccb83b63968e1ff7bc7a9a6 /tools/gpgconf.c
parentgpg: Prefer card key on use in multiple subkeys situation. (diff)
downloadgnupg-7f12fb55f9757cd68147eca8f162c85378538405.tar.gz
gnupg-7f12fb55f9757cd68147eca8f162c85378538405.zip
gpgconf,w32: Print a warning for a suspicious homedir.
* tools/gpgconf.c (list_dirs): Check whether the homedir has been taken from the registry. -- Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpgconf.c')
-rw-r--r--tools/gpgconf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index a0cd97f60..596aa957d 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -274,6 +274,20 @@ list_dirs (estream_t fp, char **names)
xfree (tmp);
}
+
+
+#ifdef HAVE_W32_SYSTEM
+ tmp = read_w32_registry_string (NULL,
+ GNUPG_REGISTRY_DIR,
+ "HomeDir");
+ if (tmp)
+ {
+ es_fflush (fp);
+ log_info ("Warning: homedir taken from registry key (%s %s)\n",
+ GNUPG_REGISTRY_DIR, "HomeDir");
+ xfree (tmp);
+ }
+#endif /*HAVE_W32_SYSTEM*/
}