The use of forbid_filter_existstest now also locks out ${stat:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 1 Aug 2005 15:01:12 +0000 (15:01 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 1 Aug 2005 15:01:12 +0000 (15:01 +0000)
expansions.

doc/doc-txt/ChangeLog
doc/doc-txt/NewStuff
src/src/expand.c

index d2600f9691ded048a0fdbfab84a50f40b8d03156..99ebabc3ef21fd5068d50f94b77136e5a51986c2 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.187 2005/08/01 14:41:25 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.188 2005/08/01 15:01:12 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -25,6 +25,9 @@ PH/05 Replaced all Tom's calls to snprintf() with calls to the internal
       string_format() function, because snprintf() does not exist on all
       operating systems.
 
+PH/06 The use of forbid_filter_existstest now also locks out the use of the
+      ${stat: expansion item.
+
 
 Exim version 4.52
 -----------------
index 976a1e89e4875e1d69aae1973b4463ce4f5c5ff3..f358f7a4871ef5f6ff3ef1829a40c5b8ee2aeefc 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.58 2005/08/01 14:00:34 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.59 2005/08/01 15:01:12 ph10 Exp $
 
 New Features in Exim
 --------------------
@@ -50,6 +50,9 @@ PH/01 Support for SQLite database lookups has been added. This is another
 PH/02 The variable $message_id is now deprecated, to be replaced by
       $message_exim_id, which makes it clearer which ID is being referenced.
 
+PH/03 The use of forbid_filter_existstest now also locks out the use of the
+      ${stat: expansion item.
+
 
 Exim version 4.52
 -----------------
index 86d410499de4f519c49e2775914250ba595ec39f..92e342d376ab54e60cd5aa67bd0927e846e08b20 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/expand.c,v 1.38 2005/08/01 14:00:35 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.39 2005/08/01 15:01:12 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -4846,6 +4846,12 @@ while (*s != 0)
         mode_t mode;
         struct stat st;
 
+        if ((expand_forbid & RDO_EXISTS) != 0)
+          {
+          expand_string_message = US"Use of the stat() expansion is not permitted";
+          goto EXPAND_FAILED;
+          }
+
         if (stat(CS sub, &st) < 0)
           {
           expand_string_message = string_sprintf("stat(%s) failed: %s",