From 9c380384dafb213334f8834178c5ceb0bf33db6e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 3 Oct 2014 11:58:58 +0200 Subject: Remove support for the GPG_AGENT_INFO envvar. * agent/agent.h (opt): Remove field use_standard_socket. * agent/command.c (cmd_killagent): Always allow killing. * agent/gpg-agent.c (main): Turn --{no,}use-standard-socket and --write-env-file into dummy options. Always return true for --use-standard-socket-p. Do not print the GPG_AGENT_INFO envvar setting or set that envvar. (create_socket_name): Simplify by removing non standard socket support. (check_for_running_agent): Ditto. * common/asshelp.c (start_new_gpg_agent): Remove GPG_AGENT_INFO use. * common/simple-pwquery.c (agent_open): Ditto. * configure.ac (GPG_AGENT_INFO_NAME): Remove. * g10/server.c (gpg_server): Do not print the AgentInfo comment. * g13/server.c (g13_server): Ditto. * sm/server.c (gpgsm_server): Ditto. * tools/gpgconf.c (main): Simplify by removing non standard socket support. -- The indented fix to allow using a different socket than the one in the gnupg home directory is to change Libassuan to check whether the socket files exists as a regualr file with a special keyword to redirect to another socket file name. --- tools/gpgconf.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'tools') diff --git a/tools/gpgconf.c b/tools/gpgconf.c index cb37a2593..f63c05ed1 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -366,28 +366,10 @@ main (int argc, char **argv) } { - char *infostr = getenv (GPG_AGENT_INFO_NAME); - - if (!infostr || !*infostr) - infostr = make_filename (default_homedir (), + char *tmp = make_filename (default_homedir (), GPG_AGENT_SOCK_NAME, NULL); - else - { - char *tmp; - - infostr = xstrdup (infostr); - tmp = strchr (infostr, PATHSEP_C); - if (!tmp || tmp == infostr) - { - xfree (infostr); - infostr = NULL; - } - else - *tmp = 0; - } - es_fprintf (outfp, "agent-socket:%s\n", - infostr? gc_percent_escape (infostr) : ""); - xfree (infostr); + es_fprintf (outfp, "agent-socket:%s\n", gc_percent_escape (tmp)); + xfree (tmp); } { /* We need to use make_filename to expand a possible "~/". */ -- cgit v1.2.3