diff options
author | Werner Koch <[email protected]> | 2022-08-22 10:01:55 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2022-08-22 10:05:02 +0000 |
commit | 203dcc19eb48228c60036691fe87fb37e29369a4 (patch) | |
tree | 03944832ea477df71ad14ed535926355d2e0b43a /common/comopt.c | |
parent | dirmngr: Fix NTBTLS include for test (diff) | |
download | gnupg-203dcc19eb48228c60036691fe87fb37e29369a4.tar.gz gnupg-203dcc19eb48228c60036691fe87fb37e29369a4.zip |
common: New common option no-autostart.
* common/comopt.c (opts): Add "no-autostart".
(parse_comopt): Set it.
* common/comopt.h (comopt): Add no_autostart.
* g10/gpg.c (main): Take care of the new option.
* sm/gpgsm.c (main): Ditto.
* tools/gpg-connect-agent.c (INCLUDED_BY_MAIN_MODULE): Add.
(main): Parse common options and handle new option.
* tools/gpg-card.c (main): Ditto.
(cmd_yubikey): Fix minor error reporting issue.
* common/util.h (GNUPG_MODULE_NAME_CARD): New const.
* common/homedir.c (gnupg_module_name): Support it.
--
Having a global option makes it easier to use disable autostart on a
server which is required to use a remote gpg-agent reliable.
Diffstat (limited to 'common/comopt.c')
-rw-r--r-- | common/comopt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/comopt.c b/common/comopt.c index 764df57c6..470cdac61 100644 --- a/common/comopt.c +++ b/common/comopt.c @@ -45,6 +45,7 @@ enum opt_values oLogFile = 500, oUseKeyboxd, oKeyboxdProgram, + oNoAutostart, oNoop }; @@ -52,6 +53,7 @@ enum opt_values static gpgrt_opt_t opts[] = { ARGPARSE_s_s (oLogFile, "log-file", "@"), ARGPARSE_s_n (oUseKeyboxd, "use-keyboxd", "@"), + ARGPARSE_s_n (oNoAutostart, "no-autostart", "@"), ARGPARSE_s_s (oKeyboxdProgram, "keyboxd-program", "@"), ARGPARSE_end () @@ -60,7 +62,7 @@ static gpgrt_opt_t opts[] = { /* Parse the common options in the homedir and etc. This needs to be - * called after the gpgrt config directories are. MODULE_ID is one of + * called after the gpgrt config directories are set. MODULE_ID is one of * the GNUPG_MODULE_NAME_ constants. If verbose is true info about * the parsing is printed. Note that this function is not * thread-safe. */ @@ -102,6 +104,10 @@ parse_comopt (int module_id, int verbose) comopt.use_keyboxd = 1; break; + case oNoAutostart: + comopt.no_autostart = 1; + break; + case oKeyboxdProgram: comopt.keyboxd_program = pargs.r.ret_str; break; |