[exim-cvs] cvs commit: exim/exim-src/OS Makefile-Base exim/…

Góra strony
Delete this message
Reply to this message
Autor: Tom Kistner
Data:  
Dla: exim-cvs
Temat: [exim-cvs] cvs commit: exim/exim-src/OS Makefile-Base exim/exim-src/exim_monitor em_globals.c exim/exim-src/src globals.c globals.h mime.c mime.h spf.c
tom 2004/12/15 11:51:09 GMT

  Modified files:        (Branch: EXISCAN)
    exim-src/OS          Makefile-Base 
    exim-src/exim_monitor em_globals.c 
    exim-src/src         globals.c globals.h mime.c mime.h spf.c 
  Log:
  Added basic MIME ACL decoding errorlevels


  Revision  Changes    Path
  1.1.2.5   +1 -1      exim/exim-src/OS/Makefile-Base
  1.1.2.2   +5 -0      exim/exim-src/exim_monitor/em_globals.c
  1.6.2.6   +1 -1      exim/exim-src/src/globals.c
  1.6.2.5   +1 -1      exim/exim-src/src/globals.h
  1.1.2.4   +18 -0     exim/exim-src/src/mime.c
  1.1.2.4   +6 -0      exim/exim-src/src/mime.h
  1.1.2.2   +1 -1      exim/exim-src/src/spf.c


  Index: Makefile-Base
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/OS/Makefile-Base,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- Makefile-Base    10 Dec 2004 09:24:38 -0000    1.1.2.4
  +++ Makefile-Base    15 Dec 2004 11:51:08 -0000    1.1.2.5
  @@ -1,4 +1,4 @@
  -# $Cambridge: exim/exim-src/OS/Makefile-Base,v 1.1.2.4 2004/12/10 09:24:38 tom Exp $
  +# $Cambridge: exim/exim-src/OS/Makefile-Base,v 1.1.2.5 2004/12/15 11:51:08 tom Exp $


   # This file is the basis of the main makefile for Exim and friends. The
   # makefile at the top level arranges to build the main makefile by calling
  @@ -320,7 +320,7 @@
         auths/auths.a \
         $(LIBRESOLV) $(LIBS) $(LIBS_EXIM) $(IPV6_LIBS) $(EXTRALIBS) \
         $(EXTRALIBS_EXIM) $(DBMLIB) $(LOOKUP_LIBS) $(AUTH_LIBS) \
  -      $(PERL_LIBS) $(TLS_LIBS)
  +      $(PERL_LIBS) $(TLS_LIBS) $(LDFLAGS)
       @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
         echo $(STRIP_COMMAND) exim; \
         $(STRIP_COMMAND) exim; \


  Index: em_globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/exim_monitor/em_globals.c,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- em_globals.c    2 Dec 2004 09:15:11 -0000    1.1.2.1
  +++ em_globals.c    15 Dec 2004 11:51:09 -0000    1.1.2.2
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/exim_monitor/em_globals.c,v 1.1.2.1 2004/12/02 09:15:11 tom Exp $ */
  +/* $Cambridge: exim/exim-src/exim_monitor/em_globals.c,v 1.1.2.2 2004/12/15 11:51:09 tom Exp $ */


   /*************************************************
   *                Exim Monitor                    *
  @@ -43,6 +43,11 @@
   uschar  actioned_message[24];
   uschar *action_required;
   uschar *alternate_config = NULL;
  +
  +#ifdef EXPERIMENTAL_BRIGHTMAIL
  +int     bmi_run                = 0;
  +uschar *bmi_verdicts           = NULL;
  +#endif


   int     body_max = 20000;



  Index: globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.c,v
  retrieving revision 1.6.2.5
  retrieving revision 1.6.2.6
  diff -u -r1.6.2.5 -r1.6.2.6
  --- globals.c    10 Dec 2004 14:59:08 -0000    1.6.2.5
  +++ globals.c    15 Dec 2004 11:51:09 -0000    1.6.2.6
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.c,v 1.6.2.5 2004/12/10 14:59:08 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.c,v 1.6.2.6 2004/12/15 11:51:09 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -692,7 +692,7 @@


   /* MIME ACL expandables */
   #ifdef WITH_CONTENT_SCAN
  -uschar *mime_anomaly_level     = NULL;
  +int     mime_anomaly_level     = NULL;
   uschar *mime_anomaly_text      = NULL;
   uschar *mime_boundary          = NULL;
   uschar *mime_charset           = NULL;


  Index: globals.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.h,v
  retrieving revision 1.6.2.4
  retrieving revision 1.6.2.5
  diff -u -r1.6.2.4 -r1.6.2.5
  --- globals.h    10 Dec 2004 14:59:08 -0000    1.6.2.4
  +++ globals.h    15 Dec 2004 11:51:09 -0000    1.6.2.5
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.h,v 1.6.2.4 2004/12/10 14:59:08 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.h,v 1.6.2.5 2004/12/15 11:51:09 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -410,7 +410,7 @@


   /* MIME ACL expandables */
   #ifdef WITH_CONTENT_SCAN
  -extern uschar *mime_anomaly_level;
  +extern int     mime_anomaly_level;
   extern uschar *mime_anomaly_text;
   extern uschar *mime_boundary;
   extern uschar *mime_charset;


  Index: mime.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/Attic/mime.c,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- mime.c    30 Nov 2004 15:18:58 -0000    1.1.2.3
  +++ mime.c    15 Dec 2004 11:51:09 -0000    1.1.2.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/mime.c,v 1.1.2.3 2004/11/30 15:18:58 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/mime.c,v 1.1.2.4 2004/12/15 11:51:09 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -15,6 +15,19 @@
   FILE *mime_stream = NULL;
   uschar *mime_current_boundary = NULL;


  +/*************************************************
  +* set MIME anomaly level + text                  *
  +*************************************************/
  +
  +/* Small wrapper to set the two expandables which
  +   give info on detected "problems" in MIME
  +   encodings. Those are defined in mime.h. */
  +
  +void mime_set_anomaly(int level, char *text) {
  +  mime_anomaly_level = level;
  +  mime_anomaly_text = text;
  +};
  +


   /*************************************************
   * decode quoted-printable chars                  *
  @@ -131,6 +144,7 @@
       while (*(p+offset) != '\0') {
         /* hit illegal char ? */
         if (mime_b64[*(p+offset)] == 128) {
  +        mime_set_anomaly(MIME_ANOMALY_BROKEN_BASE64);
           offset++;
         }
         else {
  @@ -148,6 +162,7 @@


         /* byte 0 ---------------------- */
         if (*(p+1) == 255) {
  +        mime_set_anomaly(MIME_ANOMALY_BROKEN_BASE64);
           break;
         }
         data[(*num_decoded)] = *p;
  @@ -159,6 +174,7 @@
         p++;
         /* byte 1 ---------------------- */
         if (*(p+1) == 255) {
  +        mime_set_anomaly(MIME_ANOMALY_BROKEN_BASE64);
           break;
         }
         data[(*num_decoded)] = *p;
  @@ -170,6 +186,7 @@
         p++;
         /* byte 2 ---------------------- */
         if (*(p+1) == 255) {
  +        mime_set_anomaly(MIME_ANOMALY_BROKEN_BASE64);
           break;
         }
         data[(*num_decoded)] = *p;
  @@ -195,6 +212,7 @@


           if (decode_qp_result == -2) {
             /* Error from decoder. p is unchanged. */
  +          mime_set_anomaly(MIME_ANOMALY_BROKEN_QP);
             data[(*num_decoded)] = '=';
             (*num_decoded)++;
             p++;


  Index: mime.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/Attic/mime.h,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- mime.h    30 Nov 2004 15:18:58 -0000    1.1.2.3
  +++ mime.h    15 Dec 2004 11:51:09 -0000    1.1.2.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/mime.h,v 1.1.2.3 2004/11/30 15:18:58 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/mime.h,v 1.1.2.4 2004/12/15 11:51:09 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -55,6 +55,12 @@
   };


   static int mime_parameter_list_size = sizeof(mime_parameter_list)/sizeof(mime_parameter);
  +
  +
  +/* MIME Anomaly list */
  +#define MIME_ANOMALY_BROKEN_BASE64    2, "Broken BASE64 encoding detected"
  +#define MIME_ANOMALY_BROKEN_QP        1, "Broken Quoted-Printable encoding detected"
  +


/* BASE64 decoder matrix */
static unsigned char mime_b64[256]={

  Index: spf.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/Attic/spf.c,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- spf.c    10 Dec 2004 09:24:38 -0000    1.1.2.1
  +++ spf.c    15 Dec 2004 11:51:09 -0000    1.1.2.2
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/spf.c,v 1.1.2.1 2004/12/10 09:24:38 tom Exp $ */
  +/* $Cambridge: exim/exim-src/src/spf.c,v 1.1.2.2 2004/12/15 11:51:09 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -13,7 +13,7 @@
   #include "exim.h"
   #ifdef EXPERIMENTAL_SPF


-#include "spf.h"
+/* #include "spf.h" */

   SPF_config_t        spfcid = NULL;
   SPF_dns_config_t    spfdcid_resolv = NULL;