[Pkg-gnupg-commit] [gnupg2] 71/292: agent: Kludge to allow disabling of the extra sockets.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Nov 21 06:31:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 95cf7afff074613825f4442fa131145a2c0d3cf7
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Sep 30 18:49:16 2016 +0200

    agent: Kludge to allow disabling of the extra sockets.
    
    * agent/gpg-agent.c (main): Check for special socket names.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 agent/gpg-agent.c  | 16 ++++++++++++++++
 doc/gpg-agent.texi |  5 +++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 4dda44c..d3f203b 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1050,12 +1050,28 @@ main (int argc, char **argv )
       opt.extra_socket = 1;  /* (1 = points into r/o section)  */
       socket_name_extra = GPG_AGENT_EXTRA_SOCK_NAME;
     }
+  else if (socket_name_extra
+           && (!strcmp (socket_name_extra, "none")
+               || !strcmp (socket_name_extra, "/dev/null")))
+    {
+      /* User requested not to create this socket.  */
+      opt.extra_socket = 0;
+      socket_name_extra = NULL;
+    }
 
   if (! opt.browser_socket)
     {
       opt.browser_socket = 1;  /* (1 = points into r/o section)  */
       socket_name_browser = GPG_AGENT_BROWSER_SOCK_NAME;
     }
+  else if (socket_name_browser
+           && (!strcmp (socket_name_browser, "none")
+               || !strcmp (socket_name_browser, "/dev/null")))
+    {
+      /* User requested not to create this socket.  */
+      opt.browser_socket = 0;
+      socket_name_browser = NULL;
+    }
 
   set_debug ();
 
diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi
index 8d86add..0bb7db2 100644
--- a/doc/gpg-agent.texi
+++ b/doc/gpg-agent.texi
@@ -537,8 +537,9 @@ pinentry to pop up at the @code{tty} or display you started the agent.
 @anchor{option --extra-socket}
 @item --extra-socket @var{name}
 @opindex extra-socket
-The extra socket is always created, you may use this option to change
-the name of the socket.
+The extra socket is created by default, you may use this option to
+change the name of the socket.  To disable the creation of the socket
+use ``none'' or ``/dev/null'' for @var{name}.
 
 Also listen on native gpg-agent connections on the given socket.  The
 intended use for this extra socket is to setup a Unix domain socket

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list