diff options
author | Werner Koch <wk@gnupg.org> | 2020-09-23 12:02:50 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-09-24 10:37:41 +0200 |
commit | acaeba2dbdb9bbd68a823c671d5c3577fef5d26d (patch) | |
tree | 87dddf7490c76a7be71ea840e03a5371f5875a26 /common | |
parent | scd: Fix CCID internal driver for interrupt transfer. (diff) | |
download | gnupg2-acaeba2dbdb9bbd68a823c671d5c3577fef5d26d.tar.xz gnupg2-acaeba2dbdb9bbd68a823c671d5c3577fef5d26d.zip |
keyboxd: Integrate into gpgconf.
* common/asshelp.c (lock_spawning): Use a dedicated name for keyboxd.
* common/homedir.c (keyboxd_socket_name): New.
(gnupg_module_name): Put keyboxd into libexecdir.
* tools/gpgconf-comp.c (known_options_keyboxd): New.
(gc_component): Add entry for keyboxd.
(keyboxd_runtime_change): New.
(gc_component_launch): Support keyboxd.
* tools/gpgconf.c (list_dirs): Emit new item keyboxd-socket.
(main): Also remove keyboxd socket.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/asshelp.c | 1 | ||||
-rw-r--r-- | common/homedir.c | 14 | ||||
-rw-r--r-- | common/util.h | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/common/asshelp.c b/common/asshelp.c index 0d903fd5f..172c7d998 100644 --- a/common/asshelp.c +++ b/common/asshelp.c @@ -278,6 +278,7 @@ lock_spawning (lock_spawn_t *lock, const char *homedir, const char *name, (homedir, !strcmp (name, "agent")? "gnupg_spawn_agent_sentinel": !strcmp (name, "dirmngr")? "gnupg_spawn_dirmngr_sentinel": + !strcmp (name, "keyboxd")? "gnupg_spawn_keyboxd_sentinel": /* */ "gnupg_spawn_unknown_sentinel", NULL); if (!fname) diff --git a/common/homedir.c b/common/homedir.c index ee9585d66..f0e5362ba 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -971,6 +971,18 @@ dirmngr_socket_name (void) } +/* Return the user socket name used by Keyboxd. */ +const char * +keyboxd_socket_name (void) +{ + static char *name; + + if (!name) + name = make_filename (gnupg_socketdir (), KEYBOXD_SOCK_NAME, NULL); + return name; +} + + /* Return the default pinentry name. If RESET is true the internal cache is first flushed. */ static const char * @@ -1122,7 +1134,7 @@ gnupg_module_name (int which) #ifdef GNUPG_DEFAULT_KEYBOXD return GNUPG_DEFAULT_KEYBOXD; #else - X(bindir, "kbx", KEYBOXD_NAME); + X(libexecdir, "kbx", KEYBOXD_NAME); #endif case GNUPG_MODULE_NAME_PROTECT_TOOL: diff --git a/common/util.h b/common/util.h index f39093566..7217a5208 100644 --- a/common/util.h +++ b/common/util.h @@ -273,6 +273,7 @@ const char *gnupg_localedir (void); const char *gnupg_cachedir (void); const char *gpg_agent_socket_name (void); const char *dirmngr_socket_name (void); +const char *keyboxd_socket_name (void); char *_gnupg_socketdir_internal (int skip_checks, unsigned *r_info); |