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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src ACKNOWLEDGMENTS exim/exim-src/src exim.c
ph10 2004/10/19 12:40:53 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src             ACKNOWLEDGMENTS 
    exim-src/src         exim.c 
  Log:
  Add missing search cache tidyup before delivering message received via
  the command line (could cause crashes if certain lookups were done
  during message reception).


  Revision  Changes    Path
  1.12      +5 -0      exim/exim-doc/doc-txt/ChangeLog
  1.2       +2 -1      exim/exim-src/ACKNOWLEDGMENTS
  1.6       +19 -14    exim/exim-src/src/exim.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ChangeLog    19 Oct 2004 11:29:25 -0000    1.11
  +++ ChangeLog    19 Oct 2004 11:40:52 -0000    1.12
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.11 2004/10/19 11:29:25 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.12 2004/10/19 11:40:52 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -41,6 +41,11 @@
    9. Added the /retain_sender option to "control=submission".


   10. $recipients is now available in the predata ACL (oversight).
  +
  +11. Tidy the search cache before the fork to do a delivery from a message
  +    received from the command line. Otherwise the child will trigger a lookup
  +    failure and thereby defer the delivery if it tries to use (for example) a
  +    cached ldap connection that the parent has called unbind on.



Exim version 4.43

  Index: ACKNOWLEDGMENTS
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/ACKNOWLEDGMENTS,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ACKNOWLEDGMENTS    6 Oct 2004 11:36:51 -0000    1.1
  +++ ACKNOWLEDGMENTS    19 Oct 2004 11:40:52 -0000    1.2
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-src/ACKNOWLEDGMENTS,v 1.1 2004/10/06 11:36:51 ph10 Exp $
  +$Cambridge: exim/exim-src/ACKNOWLEDGMENTS,v 1.2 2004/10/19 11:40:52 ph10 Exp $


EXIM ACKNOWLEDGEMENTS

@@ -20,7 +20,7 @@
Philip Hazel

Lists created: 20 November 2002
-Last updated: 04 October 2004
+Last updated: 19 October 2004


   THE OLD LIST
  @@ -189,6 +189,7 @@
                             Suggested patch for continuation lines in file ACLs
                             Patch for != support in DNS lists
   Adam Thornton             Patch for SMTP port expansion
  +Rein Tollevik             Patch to fix search cache missing tidyup
   Stefan Traby              Threaded Perl support
   Samuli Tuomola            OS files for QNX 6.2.0
   Dave Turner               Suggested patch for sender rewriting brokenness


  Index: exim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/exim.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- exim.c    19 Oct 2004 11:04:26 -0000    1.5
  +++ exim.c    19 Oct 2004 11:40:52 -0000    1.6
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/exim.c,v 1.5 2004/10/19 11:04:26 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/exim.c,v 1.6 2004/10/19 11:40:52 ph10 Exp $ */


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


/* This function is called by millisleep() and exim_wait_tick() to wait for a
period of time that may include a fraction of a second. The coding is somewhat
-tedious. We do not expect setitimer() ever to fail, but if it does, the process
-will wait for ever, so we panic in this instance. (There was a case of this
-when a bug in a function that calls milliwait() caused it to pass invalid data.
+tedious. We do not expect setitimer() ever to fail, but if it does, the process
+will wait for ever, so we panic in this instance. (There was a case of this
+when a bug in a function that calls milliwait() caused it to pass invalid data.
That's when I added the check. :-)

   Argument:  an itimerval structure containing the interval
  @@ -214,8 +214,8 @@
   (void)sigaddset(&sigmask, SIGALRM);                    /* Add SIGALRM */
   (void)sigprocmask(SIG_BLOCK, &sigmask, &old_sigmask);  /* Block SIGALRM */
   if (setitimer(ITIMER_REAL, itval, NULL) < 0)           /* Start timer */
  -  log_write(0, LOG_MAIN|LOG_PANIC_DIE, 
  -    "setitimer() failed: %s", strerror(errno)); 
  +  log_write(0, LOG_MAIN|LOG_PANIC_DIE,
  +    "setitimer() failed: %s", strerror(errno));
   (void)sigfillset(&sigmask);                            /* All signals */
   (void)sigdelset(&sigmask, SIGALRM);                    /* Remove SIGALRM */
   (void)sigsuspend(&sigmask);                            /* Until SIGALRM */
  @@ -2837,21 +2837,21 @@
         strerror(errno));
       rlp.rlim_cur = rlp.rlim_max = 0;
       }
  -    
  -  /* I originally chose 1000 as a nice big number that was unlikely to 
  +
  +  /* I originally chose 1000 as a nice big number that was unlikely to
     be exceeded. It turns out that some older OS have a fixed upper limit of
     256. */
  -     
  +
     if (rlp.rlim_cur < 1000)
       {
       rlp.rlim_cur = rlp.rlim_max = 1000;
       if (setrlimit(RLIMIT_NOFILE, &rlp) < 0)
  -      { 
  +      {
         rlp.rlim_cur = rlp.rlim_max = 256;
         if (setrlimit(RLIMIT_NOFILE, &rlp) < 0)
           log_write(0, LOG_MAIN|LOG_PANIC, "setrlimit(RLIMIT_NOFILE) failed: %s",
             strerror(errno));
  -      } 
  +      }
       }
     #endif


  @@ -4393,11 +4393,11 @@
       int rcount = 0;
       int count = argc - recipients_arg;
       uschar **list = argv + recipients_arg;
  -    
  +
       /* These options cannot be changed dynamically for non-SMTP messages */
  -    
  +
       active_local_sender_retain = local_sender_retain;
  -    active_local_from_check = local_from_check;   
  +    active_local_from_check = local_from_check;


       /* Save before any rewriting */


  @@ -4602,11 +4602,16 @@
     /* Else do the delivery unless the ACL or local_scan() called for queue only
     or froze the message. Always deliver in a separate process. A fork failure is
     not a disaster, as the delivery will eventually happen on a subsequent queue
  -  run. */
  +  run. The search cache must be tidied before the fork, as the parent will
  +  do it before exiting. The child will trigger a lookup failure and
  +  thereby defer the delivery if it tries to use (for example) a cached ldap
  +  connection that the parent has called unbind on. */


     else if (!queue_only_policy && !deliver_freeze)
       {
       pid_t pid;
  +    search_tidyup();
  +
       if ((pid = fork()) == 0)
         {
         int rc;