[git] GnuPG - branch, master, updated. gnupg-2.1.9-186-g82f6abb

by Werner Koch cvs at cvs.gnupg.org
Thu Nov 26 18:14:34 CET 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  82f6abb4807c89388052ab442368d9e09fb84aea (commit)
       via  61941a984964308b09c7fc1b3438fb99d0b3c917 (commit)
       via  d226e67856e7197c581dcd2cef0f1e687bee0ac9 (commit)
       via  f95cff1cc9e7a4d9f6b7c45188ec47e70f9874dc (commit)
      from  676b2d7081291f7e47a66755ab07af259fea130b (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 82f6abb4807c89388052ab442368d9e09fb84aea
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 26 18:10:05 2015 +0100

    g13: Fix commit 1a045b13.
    
    * g13/g13.c (main): Use existsing function.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g13/g13.c b/g13/g13.c
index 7fe207a..7a8d775 100644
--- a/g13/g13.c
+++ b/g13/g13.c
@@ -580,10 +580,10 @@ main ( int argc, char **argv)
   /* XXX Construct GPG arguments.  */
   {
     strlist_t last;
-    last = strlist_append (&opt.gpg_arguments, "-z");
-    last = strlist_append (&last, "0");
-    last = strlist_append (&last, "--trust-model");
-    last = strlist_append (&last, "always");
+    last = append_to_strlist (&opt.gpg_arguments, "-z");
+    last = append_to_strlist (&last, "0");
+    last = append_to_strlist (&last, "--trust-model");
+    last = append_to_strlist (&last, "always");
     (void) last;
   }
 

commit 61941a984964308b09c7fc1b3438fb99d0b3c917
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 26 18:04:54 2015 +0100

    common: Fix off-by-one access in the new format_text.
    
    * common/stringhelp.c (format_text): Use existsing fucntion to trim
    trailing spaces.  Fix off-by-one access.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/stringhelp.c b/common/stringhelp.c
index 6748d1e..e8b990a 100644
--- a/common/stringhelp.c
+++ b/common/stringhelp.c
@@ -1328,6 +1328,11 @@ strtokenize (const char *string, const char *delim)
   return result;
 }
 
+
+/* Format a string so that it fits within about TARGET_COLS columns.
+   If IN_PLACE is 0, then TEXT is copied to a new buffer, which is
+   returned.  Otherwise, TEXT is modified in place and returned.
+   Normally, target_cols will be 72 and max_cols is 80.  */
 char *
 format_text (char *text, int in_place, int target_cols, int max_cols)
 {
@@ -1448,10 +1453,9 @@ format_text (char *text, int in_place, int target_cols, int max_cols)
     }
 
   /* Chop off any trailing space.  */
-  while (text[strlen (text) - 1] == ' ')
-    text[strlen (text) - 1] = '\0';
+  trim_trailing_chars (text, strlen (text), " ");
   /* If we inserted the trailing newline, then remove it.  */
-  if (! copied_last_space && text[strlen (text) - 1] == '\n')
+  if (! copied_last_space && *text && text[strlen (text) - 1] == '\n')
     text[strlen (text) - 1] = '\0';
 
   return text;
diff --git a/common/stringhelp.h b/common/stringhelp.h
index 9ff062b..c813662 100644
--- a/common/stringhelp.h
+++ b/common/stringhelp.h
@@ -148,12 +148,10 @@ char **strsplit (char *string, char delim, char replacement, int *count);
 /* Tokenize STRING using the set of delimiters in DELIM.  */
 char **strtokenize (const char *string, const char *delim);
 
-/* Format a string so that it fits within about TARGET_COLS columns.
-   If IN_PLACE is 0, then TEXT is copied to a new buffer, which is
-   returned.  Otherwise, TEXT is modified in place and returned.
-   Normally, target_cols will be 72 and max_cols is 80.  */
+/* Format a string so that it fits within about TARGET_COLS columns.  */
 char *format_text (char *text, int in_place, int target_cols, int max_cols);
 
+
 /*-- mapstrings.c --*/
 const char *map_static_macro_string (const char *string);
 

commit d226e67856e7197c581dcd2cef0f1e687bee0ac9
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 26 17:35:56 2015 +0100

    dirmngr: Improve output of "getinfo tor".
    
    * dirmngr/server.c (cmd_getinfo): Print a message along with OK.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/dirmngr/server.c b/dirmngr/server.c
index ba37508..8954ba8 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2121,7 +2121,13 @@ cmd_getinfo (assuan_context_t ctx, char *line)
     }
   else if (!strcmp (line, "tor"))
     {
-      err = opt.use_tor? 0:set_error (GPG_ERR_GENERAL, "Tor mode not enabled");
+      if (opt.use_tor)
+        {
+          err = 0;
+          assuan_set_okay_line (ctx, " - Tor mode is enabled");
+        }
+      else
+        err = set_error (GPG_ERR_FALSE, "Tor mode is NOT enabled");
     }
   else
     err = set_error (GPG_ERR_ASS_PARAMETER, "unknown value for WHAT");

commit f95cff1cc9e7a4d9f6b7c45188ec47e70f9874dc
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Nov 26 17:15:08 2015 +0100

    dirmngr: Let Libassuan employ nPth wrappers for connect.
    
    * dirmngr/http.c (my_unprotect, my_protect): Remove.
    (connect_server): Do not use these wrappers.
    --
    
    Since Libassuan version 2.4.2 the macro ASSUAN_SYSTEM_NPTH_IMPL
    protects the low-level connect calls with npth_unprotect and
    npth_protect.  This is better than the high-level kludge we used here.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/dirmngr/http.c b/dirmngr/http.c
index 60dc45f..02854e4 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -105,13 +105,9 @@
 #ifdef USE_NPTH
 # define my_select(a,b,c,d,e)  npth_select ((a), (b), (c), (d), (e))
 # define my_accept(a,b,c)      npth_accept ((a), (b), (c))
-# define my_unprotect()        npth_unprotect ()
-# define my_protect()          npth_protect ()
 #else
 # define my_select(a,b,c,d,e)  select ((a), (b), (c), (d), (e))
 # define my_accept(a,b,c)      accept ((a), (b), (c))
-# define my_unprotect()        do { } while(0)
-# define my_protect()          do { } while(0)
 #endif
 
 #ifdef HAVE_W32_SYSTEM
@@ -2228,11 +2224,8 @@ connect_server (const char *server, unsigned short port,
     {
 #ifdef ASSUAN_SOCK_TOR
 
-      my_unprotect ();
       sock = assuan_sock_connect_byname (server, port, 0, NULL,
                                          ASSUAN_SOCK_TOR);
-      my_protect ();
-
       if (sock == ASSUAN_INVALID_FD)
         {
           if (errno == EHOSTUNREACH)
@@ -2327,9 +2320,7 @@ connect_server (const char *server, unsigned short port,
             }
 
           anyhostaddr = 1;
-          my_unprotect ();
           ret = assuan_sock_connect (sock, ai->addr, ai->addrlen);
-          my_protect ();
           if (ret)
             last_errno = errno;
           else

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

Summary of changes:
 common/stringhelp.c | 10 +++++++---
 common/stringhelp.h |  6 ++----
 dirmngr/http.c      |  9 ---------
 dirmngr/server.c    |  8 +++++++-
 g13/g13.c           |  8 ++++----
 5 files changed, 20 insertions(+), 21 deletions(-)


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




More information about the Gnupg-commits mailing list