From 45918813f0599505e4f84bd44b09fb708b4e7f23 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 20 Apr 2021 10:50:10 +0200 Subject: Support log-file option from common.conf for all daemon. * agent/gpg-agent.c: Include comopt.h. (main): Read log-file option from common.conf. (reread_configuration): Ditto. * dirmngr/dirmngr.c: Include comopt.h. (main): Read log-file option from common.conf. (reread_configuration): Ditto. * kbx/keyboxd.c: Include comopt.h. (main): Read log-file option from common.conf. (reread_configuration): Ditto. * scd/scdaemon.c: Include comopt.h. (main): Read log-file option from common.conf. Signed-off-by: Werner Koch --- scd/scdaemon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scd') diff --git a/scd/scdaemon.c b/scd/scdaemon.c index eddc83256..60d68c26a 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -54,6 +54,7 @@ #include "../common/gc-opt-flags.h" #include "../common/asshelp.h" #include "../common/exechelp.h" +#include "../common/comopt.h" #include "../common/init.h" #ifndef ENAMETOOLONG @@ -652,6 +653,17 @@ main (int argc, char **argv ) if (log_get_errorcount(0)) exit(2); + + /* Process common component options. */ + if (parse_comopt (GNUPG_MODULE_NAME_SCDAEMON, debug_argparser)) + exit(2); + + if (!logfile) + { + logfile = comopt.logfile; + comopt.logfile = NULL; + } + if (nogreeting ) greeting = 0; -- cgit v1.2.3