[git] GnuPG - branch, master, updated. gnupg-2.1.15-51-g8b6c0ba

by NIIBE Yutaka cvs at cvs.gnupg.org
Fri Sep 2 06:47:49 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  8b6c0bae33bdc36892f4595806665ce61f77dfd2 (commit)
      from  afdfc954b35370fbf03aaf8dc0e496410923aa4e (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 8b6c0bae33bdc36892f4595806665ce61f77dfd2
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Sep 2 13:41:19 2016 +0900

    agent: invoke scdaemon with --homedir.
    
    * agent/call-scd.c (start_scd): Supply --homedir option when it's not
    default homedir.
    
    --
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/agent/call-scd.c b/agent/call-scd.c
index b776840..934ab4c 100644
--- a/agent/call-scd.c
+++ b/agent/call-scd.c
@@ -195,10 +195,11 @@ start_scd (ctrl_t ctrl)
   gpg_error_t err = 0;
   const char *pgmname;
   assuan_context_t ctx = NULL;
-  const char *argv[3];
+  const char *argv[5];
   assuan_fd_t no_close_list[3];
   int i;
   int rc;
+  char *abs_homedir = NULL;
 
   if (opt.disable_scdaemon)
     return gpg_error (GPG_ERR_NOT_SUPPORTED);
@@ -313,7 +314,22 @@ start_scd (ctrl_t ctrl)
 
   argv[0] = pgmname;
   argv[1] = "--multi-server";
-  argv[2] = NULL;
+  if (gnupg_default_homedir_p ())
+    argv[2] = NULL;
+  else
+    {
+      abs_homedir = make_absfilename_try (gnupg_homedir (), NULL);
+      if (!abs_homedir)
+        {
+          log_error ("error building filename: %s\n",
+                     gpg_strerror (gpg_error_from_syserror ()));
+          goto leave;
+        }
+
+      argv[2] = "--homedir";
+      argv[3] = abs_homedir;
+      argv[4] = NULL;
+    }
 
   i=0;
   if (!opt.running_detached)
@@ -393,6 +409,7 @@ start_scd (ctrl_t ctrl)
   primary_scd_ctx_reusable = 0;
 
  leave:
+  xfree (abs_homedir);
   if (err)
     {
       unlock_scd (ctrl, err);

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

Summary of changes:
 agent/call-scd.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list