Mailing List Archive

${run leaves $value empty
Under Exim 4.96-19 in Debian unstable/testing, ${run fails to put
standard output into $value. E.g., in a .forward file,

if "${run{/bin/echo -n foo}{}}$runrc" is not 99
then save /tmp/exim-$runrc-$value endif

creates file /tmp/exim-0- rather than /tmp/exim-0-foo. It works
correctly in 4.96-15+deb12u1 (Debian 12 stable).

Anyone else seeing this? I don't see any bug reports on it.

Thanks.. Bill

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: ${run leaves $value empty [ In reply to ]
On 2023-08-22 Bill Brelsford via Exim-users <exim-users@lists.exim.org> wrote:
> Under Exim 4.96-19 in Debian unstable/testing, ${run fails to put
> standard output into $value. E.g., in a .forward file,

> if "${run{/bin/echo -n foo}{}}$runrc" is not 99
> then save /tmp/exim-$runrc-$value endif

> creates file /tmp/exim-0- rather than /tmp/exim-0-foo. It works
> correctly in 4.96-15+deb12u1 (Debian 12 stable).

> Anyone else seeing this? I don't see any bug reports on it.
[...]

Hello,

This is recent breakage - Checking the uploaded versions this was broken
by either
cf3fecb9e873df38a9245775a3887e73a8716083 Fix free of $value after
${run...}
or
6707bfa9fb78858de938a1abca2846c820c5ded7 Fix $recipients expansion when
used within ${run...}. Bug 3013

cu Andreas

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: ${run leaves $value empty [ In reply to ]
On 2023-08-23 Andreas Metzler <eximusers@bebt.de> wrote:
> On 2023-08-22 Bill Brelsford via Exim-users <exim-users@lists.exim.org> wrote:
>> Under Exim 4.96-19 in Debian unstable/testing, ${run fails to put
>> standard output into $value. E.g., in a .forward file,
[...]

> This is recent breakage - Checking the uploaded versions this was broken
> by either
> cf3fecb9e873df38a9245775a3887e73a8716083 Fix free of $value after
> ${run...}
> or
> 6707bfa9fb78858de938a1abca2846c820c5ded7 Fix $recipients expansion when
> used within ${run...}. Bug 3013

Hello,

I doublechecked with exim GIT instead of Debian packages, not very
surprising the former patch triggered the error.

While
8c5ab0901f665bfd16bb0a0e85cef8b26e4e7818 Testsuite: testcase for 3013
had
ametzler@argenau:/tmp/EXIM4$ /dev/shm/EXIM4/exim.git/src/build-Linux-x86_64/exim -be '${run{/bin/echo -n foo}{success}{error}} runrc[$runrc] value[$value]'
success runrc[0] value[foo]

cf3fecb9e873df38a9245775a3887e73a8716083 Fix free of $value after ${run...}
broke with
ametzler@argenau:/tmp/EXIM4$ /dev/shm/EXIM4/exim.git/src/build-Linux-x86_64/exim -be '${run{/bin/echo -n foo}{success}{error}} runrc[$runrc] value[$value]'
success runrc[0] value[]

cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: ${run leaves $value empty [ In reply to ]
On 23/08/2023 16:00, Andreas Metzler via Exim-users wrote:
> On 2023-08-23 Andreas Metzler <eximusers@bebt.de> wrote:
>> On 2023-08-22 Bill Brelsford via Exim-users <exim-users@lists.exim.org> wrote:
>>> Under Exim 4.96-19 in Debian unstable/testing, ${run fails to put
>>> standard output into $value. E.g., in a .forward file,
> [...]
>
>> This is recent breakage - Checking the uploaded versions this was broken
>> by either
>> cf3fecb9e873df38a9245775a3887e73a8716083 Fix free of $value after
>> ${run...}
>> or
>> 6707bfa9fb78858de938a1abca2846c820c5ded7 Fix $recipients expansion when
>> used within ${run...}. Bug 3013

Bother. I didn't spot that $value is documented to be useable as the
result after the call, not just in the result expansions.

I'll need to decide (and document) just how long. Probably "for the toplevel
ACL", if that is decently codable. We can't just revert that commit because it
would leave a potential use-after-free (it was visible under debug, in
investigating 3013).
--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: ${run leaves $value empty [ In reply to ]
On 23/08/2023 20:46, Jeremy Harris via Exim-users wrote:
>>> This is recent breakage - Checking the uploaded versions this was broken
>>> by either
>>> cf3fecb9e873df38a9245775a3887e73a8716083 Fix free of $value after
>>> ${run...}

>
> Bother.  I didn't spot that $value is documented to be useable as the
> result after the call, not just in the result expansions.

Addressed by c18090c685f5, 21b172df101c.
--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: ${run leaves $value empty [ In reply to ]
On Thu Aug 24 2023 at 07:07 PM +0100, Jeremy Harris via Exim-users wrote:
> > Bother.??I?didn't?spot?that?$value?is?documented?to?be?useable?as?the
> > result?after?the?call,?not?just?in?the?result?expansions.
>
> Addressed by c18090c685f5, 21b172df101c.

Thanks, Jeremy and Andreas!

--
Bill

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/