From bf26c08b95389718ba07f12789d372c6f438134f Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 26 Oct 2017 11:24:39 +0900 Subject: agent, tests: Support --disable-scdaemon build case. * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON. * tests/openpgp/defs.scm (create-gpghome): Likewise. * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise. -- We could modify gpg-agent to remove all support of scdaemon, with no inclusion of call-scd.c, divert-scd.c, and learncard.c, but it would not be worth to do that. GnuPG-bug-id: 3316 Signed-off-by: NIIBE Yutaka --- agent/command.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'agent/command.c') diff --git a/agent/command.c b/agent/command.c index 4016cc20b..3b249b1bd 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1988,14 +1988,17 @@ static const char hlp_scd[] = static gpg_error_t cmd_scd (assuan_context_t ctx, char *line) { - ctrl_t ctrl = assuan_get_pointer (ctx); int rc; - +#ifdef BUILD_WITH_SCDAEMON + ctrl_t ctrl = assuan_get_pointer (ctx); if (ctrl->restricted) return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN)); rc = divert_generic_cmd (ctrl, line, ctx); - +#else + (void)ctx; (void)line; + rc = gpg_error (GPG_ERR_NOT_SUPPORTED); +#endif return rc; } -- cgit