[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 acl.c expand.c globals.c globals.h exim/exim-test-orig/AutoTest/confs 476 exim/exim-test-orig/AutoTest/scripts 476
ph10 2004/10/19 14:40:39 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         acl.c expand.c globals.c globals.h 
    exim-test-orig/AutoTest/confs 476 
    exim-test-orig/AutoTest/scripts 476 
  Log:
  (1) $address_data in an ACL was clobbered by a sender verify that
  followed a recipient verify. (2) Added $sender_address_data to hold the
  address_data value from a sender verification.


  Revision  Changes    Path
  1.13      +7 -0      exim/exim-doc/doc-txt/ChangeLog
  1.4       +12 -1     exim/exim-src/src/acl.c
  1.2       +1 -0      exim/exim-src/src/expand.c
  1.4       +1 -0      exim/exim-src/src/globals.c
  1.4       +1 -0      exim/exim-src/src/globals.h
  1.2       +8 -0      exim/exim-test-orig/AutoTest/confs/476
  1.2       +1 -1      exim/exim-test-orig/AutoTest/scripts/476


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


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -46,6 +46,13 @@
       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.
  +
  +12. If verify=recipient was followed by verify=sender in a RCPT ACL, the value
  +    of $address_data from the recipient verification was clobbered by the
  +    sender verification.
  +
  +13. The value of address_data from a sender verification is now available in
  +    $sender_address_data in subsequent conditions in the ACL statement.



Exim version 4.43

  Index: acl.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/acl.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- acl.c    19 Oct 2004 11:04:26 -0000    1.3
  +++ acl.c    19 Oct 2004 13:40:39 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/acl.c,v 1.3 2004/10/19 11:04:26 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/acl.c,v 1.4 2004/10/19 13:40:39 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1012,6 +1012,8 @@
     else
       {
       BOOL routed = TRUE;
  +    uschar *save_address_data = deliver_address_data;
  +      
       sender_vaddr = deliver_make_addr(verify_sender_address, TRUE);
       if (no_details) setflag(sender_vaddr, af_sverify_told);
       if (verify_sender_address[0] != 0)
  @@ -1057,7 +1059,16 @@
       sender_vaddr->special_action = rc;
       sender_vaddr->next = sender_verified_list;
       sender_verified_list = sender_vaddr;
  +    
  +    /* Restore the recipient address data, which might have been clobbered by 
  +    the sender verification. */
  +  
  +    deliver_address_data = save_address_data;
       }
  +    
  +  /* Put the sender address_data value into $sender_address_data */
  +
  +  sender_address_data = sender_vaddr->p.address_data; 
     }


/* A recipient address just gets a straightforward verify; again we must handle
@@ -2109,7 +2120,7 @@
rc = acl_check_internal(where, addr, s, 0, user_msgptr, log_msgptr);

smtp_command_argument = deliver_domain =
- deliver_localpart = deliver_address_data = NULL;
+ deliver_localpart = deliver_address_data = sender_address_data = NULL;

/* A DISCARD response is permitted only for message ACLs, excluding the PREDATA
ACL, which is really in the middle of an SMTP command. */

  Index: expand.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/expand.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- expand.c    7 Oct 2004 10:39:01 -0000    1.1
  +++ expand.c    19 Oct 2004 13:40:39 -0000    1.2
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/expand.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/expand.c,v 1.2 2004/10/19 13:40:39 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -395,6 +395,7 @@
     { "runrc",               vtype_int,         &runrc },
     { "self_hostname",       vtype_stringptr,   &self_hostname },
     { "sender_address",      vtype_stringptr,   &sender_address },
  +  { "sender_address_data", vtype_stringptr,   &sender_address_data },
     { "sender_address_domain", vtype_domain,    &sender_address },
     { "sender_address_local_part", vtype_localpart, &sender_address },
     { "sender_data",         vtype_stringptr,   &sender_data },


  Index: globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- globals.c    19 Oct 2004 11:04:26 -0000    1.3
  +++ globals.c    19 Oct 2004 13:40:39 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.c,v 1.3 2004/10/19 11:04:26 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.c,v 1.4 2004/10/19 13:40:39 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -859,6 +859,7 @@
   uschar *self_hostname          = NULL;
   uschar *sender_address         = NULL;
   unsigned int sender_address_cache[(MAX_NAMED_LIST * 2)/32];
  +uschar *sender_address_data    = NULL;
   BOOL    sender_address_forced  = FALSE;
   uschar *sender_address_unrewritten = NULL;
   uschar *sender_data            = NULL;


  Index: globals.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- globals.h    19 Oct 2004 11:04:26 -0000    1.3
  +++ globals.h    19 Oct 2004 13:40:39 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.h,v 1.3 2004/10/19 11:04:26 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.h,v 1.4 2004/10/19 13:40:39 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -489,6 +489,7 @@
   extern BOOL    search_find_defer;      /* Set TRUE if lookup deferred */
   extern uschar *self_hostname;          /* Self host after routing->directors */
   extern unsigned int sender_address_cache[(MAX_NAMED_LIST * 2)/32]; /* Cache bits for sender */
  +extern uschar *sender_address_data;    /* address_data from sender verify */
   extern BOOL    sender_address_forced;  /* Set by -f */
   extern uschar *sender_address_unrewritten; /* Set if rewritten by verify */
   extern uschar *sender_data;            /* lookup result for senders */


  Index: 476
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/confs/476,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 476    8 Oct 2004 14:49:16 -0000    1.1
  +++ 476    19 Oct 2004 13:40:39 -0000    1.2
  @@ -21,7 +21,9 @@


   rcpt:
     accept verify = recipient
  +         verify = sender 
            condition = ${if eq {$address_data}{ADDRESS_DATA_STRING}{yes}{no}} 
  +         condition = ${if eq {$sender_address_data}{SENDER_ADDRESS_DATA_STRING}{yes}{no}} 



   # ----- Routers -----
  @@ -38,6 +40,12 @@
     local_parts = child
     address_data = ADDRESS_DATA_STRING
     transport = t1
  +  
  +r3:
  +  driver = accept
  +  local_parts = oksender
  +  address_data = SENDER_ADDRESS_DATA_STRING
  +  transport = t1    



# ----- Transports -----

  Index: 476
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/scripts/476,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 476    8 Oct 2004 14:49:53 -0000    1.1
  +++ 476    19 Oct 2004 13:40:39 -0000    1.2
  @@ -1,6 +1,6 @@
   0 address_data in ACLs after verification
   exim -bs
  -MAIL FROM:<x@y>
  +MAIL FROM:<oksender@y>
   rcpt to:<child@???>
   rcpt to:<orig@???>
   quit