mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
* gpgsm.c (main): New option --debug-wait n, so that it is
possible to attach gdb when used in server mode.
This commit is contained in:
parent
61ba223221
commit
b47b62b5f5
@ -1,5 +1,8 @@
|
|||||||
2001-12-14 Werner Koch <wk@gnupg.org>
|
2001-12-14 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* gpgsm.c (main): New option --debug-wait n, so that it is
|
||||||
|
possible to attach gdb when used in server mode.
|
||||||
|
|
||||||
* sign.c (get_default_signer): Use keydb_classify_name here.
|
* sign.c (get_default_signer): Use keydb_classify_name here.
|
||||||
|
|
||||||
2001-12-14 Marcus Brinkmann <marcus@g10code.de>
|
2001-12-14 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
@ -187,14 +187,6 @@ start_agent (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
log_debug ("connection to agent established\n");
|
log_debug ("connection to agent established\n");
|
||||||
|
|
||||||
if (DBG_AGENT)
|
|
||||||
{
|
|
||||||
log_debug ("waiting for debugger [hit RETURN when ready] .....\n");
|
|
||||||
getchar ();
|
|
||||||
log_debug ("... okay\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
29
sm/gpgsm.c
29
sm/gpgsm.c
@ -76,9 +76,18 @@ enum cmd_and_opt_values {
|
|||||||
aCheckKeys,
|
aCheckKeys,
|
||||||
aServer,
|
aServer,
|
||||||
|
|
||||||
|
oOptions,
|
||||||
|
oDebug,
|
||||||
|
oDebugAll,
|
||||||
|
oDebugWait,
|
||||||
|
|
||||||
oEnableSpecialFilenames,
|
oEnableSpecialFilenames,
|
||||||
oAgentProgram,
|
oAgentProgram,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
oAssumeArmor,
|
oAssumeArmor,
|
||||||
oAssumeBase64,
|
oAssumeBase64,
|
||||||
oAssumeBinary,
|
oAssumeBinary,
|
||||||
@ -87,6 +96,7 @@ enum cmd_and_opt_values {
|
|||||||
oNoArmor,
|
oNoArmor,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
oTextmode,
|
oTextmode,
|
||||||
oFingerprint,
|
oFingerprint,
|
||||||
oWithFingerprint,
|
oWithFingerprint,
|
||||||
@ -98,9 +108,6 @@ enum cmd_and_opt_values {
|
|||||||
oDefRecipient,
|
oDefRecipient,
|
||||||
oDefRecipientSelf,
|
oDefRecipientSelf,
|
||||||
oNoDefRecipient,
|
oNoDefRecipient,
|
||||||
oOptions,
|
|
||||||
oDebug,
|
|
||||||
oDebugAll,
|
|
||||||
oStatusFD,
|
oStatusFD,
|
||||||
oNoComment,
|
oNoComment,
|
||||||
oNoVersion,
|
oNoVersion,
|
||||||
@ -259,6 +266,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
|
|
||||||
{ oDebug, "debug" ,4|16, "@"},
|
{ oDebug, "debug" ,4|16, "@"},
|
||||||
{ oDebugAll, "debug-all" ,0, "@"},
|
{ oDebugAll, "debug-all" ,0, "@"},
|
||||||
|
{ oDebugWait, "debug-wait" ,1, "@"},
|
||||||
{ oStatusFD, "status-fd" ,1, N_("|FD|write status info to this FD") },
|
{ oStatusFD, "status-fd" ,1, N_("|FD|write status info to this FD") },
|
||||||
{ aDummy, "no-comment", 0, "@"},
|
{ aDummy, "no-comment", 0, "@"},
|
||||||
{ aDummy, "completes-needed", 1, "@"},
|
{ aDummy, "completes-needed", 1, "@"},
|
||||||
@ -537,6 +545,7 @@ main ( int argc, char **argv)
|
|||||||
int default_keyring = 1;
|
int default_keyring = 1;
|
||||||
int greeting = 0;
|
int greeting = 0;
|
||||||
int nogreeting = 0;
|
int nogreeting = 0;
|
||||||
|
int debug_wait = 0;
|
||||||
int use_random_seed = 1;
|
int use_random_seed = 1;
|
||||||
int with_fpr = 0;
|
int with_fpr = 0;
|
||||||
char *def_digest_string = NULL;
|
char *def_digest_string = NULL;
|
||||||
@ -749,6 +758,7 @@ main ( int argc, char **argv)
|
|||||||
|
|
||||||
case oDebug: opt.debug |= pargs.r.ret_ulong; break;
|
case oDebug: opt.debug |= pargs.r.ret_ulong; break;
|
||||||
case oDebugAll: opt.debug = ~0; break;
|
case oDebugAll: opt.debug = ~0; break;
|
||||||
|
case oDebugWait: debug_wait = pargs.r.ret_int; break;
|
||||||
|
|
||||||
case oStatusFD: ctrl.status_fd = pargs.r.ret_int; break;
|
case oStatusFD: ctrl.status_fd = pargs.r.ret_int; break;
|
||||||
case oLoggerFD: /* fixme: log_set_logfile (NULL, pargs.r.ret_int );*/ break;
|
case oLoggerFD: /* fixme: log_set_logfile (NULL, pargs.r.ret_int );*/ break;
|
||||||
@ -950,12 +960,13 @@ main ( int argc, char **argv)
|
|||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case aServer:
|
case aServer:
|
||||||
#if 0
|
if (debug_wait)
|
||||||
log_debug ("waiting for debugger my pid is %u .....\n",
|
{
|
||||||
(unsigned int)getpid());
|
log_debug ("waiting for debugger - my pid is %u .....\n",
|
||||||
sleep (5);
|
(unsigned int)getpid());
|
||||||
log_debug ("... okay\n");
|
sleep (debug_wait);
|
||||||
#endif
|
log_debug ("... okay\n");
|
||||||
|
}
|
||||||
gpgsm_server ();
|
gpgsm_server ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user