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

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: exim-cvs
Subject: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src search.c exim/exim-test/scripts/3200-testdb 3200 exim/exim-test/stderr 3200 exim/exim-test/stdout 3200
ph10 2006/12/04 15:00:20 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         search.c 
    exim-test/scripts/3200-testdb 3200 
    exim-test/stdout     3200 
  Added files:
    exim-test/stderr     3200 
  Log:
  Give an error for the use of * and *@ with a query-style lookup.


  Revision  Changes    Path
  1.440     +4 -0      exim/exim-doc/doc-txt/ChangeLog
  1.4       +15 -7     exim/exim-src/src/search.c
  1.2       +6 -1      exim/exim-test/scripts/3200-testdb/3200
  1.1       +1 -0      exim/exim-test/stderr/3200 (new)
  1.2       +1 -1      exim/exim-test/stdout/3200


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.439
  retrieving revision 1.440
  diff -u -r1.439 -r1.440
  --- ChangeLog    20 Nov 2006 14:29:31 -0000    1.439
  +++ ChangeLog    4 Dec 2006 15:00:19 -0000    1.440
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.439 2006/11/20 14:29:31 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.440 2006/12/04 15:00:19 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -333,6 +333,10 @@
   PH/48 When a host name was looked up from an IP address, and the subsequent
         forward lookup of the name timed out, the host name was left in
         $sender_host_name, contrary to the specification.
  +
  +PH/49 Although default lookup types such as lsearch* or cdb*@ have always been
  +      restricted to single-key lookups, Exim was not diagnosing an error if
  +      * or *@ was used with a query-style lookup.



Exim version 4.63

  Index: search.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/search.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- search.c    7 Feb 2006 11:19:00 -0000    1.3
  +++ search.c    4 Dec 2006 15:00:20 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/search.c,v 1.3 2006/02/07 11:19:00 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/search.c,v 1.4 2006/12/04 15:00:20 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -184,17 +184,25 @@
     }


/* Check for the individual search type. Only those that are actually in the
-binary are valid. For query-style types, "partial" is an error. */
+binary are valid. For query-style types, "partial" and default types are
+erroneous. */

   stype = search_findtype(ss, len);
  -if (pv >= 0 && mac_islookup(stype, lookup_querystyle))
  +if (stype >= 0 && mac_islookup(stype, lookup_querystyle))
     {
  -  search_error_message = string_sprintf("\"partial\" is not permitted "
  -    "for lookup type \"%s\"", ss);
  -  return -1;
  +  if (pv >= 0)
  +    {
  +    search_error_message = string_sprintf("\"partial\" is not permitted "
  +      "for lookup type \"%s\"", ss);
  +    return -1;
  +    }
  +  if ((*starflags & (SEARCH_STAR|SEARCH_STARAT)) != 0)
  +    {
  +    search_error_message = string_sprintf("defaults using \"*\" or \"*@\" are "
  +      "not permitted for lookup type \"%s\"", ss);
  +    return -1;
  +    }
     }
  -
  -/* All is well; pass back the partial type and return the lookup type. */


*ptypeptr = pv;
return stype;

  Index: 3200
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/scripts/3200-testdb/3200,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 3200    7 Feb 2006 10:54:48 -0000    1.1
  +++ 3200    4 Dec 2006 15:00:20 -0000    1.2
  @@ -1,6 +1,11 @@
   # testdb lookups
  -
  +1
   exim -be
   match_ip:        12 ${if match_ip{10.11.12.13}{testdb;something}}
   match_ip:        13 ${if match_ip{10.11.12.13}{testdb;fail}}
  +match_domain:    14 ${if match_domain{a.b.c.d}{testdb*;fail}}
  +bad default:     ${lookup testdb*{abcd}}
  +bad default:     ${lookup testdb*@{abcd}}
  +bad default:     ${lookup testdb*{fail}}
  +bad default:     ${lookup testdb*@{fail}}
   ****


Index: 3200
====================================================================
1999-03-02 09:44:33 defaults using "*" or "*@" are not permitted for lookup type "testdb*"

  Index: 3200
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stdout/3200,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 3200    7 Feb 2006 10:47:37 -0000    1.1
  +++ 3200    4 Dec 2006 15:00:20 -0000    1.2
  @@ -1,3 +1,3 @@
   > match_ip:        12 true
   > match_ip:        13 
  -> 
  +> 
  \ No newline at end of file