[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.3-21-g17efcd2

by Werner Koch cvs at cvs.gnupg.org
Tue Dec 12 09:47:23 CET 2017


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, STABLE-BRANCH-2-2 has been updated
       via  17efcd2a2acdc3b7f00711272aa51e5be2476921 (commit)
      from  20b52be9ca29b0bc843fc68a279cb72728ede72f (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 17efcd2a2acdc3b7f00711272aa51e5be2476921
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Dec 12 09:42:43 2017 +0100

    build: New configure option --enable-run-gnupg-user-socket.
    
    * configure.ac: (USE_RUN_GNUPG_USER_SOCKET): New ac_define.
    * common/homedir.c (_gnupg_socketdir_internal): Add extra directories.
    --
    
    This allows to build GnuPG with an extra socketdir below /run.  See
    https://lists.gnupg.org/pipermail/gnupg-devel/2017-November/033250.html
    for a longer explanation why this is sometimes useful.
    
    Suggested-by: Rainer Perske
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/homedir.c b/common/homedir.c
index 149e1ec..a598900 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -541,7 +541,17 @@ _gnupg_socketdir_internal (int skip_checks, unsigned *r_info)
 
 #else /* Unix and stat(2) available. */
 
-  static const char * const bases[] = { "/run", "/var/run", NULL};
+  static const char * const bases[] = {
+#ifdef USE_RUN_GNUPG_USER_SOCKET
+    "/run/gnupg",
+#endif
+    "/run",
+#ifdef USE_RUN_GNUPG_USER_SOCKET
+    "/var/run/gnupg",
+#endif
+    "/var/run",
+    NULL
+  };
   int i;
   struct stat sb;
   char prefix[13 + 1 + 20 + 6 + 1];
@@ -559,7 +569,7 @@ _gnupg_socketdir_internal (int skip_checks, unsigned *r_info)
    * as a background process with no (desktop) user logged in.  Thus
    * we better don't do that.  */
 
-  /* Check whether we have a /run/user dir.  */
+  /* Check whether we have a /run/[gnupg/]user dir.  */
   for (i=0; bases[i]; i++)
     {
       snprintf (prefix, sizeof prefix, "%s/user/%u",
diff --git a/configure.ac b/configure.ac
index a9b7a05..382ef1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1714,6 +1714,22 @@ if test x"$gnupg_builddir_envvar" = x"yes"; then
       [This is only used with "make distcheck"])
 fi
 
+
+#
+# To avoid problems with systemd cleaning up the /run/user directory,
+# this option will make GnuPG try to use /run/gnupg/user as socket dir
+# before /run/user
+#
+AC_ARG_ENABLE(run-gnupg-user-socket,
+    AC_HELP_STRING([--enable-run-gnupg-user-socket],
+                   [try /run/gnupg/user for sockets prior to /run/user]),
+    use_run_gnupg_user_socket=$enableval)
+if test x"$use_run_gnupg_user_socket" = x"yes"; then
+   AC_DEFINE(USE_RUN_GNUPG_USER_SOCKET, 1,
+            [If defined try /run/gnupg/user before /run/user])
+fi
+
+
 #
 # Decide what to build
 #

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

Summary of changes:
 common/homedir.c | 14 ++++++++++++--
 configure.ac     | 16 ++++++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list