From d83ba4897bf217d1045c58d1b99e52bd31c58812 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 18 Aug 2016 11:23:40 +0200 Subject: 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 --- tools/gpgconf.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'tools') diff --git a/tools/gpgconf.c b/tools/gpgconf.c index 69ea9c9cf..221e3e24f 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -156,7 +156,6 @@ list_dirs (estream_t fp, char **names) const char *name; const char *(*fnc)(void); const char *extra; - int special; } list[] = { { "sysconfdir", gnupg_sysconfdir, NULL }, { "bindir", gnupg_bindir, NULL }, @@ -164,9 +163,7 @@ list_dirs (estream_t fp, char **names) { "libdir", gnupg_libdir, NULL }, { "datadir", gnupg_datadir, NULL }, { "localedir", gnupg_localedir, NULL }, - { "dirmngr-socket", dirmngr_user_socket_name, NULL, 1 }, - { "dirmngr-socket", dirmngr_sys_socket_name, NULL, 2 }, - { "dirmngr-sys-socket", dirmngr_sys_socket_name, NULL, 1 }, + { "dirmngr-socket", dirmngr_socket_name, NULL,}, { "agent-ssh-socket", gnupg_socketdir, GPG_AGENT_SSH_SOCK_NAME }, { "agent-socket", gnupg_socketdir, GPG_AGENT_SOCK_NAME }, { "homedir", gnupg_homedir, NULL } @@ -178,13 +175,6 @@ list_dirs (estream_t fp, char **names) for (idx = 0; idx < DIM (list); idx++) { - if (list[idx].special == 1 && dirmngr_user_socket_name ()) - ; - else if (list[idx].special == 2 && !dirmngr_user_socket_name ()) - ; - else if (list[idx].special == 1 || list[idx].special == 2) - continue; - s = list[idx].fnc (); if (list[idx].extra) { -- cgit v1.2.3