aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2026-10-01 15:10:28 +0200
committerWerner Koch <[email protected]>2026-10-05 11:17:58 +0200
commit6bb0b45360e618fbccb83a42f166c57af6dc3efc (patch)
treee88fe6d10db6fff98911d5a158d230e40444dd2a
parenttpm2d:intel: Fix use of Esys_TRSess_SetAttributes. (diff)
downloadgnupg-6bb0b45360e618fbccb83a42f166c57af6dc3efc.tar.gz
gnupg-6bb0b45360e618fbccb83a42f166c57af6dc3efc.zip
gpgconf: Avoid warnings on macOS with --show-configs.
* tools/gpgconf.c (list_dirs): Try to open socket files only on Windows.
-rw-r--r--tools/gpgconf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 588cd8d58..a485bbc48 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -327,7 +327,11 @@ list_dirs (estream_t fp, char **names, int show_config_mode)
}
}
- /* In show config mode check that the socket files are accessible. */
+ /* In show config mode check that the socket files are
+ * accessible. We do this only on Windows where our sockets are
+ * regualr files. On Unix is is not specified whether socket
+ * files are open- and readable. */
+#ifdef HAVE_W32_SYSTEM
if (list[idx].extra && show_config_mode)
{
estream_t tmpfp;
@@ -343,6 +347,7 @@ list_dirs (estream_t fp, char **names, int show_config_mode)
"# Warning: error reading existing file '%s': %s\n",
s, gpg_strerror (err));
}
+#endif /*HAVE_W32_SYSTEM*/
xfree (tmp);
}