[git] GnuPG - branch, master, updated. gnupg-2.1.15-296-gcf20b23

by Werner Koch cvs at cvs.gnupg.org
Thu Oct 27 09:31:14 CEST 2016


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  cf20b23c146c9e499263654644035796475de097 (commit)
       via  a9c8b5fbe7ae241bf45bdee15884abc7891aedf9 (commit)
      from  45dfc02b47f798f5a3b9973ca6a9f5a907d7e665 (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 cf20b23c146c9e499263654644035796475de097
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Oct 27 09:27:03 2016 +0200

    dirmngr: Do not implement --supervised in Windows.
    
    * dirmngr/dirmngr.c (opts) [W32]: Remove --supervised.
    (main) [W32]: Ditto.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 2903681..07cbed9 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -150,7 +150,9 @@ static ARGPARSE_OPTS opts[] = {
 
   ARGPARSE_c (aServer,   "server",  N_("run in server mode (foreground)") ),
   ARGPARSE_c (aDaemon,   "daemon",  N_("run in daemon mode (background)") ),
-  ARGPARSE_c (aSupervised, "supervised", N_("run under supervision (e.g. systemd)")),
+#ifndef HAVE_W32_SYSTEM
+  ARGPARSE_c (aSupervised,  "supervised", N_("run in supervised mode")),
+#endif
   ARGPARSE_c (aListCRLs, "list-crls", N_("list the contents of the CRL cache")),
   ARGPARSE_c (aLoadCRL,  "load-crl",  N_("|FILE|load CRL from FILE into cache")),
   ARGPARSE_c (aFetchCRL, "fetch-crl", N_("|URL|fetch a CRL from URL")),
@@ -996,6 +998,7 @@ main (int argc, char **argv)
       start_command_handler (ASSUAN_INVALID_FD);
       shutdown_reaper ();
     }
+#ifndef HAVE_W32_SYSTEM
   else if (cmd == aSupervised)
     {
       /* In supervised mode, we expect file descriptor 3 to be an
@@ -1004,9 +1007,9 @@ main (int argc, char **argv)
          We will also not detach from the controlling process or close
          stderr; the supervisor should handle all of that.  */
       struct stat statbuf;
-      if (fstat (3, &statbuf) == -1 && errno ==EBADF)
+      if (fstat (3, &statbuf) == -1 && errno == EBADF)
         {
-          log_error ("file descriptor 3 must be already open in --supervised mode\n");
+          log_error ("file descriptor 3 must be validin --supervised mode\n");
           dirmngr_exit (1);
         }
       socket_name = gnupg_get_socket_name (3);
@@ -1033,6 +1036,7 @@ main (int argc, char **argv)
       assuan_sock_close (3);
       shutdown_reaper ();
     }
+#endif /*HAVE_W32_SYSTEM*/
   else if (cmd == aDaemon)
     {
       assuan_fd_t fd;
diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi
index 69d7e5e..6620a87 100644
--- a/doc/dirmngr.texi
+++ b/doc/dirmngr.texi
@@ -90,7 +90,7 @@ internal certificate validation code.  This mode is deprecated.
 Run in the foreground, sending logs to stderr, and listening on file
 descriptor 3, which must already be bound to a listening socket.  This
 is useful when running under systemd or other similar process
-supervision schemes.
+supervision schemes.  This option is not supported on Windows.
 
 @item --list-crls
 @opindex list-crls

commit a9c8b5fbe7ae241bf45bdee15884abc7891aedf9
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Oct 27 09:13:36 2016 +0200

    common: Remove debug output from gnupg_get_socket_name.
    
    * common/sysutils.c (gnupg_get_socket_name): Remove debug message and
    use my_error_from_syserror.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/sysutils.c b/common/sysutils.c
index 0f87a42..6eea90e 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -1105,7 +1105,7 @@ gnupg_get_socket_name (int fd)
 
   if (getsockname (fd, (struct sockaddr*)&un, &len) != 0)
     log_error ("could not getsockname(%d): %s\n", fd,
-               gpg_strerror (gpg_error_from_syserror ()));
+               gpg_strerror (my_error_from_syserror ()));
   else if (un.sun_family != AF_UNIX)
     log_error ("file descriptor %d is not a unix-domain socket\n", fd);
   else if (len <= offsetof (struct sockaddr_un, sun_path))
@@ -1117,12 +1117,12 @@ gnupg_get_socket_name (int fd)
     {
       size_t namelen = len - offsetof (struct sockaddr_un, sun_path);
 
-      log_debug ("file descriptor %d has path %s (%zu octets)\n", fd,
-                 un.sun_path, namelen);
+      /* log_debug ("file descriptor %d has path %s (%zu octets)\n", fd, */
+      /*            un.sun_path, namelen); */
       name = xtrymalloc (namelen + 1);
       if (!name)
         log_error ("failed to allocate memory for name of fd %d: %s\n",
-                   fd, gpg_strerror (gpg_error_from_syserror ()));
+                   fd, gpg_strerror (my_error_from_syserror ()));
       else
         {
           memcpy (name, un.sun_path, namelen);

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

Summary of changes:
 common/sysutils.c |  8 ++++----
 dirmngr/dirmngr.c | 10 +++++++---
 doc/dirmngr.texi  |  2 +-
 3 files changed, 12 insertions(+), 8 deletions(-)


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




More information about the Gnupg-commits mailing list