GNUPG-1-9-BRANCH gnupg/agent (ChangeLog gpg-agent.c)

cvs user wk cvs at cvs.gnupg.org
Fri Oct 22 11:36:23 CEST 2004


    Date: Friday, October 22, 2004 @ 11:39:47
  Author: wk
    Path: /cvs/gnupg/gnupg/agent
     Tag: GNUPG-1-9-BRANCH

Modified: ChangeLog 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.


-------------+
 ChangeLog   |    8 ++++++++
 gpg-agent.c |   12 +++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)


Index: gnupg/agent/ChangeLog
diff -u gnupg/agent/ChangeLog:1.59.2.42 gnupg/agent/ChangeLog:1.59.2.43
--- gnupg/agent/ChangeLog:1.59.2.42	Thu Sep 30 16:34:33 2004
+++ gnupg/agent/ChangeLog	Fri Oct 22 11:39:47 2004
@@ -1,3 +1,11 @@
+2004-10-22  Werner Koch  <wk at 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 at g10code.com>
 
 	* Makefile.am: Adjusted from gettext 1.14.
Index: gnupg/agent/gpg-agent.c
diff -u gnupg/agent/gpg-agent.c:1.31.2.18 gnupg/agent/gpg-agent.c:1.31.2.19
--- gnupg/agent/gpg-agent.c:1.31.2.18	Thu Sep  9 09:27:56 2004
+++ gnupg/agent/gpg-agent.c	Fri Oct 22 11:39:47 2004
@@ -166,7 +166,7 @@
 static const char *debug_level;
 
 /* 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;
 
 /* Local prototypes. */
@@ -362,9 +362,10 @@
     case oDebugLevel: debug_level = pargs->r.ret_str; break;
 
     case oLogFile:
-      if (reread 
-          && (!current_logfile || !pargs->r.ret_str
-              || strcmp (current_logfile, pargs->r.ret_str)))
+      if (!reread)
+        return 0; /* not handeld */
+      if (!current_logfile || !pargs->r.ret_str
+          || strcmp (current_logfile, pargs->r.ret_str))
         {
           log_set_file (pargs->r.ret_str);
           xfree (current_logfile);
@@ -416,6 +417,7 @@
   int gpgconf_list = 0;
   gpg_error_t err;
 
+
   set_strusage (my_strusage);
   gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
   /* Please note that we may running SUID(ROOT), so be very CAREFUL
@@ -861,7 +863,7 @@
           /* Close stdin, stdout and stderr unless it is the log stream */
           for (i=0; i <= 2; i++) 
             {
-              if (!log_test_fd (i) )
+              if (!log_test_fd (i) && i != fd )
                 close (i);
             }
           if (setsid() == -1)




More information about the Gnupg-commits mailing list