summaryrefslogtreecommitdiffstats
path: root/sm/gpgsm.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-11-28 09:44:19 +0100
committerWerner Koch <wk@gnupg.org>2014-11-28 09:44:19 +0100
commit7aee3579be6e24a1aa280e75615fc3a11ceef960 (patch)
treef8ae9f5c3cf5b30d7bfa6d31e37417d9c823996b /sm/gpgsm.c
parentgpg-agent: Add restricted connection feature. (diff)
downloadgnupg2-7aee3579be6e24a1aa280e75615fc3a11ceef960.tar.xz
gnupg2-7aee3579be6e24a1aa280e75615fc3a11ceef960.zip
Add option --no-autostart.
* g10/gpg.c: Add option --no-autostart. * sm/gpgsm.c: Ditto. * g10/options.h (opt): Add field autostart. * sm/gpgsm.h (opt): Ditto. * g10/call-agent.c (start_agent): Print note if agent was not autostarted. * sm/call-agent.c (start_agent): Ditto. * g10/call-dirmngr.c (create_context): Likewise. * sm/call-dirmngr.c (start_dirmngr_ext): Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'sm/gpgsm.c')
-rw-r--r--sm/gpgsm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 03b9bb9c9..3398d173f 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -183,7 +183,8 @@ enum cmd_and_opt_values {
oIgnoreTimeConflict,
oNoRandomSeedFile,
oNoCommonCertsImport,
- oIgnoreCertExtension
+ oIgnoreCertExtension,
+ oNoAutostart
};
@@ -391,6 +392,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oNoRandomSeedFile, "no-random-seed-file", "@"),
ARGPARSE_s_n (oNoCommonCertsImport, "no-common-certs-import", "@"),
ARGPARSE_s_s (oIgnoreCertExtension, "ignore-cert-extension", "@"),
+ ARGPARSE_s_n (oNoAutostart, "no-autostart", "@"),
/* Command aliases. */
ARGPARSE_c (aListKeys, "list-key", "@"),
@@ -940,6 +942,7 @@ main ( int argc, char **argv)
dotlock_create (NULL, 0); /* Register lockfile cleanup. */
+ opt.autostart = 1;
opt.session_env = session_env_new ();
if (!opt.session_env)
log_fatal ("error allocating session environment block: %s\n",
@@ -1417,6 +1420,8 @@ main ( int argc, char **argv)
add_to_strlist (&opt.ignored_cert_extensions, pargs.r.ret_str);
break;
+ case oNoAutostart: opt.autostart = 0; break;
+
default:
pargs.err = configfp? ARGPARSE_PRINT_WARNING:ARGPARSE_PRINT_ERROR;
break;