aboutsummaryrefslogtreecommitdiffstats
path: root/common/init.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-08-29 09:45:47 +0000
committerWerner Koch <[email protected]>2016-08-29 09:51:00 +0000
commit2aa0701013f703ad93e17da3345c493c08aa04ee (patch)
tree42e9b6da0d5cc00e5d3c2a9ec6c34a8f4d5659de /common/init.c
parentgpg: Make decryption of -R work w/o --try-secret-key or --default-key. (diff)
downloadgnupg-2aa0701013f703ad93e17da3345c493c08aa04ee.tar.gz
gnupg-2aa0701013f703ad93e17da3345c493c08aa04ee.zip
common: Add a default socket name feature.
* common/logging.c (log_set_socket_dir_cb): New. (socket_dir_cb): New. (set_file_fd): Allow "socket://". (fun_writer): Implement default socket name. * common/init.c (_init_common_subsystems): Register default socket. -- This change allows the use of log-file socket:// in any configuration file. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/init.c')
-rw-r--r--common/init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/init.c b/common/init.c
index 591c85468..8a8626682 100644
--- a/common/init.c
+++ b/common/init.c
@@ -222,6 +222,9 @@ _init_common_subsystems (gpg_err_source_t errsource, int *argcp, char ***argvp)
/* --version et al shall use estream as well. */
argparse_register_outfnc (writestring_via_estream);
+
+ /* Logging shall use the standard socket directory as fallback. */
+ log_set_socket_dir_cb (gnupg_socketdir);
}