mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
agent: Stop scdaemon after reload when disable_scdaemon.
* agent/call-scd.c (agent_card_killscd): New. * agent/gpg-agent.c (agent_sighup_action): Call agent_card_killscd. -- GnuPG-bug-id: 4326 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
30f44957cc
commit
9ccdd59e4e
@ -597,6 +597,7 @@ int agent_card_scd (ctrl_t ctrl, const char *cmdline,
|
||||
int (*getpin_cb)(void *, const char *,
|
||||
const char *, char*, size_t),
|
||||
void *getpin_cb_arg, void *assuan_context);
|
||||
void agent_card_killscd (void);
|
||||
|
||||
|
||||
/*-- learncard.c --*/
|
||||
|
@ -1324,3 +1324,12 @@ agent_card_scd (ctrl_t ctrl, const char *cmdline,
|
||||
|
||||
return unlock_scd (ctrl, 0);
|
||||
}
|
||||
|
||||
void
|
||||
agent_card_killscd (void)
|
||||
{
|
||||
if (primary_scd_ctx == NULL)
|
||||
return;
|
||||
assuan_transact (primary_scd_ctx, "KILLSCD",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
@ -2434,6 +2434,9 @@ agent_sighup_action (void)
|
||||
"pinentry" binary that one can be used in case the
|
||||
"pinentry-basic" fallback was in use. */
|
||||
gnupg_module_name_flush_some ();
|
||||
|
||||
if (opt.disable_scdaemon)
|
||||
agent_card_killscd ();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user