mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-24 16:43:28 +02:00
(parse_rereadable_options): Return "not handled"
when the log file has not beend hadled. This is will let the main option processing continue. Fixed a bug introduced on 2004-09-4 resulting in logging to stderr until a HUP has been given. (main): Don't close the listen FD.
This commit is contained in:
parent
c5487b7982
commit
280a222553
@ -1,3 +1,11 @@
|
|||||||
|
2004-10-22 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* gpg-agent.c (parse_rereadable_options): Return "not handled"
|
||||||
|
when the log file has not beend hadled. This is will let the main
|
||||||
|
option processing continue. Fixed a bug introduced on 2004-09-4
|
||||||
|
resulting in logging to stderr until a HUP has been given.
|
||||||
|
(main): Don't close the listen FD.
|
||||||
|
|
||||||
2004-09-30 Werner Koch <wk@g10code.com>
|
2004-09-30 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* Makefile.am: Adjusted from gettext 1.14.
|
* Makefile.am: Adjusted from gettext 1.14.
|
||||||
|
@ -166,7 +166,7 @@ static char *config_filename;
|
|||||||
static const char *debug_level;
|
static const char *debug_level;
|
||||||
|
|
||||||
/* Keep track of the current log file so that we can avoid updating
|
/* Keep track of the current log file so that we can avoid updating
|
||||||
the log file afte a SIGHUP if id didn't changed. Malloced. */
|
the log file after a SIGHUP if it didn't changed. Malloced. */
|
||||||
static char *current_logfile;
|
static char *current_logfile;
|
||||||
|
|
||||||
/* Local prototypes. */
|
/* Local prototypes. */
|
||||||
@ -362,9 +362,10 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
|
|||||||
case oDebugLevel: debug_level = pargs->r.ret_str; break;
|
case oDebugLevel: debug_level = pargs->r.ret_str; break;
|
||||||
|
|
||||||
case oLogFile:
|
case oLogFile:
|
||||||
if (reread
|
if (!reread)
|
||||||
&& (!current_logfile || !pargs->r.ret_str
|
return 0; /* not handeld */
|
||||||
|| strcmp (current_logfile, pargs->r.ret_str)))
|
if (!current_logfile || !pargs->r.ret_str
|
||||||
|
|| strcmp (current_logfile, pargs->r.ret_str))
|
||||||
{
|
{
|
||||||
log_set_file (pargs->r.ret_str);
|
log_set_file (pargs->r.ret_str);
|
||||||
xfree (current_logfile);
|
xfree (current_logfile);
|
||||||
@ -416,6 +417,7 @@ main (int argc, char **argv )
|
|||||||
int gpgconf_list = 0;
|
int gpgconf_list = 0;
|
||||||
gpg_error_t err;
|
gpg_error_t err;
|
||||||
|
|
||||||
|
|
||||||
set_strusage (my_strusage);
|
set_strusage (my_strusage);
|
||||||
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
||||||
/* Please note that we may running SUID(ROOT), so be very CAREFUL
|
/* Please note that we may running SUID(ROOT), so be very CAREFUL
|
||||||
@ -861,7 +863,7 @@ main (int argc, char **argv )
|
|||||||
/* Close stdin, stdout and stderr unless it is the log stream */
|
/* Close stdin, stdout and stderr unless it is the log stream */
|
||||||
for (i=0; i <= 2; i++)
|
for (i=0; i <= 2; i++)
|
||||||
{
|
{
|
||||||
if (!log_test_fd (i) )
|
if (!log_test_fd (i) && i != fd )
|
||||||
close (i);
|
close (i);
|
||||||
}
|
}
|
||||||
if (setsid() == -1)
|
if (setsid() == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user