mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Let the RESTART command reset any scdaemon pin prompts.
The gpg-agent sends the RESTART command to scdaemon when the client has disconnected. This commit allows future connections to scdaemon use the default pinentry prompts. It is recommended to use the scdaemon LOCK command to prevent other scdaemon clients from altering the prompts before the current client has finished with the scdaemon pinentry since the set prompts are global to the application. * scd/command.c (cmd_restart): Free any allocated custom pinentry prompt strings to let the application use its default.
This commit is contained in:
parent
7a61398e67
commit
74fe0b79a1
@ -142,7 +142,7 @@ struct server_local_s
|
||||
/* User-defined pinentry prompt strings. Needed both here and in the app
|
||||
* since they may be set by the user before an app is selected with
|
||||
* select_application(). They are copied to the app when
|
||||
* select_application() succeeds and further modifications done in the app.
|
||||
* select_application() succeeds.
|
||||
* */
|
||||
char *pin_prompt;
|
||||
char *pin_admin_prompt;
|
||||
@ -1838,6 +1838,11 @@ cmd_restart (assuan_context_t ctx, char *line)
|
||||
locked_session = NULL;
|
||||
log_info ("implicitly unlocking due to RESTART\n");
|
||||
}
|
||||
|
||||
xfree (ctrl->server_local->pin_prompt);
|
||||
xfree (ctrl->server_local->pin_admin_prompt);
|
||||
ctrl->server_local->pin_prompt = NULL;
|
||||
ctrl->server_local->pin_admin_prompt = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user