summaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-09-30 19:21:51 +0200
committerWerner Koch <wk@gnupg.org>2016-09-30 19:21:51 +0200
commit80cc16e0728256f6b07a12980e1f3512cf2324fa (patch)
tree73ce0c7b5e15dc656cfacb6933eaeaf6ef3a6dc9 /agent
parentagent: Kludge to allow disabling of the extra sockets. (diff)
downloadgnupg2-80cc16e0728256f6b07a12980e1f3512cf2324fa.tar.xz
gnupg2-80cc16e0728256f6b07a12980e1f3512cf2324fa.zip
agent: Create the extra sockets in the standard socket dir.
* agent/gpg-agent.c (main): Take the socketdir in account for the default sockets. * tools/gpgconf.c (list_dirs): Add "agent-extra-socket" and "agent-browser-socket". Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent')
-rw-r--r--agent/gpg-agent.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index d3f203b13..15202accb 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1047,8 +1047,7 @@ main (int argc, char **argv )
if (! opt.extra_socket)
{
- opt.extra_socket = 1; /* (1 = points into r/o section) */
- socket_name_extra = GPG_AGENT_EXTRA_SOCK_NAME;
+ opt.extra_socket = 1;
}
else if (socket_name_extra
&& (!strcmp (socket_name_extra, "none")
@@ -1061,8 +1060,7 @@ main (int argc, char **argv )
if (! opt.browser_socket)
{
- opt.browser_socket = 1; /* (1 = points into r/o section) */
- socket_name_browser = GPG_AGENT_BROWSER_SOCK_NAME;
+ opt.browser_socket = 1;
}
else if (socket_name_browser
&& (!strcmp (socket_name_browser, "none")
@@ -1253,7 +1251,11 @@ main (int argc, char **argv )
if (opt.extra_socket)
{
- socket_name_extra = create_socket_name (socket_name_extra, 0);
+ if (socket_name_extra)
+ socket_name_extra = create_socket_name (socket_name_extra, 0);
+ else
+ socket_name_extra = create_socket_name
+ /**/ (GPG_AGENT_EXTRA_SOCK_NAME, 1);
opt.extra_socket = 2; /* Indicate that it has been malloced. */
fd_extra = create_server_socket (socket_name_extra, 0, 0,
&redir_socket_name_extra,
@@ -1262,7 +1264,11 @@ main (int argc, char **argv )
if (opt.browser_socket)
{
- socket_name_browser = create_socket_name (socket_name_browser, 0);
+ if (socket_name_browser)
+ socket_name_browser = create_socket_name (socket_name_browser, 0);
+ else
+ socket_name_browser= create_socket_name
+ /**/ (GPG_AGENT_BROWSER_SOCK_NAME, 1);
opt.browser_socket = 2; /* Indicate that it has been malloced. */
fd_browser = create_server_socket (socket_name_browser, 0, 0,
&redir_socket_name_browser,