aboutsummaryrefslogtreecommitdiffstats
path: root/common/homedir.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common/homedir.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/common/homedir.c b/common/homedir.c
index 77622a1d4..e2a117bd7 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -555,9 +555,9 @@ gnupg_cachedir (void)
}
-/* Return the default socket name used by DirMngr. */
+/* Return the system socket name used by DirMngr. */
const char *
-dirmngr_socket_name (void)
+dirmngr_sys_socket_name (void)
{
#ifdef HAVE_W32_SYSTEM
static char *name;
@@ -600,6 +600,22 @@ dirmngr_socket_name (void)
}
+/* Return the user socket name used by DirMngr. If a a user specific
+ dirmngr installation is not supported, NULL is returned. */
+const char *
+dirmngr_user_socket_name (void)
+{
+#ifdef HAVE_W32_SYSTEM
+ return NULL; /* We support only a system service. */
+#else /*!HAVE_W32_SYSTEM*/
+ static char *name;
+
+ if (!name)
+ name = make_filename (default_homedir (), DIRMNGR_SOCK_NAME, NULL);
+ return name;
+#endif /*!HAVE_W32_SYSTEM*/
+}
+
/* Return the file name of a helper tool. WHICH is one of the
GNUPG_MODULE_NAME_foo constants. */