[git] GnuPG - branch, master, updated. gnupg-2.1.5-29-g7a38733

by Werner Koch cvs at cvs.gnupg.org
Mon Jun 29 12:27:09 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 GNU Privacy Guard".

The branch, master has been updated
       via  7a387331645736eaeaaef57770beef5fa741bc22 (commit)
      from  2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073 (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 7a387331645736eaeaaef57770beef5fa741bc22
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Jun 29 12:24:58 2015 +0200

    agent,w32: Do not create a useless socket with --enable-putty-support.
    
    * agent/agent.h (opt): Remove field ssh_support.
    * agent/gpg-agent.c (ssh_support): New.  Replace all opt.ssh_support
    by this.
    (main): Do not set ssh_support along with setting putty_support.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/agent/agent.h b/agent/agent.h
index cabb821..fabe99b 100644
--- a/agent/agent.h
+++ b/agent/agent.h
@@ -140,9 +140,6 @@ struct
   int keep_tty;      /* Don't switch the TTY (for pinentry) on request */
   int keep_display;  /* Don't switch the DISPLAY (for pinentry) on request */
 
-  /* This global option enables the ssh-agent subsystem.  */
-  int ssh_support;
-
   /* This global options indicates the use of an extra socket. Note
      that we use a hack for cleanup handling in gpg-agent.c: If the
      value is less than 2 the name has not yet been malloced. */
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index b27abe3..b4fab4e 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -280,6 +280,9 @@ static struct debug_flags_s debug_flags [] =
 #endif
 
 
+/* Flag indicating that the ssh-agent subsystem has been enabled.  */
+static int ssh_support;
+
 #ifdef HAVE_W32_SYSTEM
 /* Flag indicating that support for Putty has been enabled.  */
 static int putty_support;
@@ -935,11 +938,12 @@ main (int argc, char **argv )
         case oKeepTTY: opt.keep_tty = 1; break;
         case oKeepDISPLAY: opt.keep_display = 1; break;
 
-	case oSSHSupport:  opt.ssh_support = 1; break;
+	case oSSHSupport:
+          ssh_support = 1;
+          break;
         case oPuttySupport:
 #        ifdef HAVE_W32_SYSTEM
           putty_support = 1;
-          opt.ssh_support = 1;
 #        endif
           break;
 
@@ -1110,10 +1114,9 @@ main (int argc, char **argv )
               GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME);
       es_printf ("disable-scdaemon:%lu:\n",
               GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME);
+      es_printf ("enable-ssh-support:%lu:\n", GC_OPT_FLAG_NONE);
 #ifdef HAVE_W32_SYSTEM
       es_printf ("enable-putty-support:%lu:\n", GC_OPT_FLAG_NONE);
-#else
-      es_printf ("enable-ssh-support:%lu:\n", GC_OPT_FLAG_NONE);
 #endif
       es_printf ("allow-loopback-pinentry:%lu:\n",
                  GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME);
@@ -1209,7 +1212,7 @@ main (int argc, char **argv )
                                              &socket_nonce_browser);
         }
 
-      if (opt.ssh_support)
+      if (ssh_support)
         {
           socket_name_ssh = create_socket_name (GPG_AGENT_SSH_SOCK_NAME, 1);
           fd_ssh = create_server_socket (socket_name_ssh, 0,
@@ -1258,7 +1261,7 @@ main (int argc, char **argv )
 #endif /*HAVE_SIGPROCMASK*/
 
           /* Create the SSH info string if enabled. */
-	  if (opt.ssh_support)
+	  if (ssh_support)
 	    {
 	      if (asprintf (&infostr_ssh_sock, "SSH_AUTH_SOCK=%s",
 			    socket_name_ssh) < 0)
@@ -1282,13 +1285,13 @@ main (int argc, char **argv )
 	    *socket_name_extra = 0;
 	  if (opt.browser_socket)
 	    *socket_name_browser = 0;
-	  if (opt.ssh_support)
+	  if (ssh_support)
 	    *socket_name_ssh = 0;
 
           if (argc)
             { /* Run the program given on the commandline.  */
-              if (opt.ssh_support && (putenv (infostr_ssh_sock)
-                                      || putenv (infostr_ssh_valid)))
+              if (ssh_support && (putenv (infostr_ssh_sock)
+                                  || putenv (infostr_ssh_valid)))
                 {
                   log_error ("failed to set environment: %s\n",
                              strerror (errno) );
@@ -1314,7 +1317,7 @@ main (int argc, char **argv )
                  shell's eval to set it */
               if (csh_style)
                 {
-		  if (opt.ssh_support)
+		  if (ssh_support)
 		    {
 		      *strchr (infostr_ssh_sock, '=') = ' ';
 		      es_printf ("setenv %s;\n", infostr_ssh_sock);
@@ -1322,13 +1325,13 @@ main (int argc, char **argv )
                 }
               else
                 {
-		  if (opt.ssh_support)
+		  if (ssh_support)
 		    {
 		      es_printf ("%s; export SSH_AUTH_SOCK;\n",
                                  infostr_ssh_sock);
 		    }
                 }
-	      if (opt.ssh_support)
+	      if (ssh_support)
 		{
 		  xfree (infostr_ssh_sock);
 		  xfree (infostr_ssh_valid);
diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi
index 737b51b..8e0f1ff 100644
--- a/doc/gpg-agent.texi
+++ b/doc/gpg-agent.texi
@@ -478,7 +478,9 @@ remote machine.
 
 @anchor{option --enable-ssh-support}
 @item --enable-ssh-support
+ at itemx --enable-putty-support
 @opindex enable-ssh-support
+ at opindex enable-putty-support
 
 Enable the OpenSSH Agent protocol.
 
@@ -522,6 +524,12 @@ gpg-connect-agent /bye
 
 Adding the @option{--verbose} shows the progress of starting the agent.
 
+The @option{--enable-putty-support} is only available under Windows
+and allows the use of gpg-agent with the ssh implementation
+ at command{putty}.  This is similar to the regular ssh-agent support but
+makes use of Windows message queue as required by @command{putty}.
+
+
 @end table
 
 All the long options may also be given in the configuration file after

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

Summary of changes:
 agent/agent.h      |  3 ---
 agent/gpg-agent.c  | 27 +++++++++++++++------------
 doc/gpg-agent.texi |  8 ++++++++
 3 files changed, 23 insertions(+), 15 deletions(-)


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




More information about the Gnupg-commits mailing list