mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-24 16:43:28 +02:00
* 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.
This commit is contained in:
parent
eac306fc90
commit
6aae6603af
@ -1,3 +1,10 @@
|
|||||||
|
2002-01-20 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2002-01-19 Werner Koch <wk@gnupg.org>
|
2002-01-19 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* gpg-agent.c (main): Disable core dumps.
|
* gpg-agent.c (main): Disable core dumps.
|
||||||
|
@ -36,6 +36,7 @@ struct {
|
|||||||
int batch; /* batch mode */
|
int batch; /* batch mode */
|
||||||
const char *homedir; /* configuration directory name */
|
const char *homedir; /* configuration directory name */
|
||||||
const char *pinentry_program;
|
const char *pinentry_program;
|
||||||
|
int no_grab; /* don't let the pinentry grab the keyboard */
|
||||||
|
|
||||||
} opt;
|
} opt;
|
||||||
|
|
||||||
|
@ -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>]
|
/* GET_PASSPHRASE <cache_id> [<error_message> <prompt> <description>]
|
||||||
|
|
||||||
This function is usually used to ask for a passphrase to be used
|
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
|
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);
|
rc = agent_get_passphrase (&response, desc, prompt, errtext);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
{
|
{
|
||||||
|
@ -229,7 +229,6 @@ main (int argc, char **argv )
|
|||||||
int nogreeting = 0;
|
int nogreeting = 0;
|
||||||
int pipe_server = 0;
|
int pipe_server = 0;
|
||||||
int nodetach = 0;
|
int nodetach = 0;
|
||||||
int grab = 0;
|
|
||||||
int csh_style = 0;
|
int csh_style = 0;
|
||||||
char *logfile = NULL;
|
char *logfile = NULL;
|
||||||
int debug_wait = 0;
|
int debug_wait = 0;
|
||||||
@ -269,7 +268,6 @@ main (int argc, char **argv )
|
|||||||
opt.homedir = "~/.gnupg-test";
|
opt.homedir = "~/.gnupg-test";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
grab = 1;
|
|
||||||
|
|
||||||
/* check whether we have a config file on the commandline */
|
/* check whether we have a config file on the commandline */
|
||||||
orig_argc = argc;
|
orig_argc = argc;
|
||||||
@ -363,7 +361,7 @@ main (int argc, char **argv )
|
|||||||
case oNoOptions: break; /* no-options */
|
case oNoOptions: break; /* no-options */
|
||||||
case oHomedir: opt.homedir = pargs.r.ret_str; break;
|
case oHomedir: opt.homedir = pargs.r.ret_str; break;
|
||||||
case oNoDetach: nodetach = 1; break;
|
case oNoDetach: nodetach = 1; break;
|
||||||
case oNoGrab: grab = 0; break;
|
case oNoGrab: opt.no_grab = 1; break;
|
||||||
case oLogFile: logfile = pargs.r.ret_str; break;
|
case oLogFile: logfile = pargs.r.ret_str; break;
|
||||||
case oCsh: csh_style = 1; break;
|
case oCsh: csh_style = 1; break;
|
||||||
case oSh: csh_style = 0; break;
|
case oSh: csh_style = 0; break;
|
||||||
|
@ -95,12 +95,11 @@ start_pinentry (void)
|
|||||||
|
|
||||||
log_debug ("connection to PIN entry established\n");
|
log_debug ("connection to PIN entry established\n");
|
||||||
|
|
||||||
if (DBG_COMMAND)
|
rc = assuan_transact (entry_ctx,
|
||||||
{
|
opt.no_grab? "OPTION no-grab":"OPTION grab",
|
||||||
log_debug ("waiting for debugger [hit RETURN when ready] .....\n");
|
NULL, NULL, NULL, NULL);
|
||||||
getchar ();
|
if (rc)
|
||||||
log_debug ("... okay\n");
|
return map_assuan_err (rc);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user