aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-09-15 12:47:00 +0000
committerJustus Winter <[email protected]>2016-09-30 10:06:02 +0000
commite11686f973b35869d7b299ce4726003ac22e2e3a (patch)
treec47ff021acf9e1ac03ff890c9540530343db5b36 /agent/gpg-agent.c
parentw32: Fix STARTTLS on LDAP connections. (diff)
downloadgnupg-e11686f973b35869d7b299ce4726003ac22e2e3a.tar.gz
gnupg-e11686f973b35869d7b299ce4726003ac22e2e3a.zip
agent: Enable restricted, browser, and ssh socket by default.
* agent/gpg-agent.c (main): Provide defaults for 'extra-socket' and 'browser-socket', enable ssh socket by default, but do not emit the 'SSH_AUTH_SOCK' variable unless it has been explicitly requested. * configure.ac (GPG_AGENT_{EXTRA,BROWSER}_SOCK_NAME): New definitions. * doc/gpg-agent.texi: Update documentation. -- This change enables the restricted, browser, and ssh socket by default. Note that in all cases, the user has to do some additional configuration to her setup to make use of these features. Therefore, this should not break any existing setups, but makes it simpler to discover and use these features. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r--agent/gpg-agent.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index d3c3891f3..4dda44cae 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1045,6 +1045,18 @@ main (int argc, char **argv )
agent_exit (0);
}
+ if (! opt.extra_socket)
+ {
+ opt.extra_socket = 1; /* (1 = points into r/o section) */
+ socket_name_extra = GPG_AGENT_EXTRA_SOCK_NAME;
+ }
+
+ if (! opt.browser_socket)
+ {
+ opt.browser_socket = 1; /* (1 = points into r/o section) */
+ socket_name_browser = GPG_AGENT_BROWSER_SOCK_NAME;
+ }
+
set_debug ();
if (atexit (cleanup))
@@ -1241,13 +1253,10 @@ main (int argc, char **argv )
&socket_nonce_browser);
}
- if (ssh_support)
- {
- socket_name_ssh = create_socket_name (GPG_AGENT_SSH_SOCK_NAME, 1);
- fd_ssh = create_server_socket (socket_name_ssh, 0, 1,
- &redir_socket_name_ssh,
- &socket_nonce_ssh);
- }
+ socket_name_ssh = create_socket_name (GPG_AGENT_SSH_SOCK_NAME, 1);
+ fd_ssh = create_server_socket (socket_name_ssh, 0, 1,
+ &redir_socket_name_ssh,
+ &socket_nonce_ssh);
/* If we are going to exec a program in the parent, we record
the PID, so that the child may check whether the program is
@@ -1313,8 +1322,7 @@ main (int argc, char **argv )
*socket_name_extra = 0;
if (opt.browser_socket)
*socket_name_browser = 0;
- if (ssh_support)
- *socket_name_ssh = 0;
+ *socket_name_ssh = 0;
if (argc)
{ /* Run the program given on the commandline. */