[git] GnuPG - branch, scd-pin-prompt, updated. gnupg-2.1.0beta3-21-g74fe0b7

by Ben Kibbey cvs at cvs.gnupg.org
Wed Jan 25 03:49:21 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, scd-pin-prompt has been updated
       via  74fe0b79a1dc50a810b23100aa10284e792cc3e5 (commit)
       via  7a61398e67b376ea5bdf30cdbbd0c5a25a2cf070 (commit)
      from  add0e34babcc6750f4675a8ab3b189b01127116f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 74fe0b79a1dc50a810b23100aa10284e792cc3e5
Author: Ben Kibbey <bjk at luxsci.net>
Date:   Tue Jan 24 18:52:02 2012 -0500

    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.

diff --git a/scd/command.c b/scd/command.c
index 0b82a2b..d85f0fc 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -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;
 }
 

commit 7a61398e67b376ea5bdf30cdbbd0c5a25a2cf070
Author: Ben Kibbey <bjk at luxsci.net>
Date:   Tue Jan 24 18:14:16 2012 -0500

    Return successfully when the app has no SCD pin prompt callback.
    
    * scd/app.c (app_set_pin_prompt): Create a log message when the app
    contains no pinentry prompt callback and return 0.

diff --git a/scd/app.c b/scd/app.c
index 51bd207..4705e0a 100644
--- a/scd/app.c
+++ b/scd/app.c
@@ -1043,7 +1043,10 @@ app_set_pin_prompt(app_t app, int which, const char *prompt)
     return gpg_error (GPG_ERR_INV_VALUE);
 
   if (!app->fnc.set_pin_prompt)
-    return gpg_error (GPG_ERR_UNSUPPORTED_OPERATION);
+    {
+      log_info ("no pinentry prompt callback for app has been set");
+      return 0;
+    }
 
   return app->fnc.set_pin_prompt (app, which, prompt);
 }

-----------------------------------------------------------------------

Summary of changes:
 scd/app.c     |    5 ++++-
 scd/command.c |    7 ++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list