[git] GnuPG - branch, master, updated. gnupg-2.1.1-3-g5cb6df8

by Werner Koch cvs at cvs.gnupg.org
Wed Dec 17 10:38:40 CET 2014


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  5cb6df8996623c00eaa2a39e3037101585442f7e (commit)
      from  b1b1923b06acbe9d0b653445548530e949ea5b9a (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 5cb6df8996623c00eaa2a39e3037101585442f7e
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Dec 17 10:36:24 2014 +0100

    gpgconf: Exit with failure if --launch fails.
    
    * tools/gpgconf-comp.c (gc_component_launch): Return an error code.
    * tools/gpgconf.c (main): Exit if launch failed.
    --
    GnuPG-bug-id: 1791

diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 77139bb..8c47b2e 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -1142,7 +1142,7 @@ dirmngr_runtime_change (int killflag)
 
 
 /* Launch the gpg-agent or the dirmngr if not already running.  */
-void
+gpg_error_t
 gc_component_launch (int component)
 {
   gpg_error_t err;
@@ -1176,6 +1176,7 @@ gc_component_launch (int component)
               " NOP",
               gpg_strerror (err));
   gnupg_release_process (pid);
+  return err;
 }
 
 
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 31804f5..423a66c 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -281,9 +281,17 @@ main (int argc, char **argv)
               exit (1);
             }
           else if (cmd == aLaunch)
-            gc_component_launch (idx);
+            {
+              if (gc_component_launch (idx))
+                exit (1);
+            }
           else
-            gc_component_kill (idx);
+            {
+              /* We don't error out if the kill failed because this
+                 command should do nothing if the component is not
+                 running.  */
+              gc_component_kill (idx);
+            }
         }
       break;
 
diff --git a/tools/gpgconf.h b/tools/gpgconf.h
index 0286c27..d63833d 100644
--- a/tools/gpgconf.h
+++ b/tools/gpgconf.h
@@ -45,7 +45,7 @@ char *gc_percent_escape (const char *src);
 void gc_error (int status, int errnum, const char *fmt, ...);
 
 /* Launch given component.  */
-void gc_component_launch (int component);
+gpg_error_t gc_component_launch (int component);
 
 /* Kill given component.  */
 void gc_component_kill (int component);

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

Summary of changes:
 tools/gpgconf-comp.c |    3 ++-
 tools/gpgconf.c      |   12 ++++++++++--
 tools/gpgconf.h      |    2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)


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




More information about the Gnupg-commits mailing list