Invoke gpgconf by absolute path.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 15 Nov 2016 02:41:49 +0000 (11:41 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 15 Nov 2016 02:41:49 +0000 (11:41 +0900)
* configure.ac (GNUPG_DEFAULT_GPGCONF): No parens.
(GNUPG_DEFAULT_DIRMNGR): Remove unused var.
* src/scd/scd.c (get_agent_socket_name): Use GNUPG_DEFAULT_GPGCONF.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
configure.ac
src/scd/scd.c

index 0aba308..626b9a0 100644 (file)
@@ -69,13 +69,10 @@ AC_DEFINE_UNQUOTED(NEED_KSBA_VERSION, "$NEED_KSBA_VERSION",
 AH_BOTTOM([
 /* Setup the hardwired names of modules. */
 #ifndef GNUPG_DEFAULT_GPGCONF
-#define GNUPG_DEFAULT_GPGCONF    ( GNUPG_BINDIR "/gpgconf" )
+#define GNUPG_DEFAULT_GPGCONF GNUPG_BINDIR "/gpgconf"
 #endif
 #ifndef GNUPG_DEFAULT_SCD
-#define GNUPG_DEFAULT_SCD    ( GNUPG_LIBEXECDIR "/scdaemon" )
-#endif
-#ifndef GNUPG_DEFAULT_DIRMNGR
-#define GNUPG_DEFAULT_DIRMNGR    ( GNUPG_BINDIR "/dirmngr" )
+#define GNUPG_DEFAULT_SCD     GNUPG_LIBEXECDIR "/scdaemon"
 #endif
 ])
 
index 06a26d8..5626187 100644 (file)
@@ -110,7 +110,8 @@ get_agent_socket_name (char **gpg_agent_sockname)
   if (!result)
     return gpg_error_from_syserror ();
 
-  input = popen ("gpgconf --list-dirs agent-socket", "r");
+  /* It is good if we have popen with execv (no SHELL) */
+  input = popen (GNUPG_DEFAULT_GPGCONF " --list-dirs agent-socket", "r");
   if (input == NULL)
     {
       xfree (result);