From 1e477b915e0d3e4f3e7c3b90050d890949598641 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Tue, 20 Oct 2015 19:10:51 -0400 Subject: [PATCH] Resend pinentry options during PASSWD and SAVE. Since the initial pinentry options may not have been sent do to key file usage. --- src/libpwmd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libpwmd.c b/src/libpwmd.c index 5ea47fd2..fcdb67de 100644 --- a/src/libpwmd.c +++ b/src/libpwmd.c @@ -1480,6 +1480,7 @@ do_pwmd_save_passwd (pwm_t * pwm, const char *args, pwmd_inquire_cb_t cb, void *data, int save) { gpg_error_t rc = 0; + int no_pinentry = 0; if (!pwm) return FINISH (GPG_ERR_INV_ARG); @@ -1487,7 +1488,10 @@ do_pwmd_save_passwd (pwm_t * pwm, const char *args, pwmd_inquire_cb_t cb, return FINISH (GPG_ERR_INV_STATE); command_start (pwm); - rc = disable_pinentry (pwm, NULL); + rc = disable_pinentry (pwm, &no_pinentry); + if (!rc && !no_pinentry) + rc = send_pinentry_options (pwm); + if (!rc) rc = pwmd_command (pwm, NULL, NULL, cb, data, save ? "SAVE %s" : "PASSWD %s", args ? args : ""); -- 2.11.4.GIT