aboutsummaryrefslogtreecommitdiffstats
path: root/common/simple-pwquery.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-10-03 09:58:58 +0000
committerWerner Koch <[email protected]>2014-10-03 09:58:58 +0000
commit9c380384dafb213334f8834178c5ceb0bf33db6e (patch)
tree3522eab22d31542094d95c605394542a857e1c55 /common/simple-pwquery.c
parentgpg: Fix regression removing SHA256. (diff)
downloadgnupg-9c380384dafb213334f8834178c5ceb0bf33db6e.tar.gz
gnupg-9c380384dafb213334f8834178c5ceb0bf33db6e.zip
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.
Diffstat (limited to 'common/simple-pwquery.c')
-rw-r--r--common/simple-pwquery.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
index 7dcc05747..0eff5c5c9 100644
--- a/common/simple-pwquery.c
+++ b/common/simple-pwquery.c
@@ -69,13 +69,12 @@
#endif
-/* Name of the socket to be used if GPG_AGENT_INFO has not been
- set. No default socket is used if this is NULL. */
+/* Name of the socket to be used. This is a kludge to keep on using
+ the existsing code despite that we only support a standard socket. */
static char *default_gpg_agent_info;
-
#ifndef HAVE_STPCPY
@@ -324,14 +323,11 @@ agent_open (int *rfd)
char *infostr, *p;
struct sockaddr_un client_addr;
size_t len;
- int prot;
char line[200];
int nread;
*rfd = -1;
- infostr = getenv (GPG_AGENT_INFO_NAME);
- if ( !infostr || !*infostr )
- infostr = default_gpg_agent_info;
+ infostr = default_gpg_agent_info;
if ( !infostr || !*infostr )
{
#ifdef SPWQ_USE_LOGGING
@@ -348,23 +344,12 @@ agent_open (int *rfd)
if ( !(p = strchr ( infostr, PATHSEP_C)) || p == infostr
|| (p-infostr)+1 >= sizeof client_addr.sun_path )
{
-#ifdef SPWQ_USE_LOGGING
- log_error (_("malformed %s environment variable\n"), GPG_AGENT_INFO_NAME);
-#endif
return SPWQ_NO_AGENT;
}
*p++ = 0;
while (*p && *p != PATHSEP_C)
p++;
- prot = *p? atoi (p+1) : 0;
- if ( prot != 1)
- {
-#ifdef SPWQ_USE_LOGGING
- log_error (_("gpg-agent protocol version %d is not supported\n"),prot);
-#endif
- return SPWQ_PROTOCOL_ERROR;
- }
#ifdef HAVE_W32_SYSTEM
fd = _w32_sock_new (AF_UNIX, SOCK_STREAM, 0);