aboutsummaryrefslogtreecommitdiffstats
path: root/common/homedir.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-08-18 09:23:40 +0000
committerWerner Koch <[email protected]>2016-08-18 09:23:40 +0000
commitd83ba4897bf217d1045c58d1b99e52bd31c58812 (patch)
tree1eaf4c2976175b8dcedd5d3c3a721c3015fbf68a /common/homedir.c
parentgpg: New option --sender (diff)
downloadgnupg-d83ba4897bf217d1045c58d1b99e52bd31c58812.tar.gz
gnupg-d83ba4897bf217d1045c58d1b99e52bd31c58812.zip
dirmngr: Remove all system daemon features.
* dirmngr/dirmngr.h (opts): Remove fields 'system_service' and 'system_daemon'. * common/homedir.c (dirmngr_sys_socket_name): Remove. (dirmngr_user_socket_name): Rename to ... (dirmngr_socket_name): this. Change call callers. * common/asshelp.c (start_new_dirmngr): Remove the system socket feature. * tools/gpgconf.c (list_dirs): Do not print "dirmngr-sys-socket". * sm/server.c (gpgsm_server): Adjust for removed system socket feature. * dirmngr/server.c (cmd_getinfo): Ditto. (cmd_killdirmngr): Remove check for system daemon. (cmd_reloaddirmngr): Ditto. * dirmngr/dirmngr.c (USE_W32_SERVICE): Remove macro. (aService): Remove. (opts): Remove --service. (w32_service_control): Remove. (real_main, call_real_main) [W32]: Remove wrapper. (main): Remove Windows system service feature. Remove system dameon feature. Use only the "~/.gnupg/dirmngr_ldapservers.conf" file. * dirmngr/certcache.c (load_certs_from_dir): Remove warning in the system dameon case. * dirmngr/crlcache.c (DBDIR_D): Always use "~/.gnupg/crls.d". * dirmngr/ocsp.c (validate_responder_cert): Do not call validate_cert_chain which was used only in system daemon mode. * dirmngr/validate.c (validate_cert_chain): Always use the code. -- We are now starting dirmngr as needed as a user daemon. The deprecated system daemon mode does not anymore make sense. In case a system wide daemon is required, it is better to setup a dedicated account to run dirmngr and tweak socket permissions accordingly. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/homedir.c')
-rw-r--r--common/homedir.c50
1 files changed, 2 insertions, 48 deletions
diff --git a/common/homedir.c b/common/homedir.c
index 9a6902262..574561a6c 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -812,55 +812,9 @@ gnupg_cachedir (void)
}
-/* Return the system socket name used by DirMngr. */
+/* Return the user socket name used by DirMngr. */
const char *
-dirmngr_sys_socket_name (void)
-{
-#ifdef HAVE_W32_SYSTEM
- static char *name;
-
- if (!name)
- {
- char *p;
-# ifdef HAVE_W32CE_SYSTEM
- const char *s1, *s2;
-
- s1 = default_homedir ();
-# else
- char s1buf[MAX_PATH];
- const char *s1, *s2;
-
- s1 = default_homedir ();
- if (!w32_portable_app)
- {
- /* We need something akin CSIDL_COMMON_PROGRAMS, but local
- (non-roaming). This is because the file needs to be on
- the local machine and makes only sense on that machine.
- CSIDL_WINDOWS seems to be the only location which
- guarantees that. */
- if (w32_shgetfolderpath (NULL, CSIDL_WINDOWS, NULL, 0, s1buf) < 0)
- strcpy (s1buf, "C:\\WINDOWS");
- s1 = s1buf;
- }
-# endif
- s2 = DIRSEP_S DIRMNGR_SOCK_NAME;
- name = xmalloc (strlen (s1) + strlen (s2) + 1);
- strcpy (stpcpy (name, s1), s2);
- for (p=name; *p; p++)
- if (*p == '/')
- *p = '\\';
- }
- return name;
-#else /*!HAVE_W32_SYSTEM*/
- return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/"DIRMNGR_SOCK_NAME;
-#endif /*!HAVE_W32_SYSTEM*/
-}
-
-
-/* Return the user socket name used by DirMngr. If a user specific
- dirmngr installation is not supported, NULL is returned. */
-const char *
-dirmngr_user_socket_name (void)
+dirmngr_socket_name (void)
{
static char *name;