[git] Pinentry - branch, master, updated. pinentry-0.9.1-23-gd7f2081

by Werner Koch cvs at cvs.gnupg.org
Mon May 11 12:24:53 CEST 2015


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 standard pinentry collection".

The branch, master has been updated
       via  d7f2081fdd605b0d0789bcb6984decfea3777f23 (commit)
      from  319e1a32e3ab67cb0624c0586d7519c16c76d43b (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 d7f2081fdd605b0d0789bcb6984decfea3777f23
Author: Werner Koch <wk at gnupg.org>
Date:   Mon May 11 12:22:48 2015 +0200

    curses: Reset tty state on failed dialog creation.
    
    * pinentry/pinentry-curses.c (dialog_run): Cleanup on dialog_create
    error.
    --
    
    This may happen due to a too small tty.  We need to cleanup in this
    case to keep the tty in a usable state.
    
    GnuPG-bug-id: 1383

diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 043f8a9..8d3f9a5 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -200,7 +200,7 @@ utf8_to_local (char *lc_ctype, char *string)
   mbsrtowcs (wcs, &p, len, &ps);
 
   free (local);
-  
+
  leave:
   if (old_ctype)
     {
@@ -796,9 +796,26 @@ dialog_run (pinentry_t pinentry, const char *tty_name, const char *tty_type)
     }
   refresh ();
 
-  /* XXX */
+  /* Create the dialog.  */
   if (dialog_create (pinentry, &diag))
-    return -2;
+    {
+      endwin ();
+      if (screen)
+        delscreen (screen);
+
+#ifdef HAVE_NCURSESW
+      if (old_ctype)
+        {
+          setlocale (LC_CTYPE, old_ctype);
+          free (old_ctype);
+        }
+#endif
+      if (ttyfi)
+        fclose (ttyfi);
+      if (ttyfo)
+        fclose (ttyfo);
+      return -2;
+    }
   dialog_switch_pos (&diag, diag.pin ? DIALOG_POS_PIN : DIALOG_POS_OK);
 
 #ifndef HAVE_DOSISH_SYSTEM

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

Summary of changes:
 pinentry/pinentry-curses.c | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The standard pinentry collection
http://git.gnupg.org




More information about the Gnupg-commits mailing list