summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2022-08-22 12:01:55 +0200
committerWerner Koch <wk@gnupg.org>2022-08-22 12:05:02 +0200
commit203dcc19eb48228c60036691fe87fb37e29369a4 (patch)
tree03944832ea477df71ad14ed535926355d2e0b43a /g10
parentdirmngr: Fix NTBTLS include for test (diff)
downloadgnupg2-203dcc19eb48228c60036691fe87fb37e29369a4.tar.xz
gnupg2-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 'g10')
-rw-r--r--g10/gpg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 397f4cc87..35ffaf339 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -3784,6 +3784,8 @@ main (int argc, char **argv)
comopt.keyboxd_program = NULL;
}
+ if (comopt.no_autostart)
+ opt.autostart = 0;
/* The command --gpgconf-list is pretty simple and may be called
directly after the option parsing. */