diff options
author | Werner Koch <wk@gnupg.org> | 2014-03-12 19:33:30 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-03-14 12:36:36 +0100 |
commit | 5d321eb00be0774418de1a05678ac0ec44d7193b (patch) | |
tree | 6a794d25d31daba2681fec6bb421e1f615e0b88b /tools | |
parent | gpg: Add option --dirmngr-program. (diff) | |
download | gnupg2-5d321eb00be0774418de1a05678ac0ec44d7193b.tar.xz gnupg2-5d321eb00be0774418de1a05678ac0ec44d7193b.zip |
dirmngr: Default to a user socket name and enable autostart.
* common/homedir.c (dirmngr_socket_name): Rename to
dirmngr_sys_socket_name.
(dirmngr_user_socket_name): New.
* common/asshelp.c (start_new_dirmngr): Handle sys and user dirmngr
socket.
* dirmngr/dirmngr.c (main): Ditto.
* dirmngr/server.c (cmd_getinfo): Ditto.
* sm/server.c (gpgsm_server): Ditto.
* dirmngr/dirmngr-client.c (start_dirmngr): Likewise.
* tools/gpgconf.c (main): Print "dirmngr-sys-socket" with --list-dirs.
* configure.ac (USE_DIRMNGR_AUTO_START): Set by default.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpgconf.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c index a9bf491ec..fbce6d371 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -347,8 +347,20 @@ main (int argc, char **argv) gc_percent_escape (gnupg_datadir ())); es_fprintf (outfp, "localedir:%s\n", gc_percent_escape (gnupg_localedir ())); - es_fprintf (outfp, "dirmngr-socket:%s\n", - gc_percent_escape (dirmngr_socket_name ())); + + if (dirmngr_user_socket_name ()) + { + es_fprintf (outfp, "dirmngr-socket:%s\n", + gc_percent_escape (dirmngr_user_socket_name ())); + es_fprintf (outfp, "dirmngr-sys-socket:%s\n", + gc_percent_escape (dirmngr_sys_socket_name ())); + } + else + { + es_fprintf (outfp, "dirmngr-socket:%s\n", + gc_percent_escape (dirmngr_sys_socket_name ())); + } + { char *infostr = getenv (GPG_AGENT_INFO_NAME); |