mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01: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>
|
||||
|
||||
* protect-tool.c: Add command --show-keygrip
|
||||
|
@ -79,6 +79,7 @@ enum cmd_and_opt_values
|
||||
oLCmessages,
|
||||
oScdaemonProgram,
|
||||
oDefCacheTTL,
|
||||
oDisablePth,
|
||||
|
||||
aTest };
|
||||
|
||||
@ -100,6 +101,7 @@ static ARGPARSE_OPTS opts[] = {
|
||||
{ oNoDetach, "no-detach" ,0, N_("do not detach from the console")},
|
||||
{ oNoGrab, "no-grab" ,0, N_("do not grab keyboard and mouse")},
|
||||
{ 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" },
|
||||
{ oDisplay, "display", 2, "set the display" },
|
||||
@ -263,6 +265,7 @@ main (int argc, char **argv )
|
||||
int csh_style = 0;
|
||||
char *logfile = NULL;
|
||||
int debug_wait = 0;
|
||||
int disable_pth = 0;
|
||||
|
||||
set_strusage (my_strusage);
|
||||
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
||||
@ -284,6 +287,7 @@ main (int argc, char **argv )
|
||||
#ifdef USE_GNU_PTH
|
||||
assuan_set_io_func (pth_read, pth_write);
|
||||
#endif
|
||||
|
||||
gcry_set_log_handler (my_gcry_logger, NULL);
|
||||
gcry_control (GCRYCTL_USE_SECURE_RNDPOOL);
|
||||
|
||||
@ -402,6 +406,7 @@ main (int argc, char **argv )
|
||||
case oCsh: csh_style = 1; break;
|
||||
case oSh: csh_style = 0; break;
|
||||
case oServer: pipe_server = 1; break;
|
||||
case oDisablePth: disable_pth = 1; break;
|
||||
|
||||
case oPinentryProgram: opt.pinentry_program = pargs.r.ret_str; break;
|
||||
case oDisplay: opt.display = xstrdup (pargs.r.ret_str); break;
|
||||
@ -620,6 +625,8 @@ main (int argc, char **argv )
|
||||
|
||||
|
||||
#ifdef USE_GNU_PTH
|
||||
if (!disable_pth)
|
||||
{
|
||||
if (!pth_init ())
|
||||
{
|
||||
log_error ("failed to initialize the Pth library\n");
|
||||
@ -627,7 +634,9 @@ main (int argc, char **argv )
|
||||
}
|
||||
signal (SIGPIPE, SIG_IGN);
|
||||
handle_connections (fd);
|
||||
#else /*!USE_GNU_PTH*/
|
||||
}
|
||||
else
|
||||
#endif /*!USE_GNU_PTH*/
|
||||
/* setup signals */
|
||||
{
|
||||
struct sigaction oact, nact;
|
||||
@ -645,9 +654,9 @@ main (int argc, char **argv )
|
||||
nact.sa_handler = SIG_IGN;
|
||||
sigaction (SIGPIPE, &nact, NULL);
|
||||
sigaction (SIGINT, &nact, NULL);
|
||||
}
|
||||
|
||||
start_command_handler (fd, -1);
|
||||
#endif /*!USE_GNU_PTH*/
|
||||
}
|
||||
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>
|
||||
|
||||
* 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,
|
||||
oDebugAll,
|
||||
oDebugWait,
|
||||
oLogFile,
|
||||
|
||||
oEnableSpecialFilenames,
|
||||
|
||||
@ -225,6 +226,7 @@ static ARGPARSE_OPTS opts[] = {
|
||||
{ aExport, "export", 256 , N_("export certificates")},
|
||||
{ aLearnCard, "learn-card", 256 ,N_("register a smartcard")},
|
||||
{ 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 ") },
|
||||
@ -583,6 +585,7 @@ main ( int argc, char **argv)
|
||||
int parse_debug = 0;
|
||||
int default_config =1;
|
||||
int default_keyring = 1;
|
||||
char *logfile = NULL;
|
||||
int greeting = 0;
|
||||
int nogreeting = 0;
|
||||
int debug_wait = 0;
|
||||
@ -822,6 +825,8 @@ main ( int argc, char **argv)
|
||||
gcry_control (GCRYCTL_SET_VERBOSITY, (int)opt.verbose);
|
||||
break;
|
||||
|
||||
case oLogFile: logfile = pargs.r.ret_str; break;
|
||||
|
||||
case oBatch:
|
||||
opt.batch = 1;
|
||||
greeting = 0;
|
||||
@ -983,6 +988,12 @@ main ( int argc, char **argv)
|
||||
if (may_coredump && !opt.quiet)
|
||||
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 ())
|
||||
{
|
||||
log_info (_("WARNING: running with faked system time: "));
|
||||
|
Loading…
x
Reference in New Issue
Block a user