[git] Pinentry - branch, master, updated. pinentry-0.9.5-14-g78afb80

by Andre Heinecke cvs at cvs.gnupg.org
Tue Aug 18 19:46:50 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  78afb80e5742f8542f21537307c6f39c05c1a7f3 (commit)
      from  1532bf3fa57f624c80ea1e9f958d88fedc377e68 (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 78afb80e5742f8542f21537307c6f39c05c1a7f3
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Aug 18 19:24:25 2015 +0200

    Fix pinentry for Windows
    
    * pinentry/pinentry.c (pinentry_loop2): Use assuan_fdopen for pipe fds.
    * pinentry/pinentry.h (pinentry_loop2): Mention this in the comment.
    
    --
    For Windows calling assuan_fdopen is neccessary as this does
    some internal platform specific stuff (get_osfilehandle).
    
    This issue was introduced by using the real libassuan instead
    of the built in variant.

diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
index e682de7..21f8f79 100644
--- a/pinentry/pinentry.c
+++ b/pinentry/pinentry.c
@@ -1436,7 +1436,7 @@ int
 pinentry_loop2 (int infd, int outfd)
 {
   gpg_error_t rc;
-  int filedes[2];
+  assuan_fd_t filedes[2];
   assuan_context_t ctx;
 
   /* Extra check to make sure we have dropped privs. */
@@ -1456,8 +1456,8 @@ pinentry_loop2 (int infd, int outfd)
   /* For now we use a simple pipe based server so that we can work
      from scripts.  We will later add options to run as a daemon and
      wait for requests on a Unix domain socket.  */
-  filedes[0] = infd;
-  filedes[1] = outfd;
+  filedes[0] = assuan_fdopen (infd);
+  filedes[1] = assuan_fdopen (outfd);
   rc = assuan_init_pipe_server (ctx, filedes);
   if (rc)
     {
diff --git a/pinentry/pinentry.h b/pinentry/pinentry.h
index abcc3a5..98db4bc 100644
--- a/pinentry/pinentry.h
+++ b/pinentry/pinentry.h
@@ -211,7 +211,9 @@ typedef int (*pinentry_cmd_handler_t) (pinentry_t pin);
    error.  Otherwise, 0 is returned.  */
 int pinentry_loop (void);
 
-/* The same as above but allows to specify the i/o descriptors. */
+/* The same as above but allows to specify the i/o descriptors.
+ * assuan_fdopen will be called on infd and outfd.
+ */
 int pinentry_loop2 (int infd, int outfd);
 
 

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

Summary of changes:
 pinentry/pinentry.c | 6 +++---
 pinentry/pinentry.h | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)


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




More information about the Gnupg-commits mailing list