summaryrefslogtreecommitdiffstats
path: root/sm/call-dirmngr.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/call-dirmngr.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/call-dirmngr.c')
-rw-r--r--sm/call-dirmngr.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
index 4dc8425d6..f8cfdf8e8 100644
--- a/sm/call-dirmngr.c
+++ b/sm/call-dirmngr.c
@@ -209,8 +209,18 @@ start_dirmngr_ext (ctrl_t ctrl, assuan_context_t *ctx_r)
err = start_new_dirmngr (&ctx, GPG_ERR_SOURCE_DEFAULT,
opt.homedir, opt.dirmngr_program,
- 1, opt.verbose, DBG_ASSUAN,
+ opt.autostart, opt.verbose, DBG_ASSUAN,
gpgsm_status2, ctrl);
+ if (!opt.autostart && gpg_err_code (err) == GPG_ERR_NO_DIRMNGR)
+ {
+ static int shown;
+
+ if (!shown)
+ {
+ shown = 1;
+ log_info (_("no dirmngr running in this session\n"));
+ }
+ }
prepare_dirmngr (ctrl, ctx, err);
if (err)
return err;