[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src rda.c
ph10 2005/08/02 14:43:04 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         rda.c 
  Log:
  Add missing search_tidyup() calls for the subprocess used for running
  filters.


  Revision  Changes    Path
  1.195     +5 -0      exim/exim-doc/doc-txt/ChangeLog
  1.9       +8 -2      exim/exim-src/src/rda.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.194
  retrieving revision 1.195
  diff -u -r1.194 -r1.195
  --- ChangeLog    2 Aug 2005 11:23:27 -0000    1.194
  +++ ChangeLog    2 Aug 2005 13:43:04 -0000    1.195
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.194 2005/08/02 11:23:27 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.195 2005/08/02 13:43:04 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -44,6 +44,11 @@
         transport and to the smtp transport in LMTP mode.


   TK/02 Remove one case of BASE64 error detection FTTB (undocumented anyway).
  +
  +PH/12 There was a missing call to search_tidyup() before the fork() in rda.c to
  +      run a filter in a subprocess. This could lead to confusion in subsequent
  +      lookups in the parent process. There should also be a search_tidyup() at
  +      the end of the subprocess.



Exim version 4.52

  Index: rda.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/rda.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- rda.c    27 Jun 2005 14:29:43 -0000    1.8
  +++ rda.c    2 Aug 2005 13:43:04 -0000    1.9
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/rda.c,v 1.8 2005/06/27 14:29:43 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/rda.c,v 1.9 2005/08/02 13:43:04 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -607,9 +607,13 @@


/* Ensure that SIGCHLD is set to SIG_DFL before forking, so that the child
process can be waited for. We sometimes get here with it set otherwise. Save
-the old state for resetting on the wait. */
+the old state for resetting on the wait. Ensure that all cached resources are
+freed so that the subprocess starts with a clean slate and doesn't interfere
+with the parent process. */

   oldsignal = signal(SIGCHLD, SIG_DFL);
  +search_tidyup();
  +
   if ((pid = fork()) == 0)
     {
     header_line *waslast = header_last;   /* Save last header */
  @@ -740,9 +744,11 @@
       rda_write_string(fd, NULL);   /* Marks end of addresses */
       }


- /* OK, this process is now done. Must use _exit() and not exit() !! */
+ /* OK, this process is now done. Free any cached resources. Must use _exit()
+ and not exit() !! */

     (void)close(fd);
  +  search_tidyup();
     _exit(0);
     }