mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* gpgsm.c (main): New option --log-file.
This commit is contained in:
parent
312ee41ff7
commit
4e13426c92
@ -1,3 +1,7 @@
|
|||||||
|
2002-06-12 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* gpg-agent.c (main): New option --disable-pth.
|
||||||
|
|
||||||
2002-06-11 Werner Koch <wk@gnupg.org>
|
2002-06-11 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* protect-tool.c: Add command --show-keygrip
|
* protect-tool.c: Add command --show-keygrip
|
||||||
|
@ -79,6 +79,7 @@ enum cmd_and_opt_values
|
|||||||
oLCmessages,
|
oLCmessages,
|
||||||
oScdaemonProgram,
|
oScdaemonProgram,
|
||||||
oDefCacheTTL,
|
oDefCacheTTL,
|
||||||
|
oDisablePth,
|
||||||
|
|
||||||
aTest };
|
aTest };
|
||||||
|
|
||||||
@ -100,6 +101,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
{ oNoDetach, "no-detach" ,0, N_("do not detach from the console")},
|
{ oNoDetach, "no-detach" ,0, N_("do not detach from the console")},
|
||||||
{ oNoGrab, "no-grab" ,0, N_("do not grab keyboard and mouse")},
|
{ oNoGrab, "no-grab" ,0, N_("do not grab keyboard and mouse")},
|
||||||
{ oLogFile, "log-file" ,2, N_("use a log file for the server")},
|
{ oLogFile, "log-file" ,2, N_("use a log file for the server")},
|
||||||
|
{ oDisablePth, "disable-pth", 0, N_("do not allow multiple connections")},
|
||||||
|
|
||||||
{ oPinentryProgram, "pinentry-program", 2 , "path to PIN Entry program" },
|
{ oPinentryProgram, "pinentry-program", 2 , "path to PIN Entry program" },
|
||||||
{ oDisplay, "display", 2, "set the display" },
|
{ oDisplay, "display", 2, "set the display" },
|
||||||
@ -263,6 +265,7 @@ main (int argc, char **argv )
|
|||||||
int csh_style = 0;
|
int csh_style = 0;
|
||||||
char *logfile = NULL;
|
char *logfile = NULL;
|
||||||
int debug_wait = 0;
|
int debug_wait = 0;
|
||||||
|
int disable_pth = 0;
|
||||||
|
|
||||||
set_strusage (my_strusage);
|
set_strusage (my_strusage);
|
||||||
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
||||||
@ -282,8 +285,9 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
assuan_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free);
|
assuan_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free);
|
||||||
#ifdef USE_GNU_PTH
|
#ifdef USE_GNU_PTH
|
||||||
assuan_set_io_func (pth_read, pth_write);
|
assuan_set_io_func (pth_read, pth_write);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gcry_set_log_handler (my_gcry_logger, NULL);
|
gcry_set_log_handler (my_gcry_logger, NULL);
|
||||||
gcry_control (GCRYCTL_USE_SECURE_RNDPOOL);
|
gcry_control (GCRYCTL_USE_SECURE_RNDPOOL);
|
||||||
|
|
||||||
@ -402,6 +406,7 @@ main (int argc, char **argv )
|
|||||||
case oCsh: csh_style = 1; break;
|
case oCsh: csh_style = 1; break;
|
||||||
case oSh: csh_style = 0; break;
|
case oSh: csh_style = 0; break;
|
||||||
case oServer: pipe_server = 1; break;
|
case oServer: pipe_server = 1; break;
|
||||||
|
case oDisablePth: disable_pth = 1; break;
|
||||||
|
|
||||||
case oPinentryProgram: opt.pinentry_program = pargs.r.ret_str; break;
|
case oPinentryProgram: opt.pinentry_program = pargs.r.ret_str; break;
|
||||||
case oDisplay: opt.display = xstrdup (pargs.r.ret_str); break;
|
case oDisplay: opt.display = xstrdup (pargs.r.ret_str); break;
|
||||||
@ -620,34 +625,38 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
|
|
||||||
#ifdef USE_GNU_PTH
|
#ifdef USE_GNU_PTH
|
||||||
if (!pth_init ())
|
if (!disable_pth)
|
||||||
{
|
{
|
||||||
log_error ("failed to initialize the Pth library\n");
|
if (!pth_init ())
|
||||||
exit (1);
|
{
|
||||||
|
log_error ("failed to initialize the Pth library\n");
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
signal (SIGPIPE, SIG_IGN);
|
||||||
|
handle_connections (fd);
|
||||||
}
|
}
|
||||||
signal (SIGPIPE, SIG_IGN);
|
else
|
||||||
handle_connections (fd);
|
|
||||||
#else /*!USE_GNU_PTH*/
|
|
||||||
/* setup signals */
|
|
||||||
{
|
|
||||||
struct sigaction oact, nact;
|
|
||||||
|
|
||||||
nact.sa_handler = cleanup_sh;
|
|
||||||
sigemptyset (&nact.sa_mask);
|
|
||||||
nact.sa_flags = 0;
|
|
||||||
|
|
||||||
sigaction (SIGHUP, NULL, &oact);
|
|
||||||
if (oact.sa_handler != SIG_IGN)
|
|
||||||
sigaction (SIGHUP, &nact, NULL);
|
|
||||||
sigaction( SIGTERM, NULL, &oact );
|
|
||||||
if (oact.sa_handler != SIG_IGN)
|
|
||||||
sigaction (SIGTERM, &nact, NULL);
|
|
||||||
nact.sa_handler = SIG_IGN;
|
|
||||||
sigaction (SIGPIPE, &nact, NULL);
|
|
||||||
sigaction (SIGINT, &nact, NULL);
|
|
||||||
}
|
|
||||||
start_command_handler (fd, -1);
|
|
||||||
#endif /*!USE_GNU_PTH*/
|
#endif /*!USE_GNU_PTH*/
|
||||||
|
/* setup signals */
|
||||||
|
{
|
||||||
|
struct sigaction oact, nact;
|
||||||
|
|
||||||
|
nact.sa_handler = cleanup_sh;
|
||||||
|
sigemptyset (&nact.sa_mask);
|
||||||
|
nact.sa_flags = 0;
|
||||||
|
|
||||||
|
sigaction (SIGHUP, NULL, &oact);
|
||||||
|
if (oact.sa_handler != SIG_IGN)
|
||||||
|
sigaction (SIGHUP, &nact, NULL);
|
||||||
|
sigaction( SIGTERM, NULL, &oact );
|
||||||
|
if (oact.sa_handler != SIG_IGN)
|
||||||
|
sigaction (SIGTERM, &nact, NULL);
|
||||||
|
nact.sa_handler = SIG_IGN;
|
||||||
|
sigaction (SIGPIPE, &nact, NULL);
|
||||||
|
sigaction (SIGINT, &nact, NULL);
|
||||||
|
|
||||||
|
start_command_handler (fd, -1);
|
||||||
|
}
|
||||||
close (fd);
|
close (fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2002-06-13 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* gpgsm.c (main): New option --log-file.
|
||||||
|
|
||||||
2002-06-12 Werner Koch <wk@gnupg.org>
|
2002-06-12 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* call-dirmngr.c (lookup_status_cb): New.
|
* call-dirmngr.c (lookup_status_cb): New.
|
||||||
|
11
sm/gpgsm.c
11
sm/gpgsm.c
@ -81,6 +81,7 @@ enum cmd_and_opt_values {
|
|||||||
oDebug,
|
oDebug,
|
||||||
oDebugAll,
|
oDebugAll,
|
||||||
oDebugWait,
|
oDebugWait,
|
||||||
|
oLogFile,
|
||||||
|
|
||||||
oEnableSpecialFilenames,
|
oEnableSpecialFilenames,
|
||||||
|
|
||||||
@ -225,6 +226,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
{ aExport, "export", 256 , N_("export certificates")},
|
{ aExport, "export", 256 , N_("export certificates")},
|
||||||
{ aLearnCard, "learn-card", 256 ,N_("register a smartcard")},
|
{ aLearnCard, "learn-card", 256 ,N_("register a smartcard")},
|
||||||
{ aServer, "server", 256, N_("run in server mode")},
|
{ aServer, "server", 256, N_("run in server mode")},
|
||||||
|
{ oLogFile, "log-file" ,2, N_("use a log file for the server")},
|
||||||
|
|
||||||
|
|
||||||
{ 301, NULL, 0, N_("@\nOptions:\n ") },
|
{ 301, NULL, 0, N_("@\nOptions:\n ") },
|
||||||
@ -583,6 +585,7 @@ main ( int argc, char **argv)
|
|||||||
int parse_debug = 0;
|
int parse_debug = 0;
|
||||||
int default_config =1;
|
int default_config =1;
|
||||||
int default_keyring = 1;
|
int default_keyring = 1;
|
||||||
|
char *logfile = NULL;
|
||||||
int greeting = 0;
|
int greeting = 0;
|
||||||
int nogreeting = 0;
|
int nogreeting = 0;
|
||||||
int debug_wait = 0;
|
int debug_wait = 0;
|
||||||
@ -822,6 +825,8 @@ main ( int argc, char **argv)
|
|||||||
gcry_control (GCRYCTL_SET_VERBOSITY, (int)opt.verbose);
|
gcry_control (GCRYCTL_SET_VERBOSITY, (int)opt.verbose);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case oLogFile: logfile = pargs.r.ret_str; break;
|
||||||
|
|
||||||
case oBatch:
|
case oBatch:
|
||||||
opt.batch = 1;
|
opt.batch = 1;
|
||||||
greeting = 0;
|
greeting = 0;
|
||||||
@ -983,6 +988,12 @@ main ( int argc, char **argv)
|
|||||||
if (may_coredump && !opt.quiet)
|
if (may_coredump && !opt.quiet)
|
||||||
log_info (_("WARNING: program may create a core file!\n"));
|
log_info (_("WARNING: program may create a core file!\n"));
|
||||||
|
|
||||||
|
if (logfile)
|
||||||
|
{
|
||||||
|
log_set_file (logfile);
|
||||||
|
log_set_prefix (NULL, 1|2|4);
|
||||||
|
}
|
||||||
|
|
||||||
if (gnupg_faked_time_p ())
|
if (gnupg_faked_time_p ())
|
||||||
{
|
{
|
||||||
log_info (_("WARNING: running with faked system time: "));
|
log_info (_("WARNING: running with faked system time: "));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user