From a4dc33a8a400a90d4d73aeb79fd9809a14e5795c Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Wed, 4 Jul 2007 10:37:03 +0000 Subject: [PATCH] Remove unwanted (int) case when reading SIZE. Fix runtest for 64-bit systems. Tidy obsolete stuff in test 46. --- doc/doc-txt/ChangeLog | 5 ++++- src/src/smtp_in.c | 4 ++-- test/aux-fixed/0046.filter.userx | 4 ---- test/confs/0046 | 6 ------ test/runtest | 8 +++++++- 5 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 test/aux-fixed/0046.filter.userx diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 2306cf4df..99d3eb855 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.520 2007/06/27 11:01:51 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.521 2007/07/04 10:37:03 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -76,6 +76,9 @@ PH/13 Installed PCRE version 7.2. This needed some changes because of the new PH/14 Implemented queue_only_load_latch. +PH/15 Removed an incorrect (int) cast when reading the value of SIZE in a + MAIL command. The effect was to mangle the value on 64-bit systems. + Exim version 4.67 ----------------- diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index fcf165c19..ca198af29 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/smtp_in.c,v 1.58 2007/04/16 11:17:13 ph10 Exp $ */ +/* $Cambridge: exim/src/src/smtp_in.c,v 1.59 2007/07/04 10:37:03 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -3134,7 +3134,7 @@ while (done <= 0) in order to be able to log the sender address on failure. */ if (strcmpic(name, US"SIZE") == 0 && - ((size = (int)Ustrtoul(value, &end, 10)), *end == 0)) + ((size = Ustrtoul(value, &end, 10)), *end == 0)) { if ((size == ULONG_MAX && errno == ERANGE) || size > INT_MAX) size = INT_MAX; diff --git a/test/aux-fixed/0046.filter.userx b/test/aux-fixed/0046.filter.userx deleted file mode 100644 index c0044c993..000000000 --- a/test/aux-fixed/0046.filter.userx +++ /dev/null @@ -1,4 +0,0 @@ -# Exim filter - -testprint "Body: $message_body" -testprint "End: $message_body_end" diff --git a/test/confs/0046 b/test/confs/0046 index 554366907..ab285012d 100644 --- a/test/confs/0046 +++ b/test/confs/0046 @@ -21,12 +21,6 @@ trusted_users = CALLER begin routers -forwardfile: - driver = redirect - allow_filter - check_local_user - file = DIR/aux-fixed/TESTNUM.filter.$local_part - localuser: driver = accept local_parts = userx diff --git a/test/runtest b/test/runtest index aba266292..6a4fb2b51 100755 --- a/test/runtest +++ b/test/runtest @@ -1,6 +1,6 @@ #! /usr/bin/perl -w -# $Cambridge: exim/test/runtest,v 1.27 2007/06/14 13:20:38 ph10 Exp $ +# $Cambridge: exim/test/runtest,v 1.28 2007/07/04 10:37:04 ph10 Exp $ ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -490,6 +490,12 @@ while() # ======== General uids, gids, and pids ======== # Note: this must come after munges for caller's and exim's uid/gid + # These are for systems where long int is 64 + s/\buid=4294967295/uid=-1/; + s/\beuid=4294967295/euid=-1/; + s/\bgid=4294967295/gid=-1/; + s/\begid=4294967295/egid=-1/; + s/\bgid=\d+/gid=gggg/; s/\begid=\d+/egid=gggg/; s/\bpid=\d+/pid=pppp/; -- 2.30.2