diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-08-01 15:01:12 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-08-01 15:01:12 +0000 |
commit | 254e032f97775a5331fdeb3ba0df9a96f52494d7 (patch) | |
tree | 2b3986408491d14d98a8172f263c12cb100a048d /src | |
parent | b07e6aa3aa6749ab57c214efd155bb29614394eb (diff) |
The use of forbid_filter_existstest now also locks out ${stat:
expansions.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/expand.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/src/expand.c b/src/src/expand.c index 86d410499..92e342d37 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -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", |