aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-01-20 16:49:10 +0000
committerWerner Koch <[email protected]>2002-01-20 16:49:10 +0000
commit6aae6603af7b3d93bcf6b74b72d7475ecf3eec20 (patch)
tree2c0dbfa60cfce26c2cb5fb71ad0ac57e41a0b8ce /agent/command.c
parent* gpg-agent.c (main): Disable core dumps. (diff)
downloadgnupg-6aae6603af7b3d93bcf6b74b72d7475ecf3eec20.tar.gz
gnupg-6aae6603af7b3d93bcf6b74b72d7475ecf3eec20.zip
* command.c (cmd_get_passphrase): Remove the plus signs.
* query.c (start_pinentry): Send no-grab option to pinentry * gpg-agent.c (main): Move variable grab as no_grab to agent.h.
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/agent/command.c b/agent/command.c
index dae6c34e6..37276991c 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -266,6 +266,16 @@ cmd_genkey (ASSUAN_CONTEXT ctx, char *line)
}
+static void
+plus_to_blank (char *s)
+{
+ for (; *s; s++)
+ {
+ if (*s == '+')
+ *s = ' ';
+ }
+}
+
/* GET_PASSPHRASE <cache_id> [<error_message> <prompt> <description>]
This function is usually used to ask for a passphrase to be used
@@ -340,6 +350,17 @@ cmd_get_passphrase (ASSUAN_CONTEXT ctx, char *line)
}
else
{
+ /* Note, that we only need to repalce the + characters and
+ should leave the other escaping in place becuase the escaped
+ sting is send verbatim to the pinentry which does the
+ unescaping (but not the + replacing) */
+ if (errtext)
+ plus_to_blank (errtext);
+ if (prompt)
+ plus_to_blank (prompt);
+ if (desc)
+ plus_to_blank (desc);
+
rc = agent_get_passphrase (&response, desc, prompt, errtext);
if (!rc)
{