From 9214d2e4dfd9d4f29e9cb7a0eea8a0758ed1b34a Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 11 Jan 2020 21:48:25 +0000 Subject: pipe transport: taint-enforce command --- test/confs/0533 | 2 +- test/confs/0585 | 33 +++++++++++++++++++++++++++++++++ test/log/0585 | 2 ++ test/paniclog/0585 | 1 + test/scripts/0000-Basic/0585 | 4 ++++ test/stderr/0585 | 1 + 6 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 test/confs/0585 create mode 100644 test/log/0585 create mode 100644 test/paniclog/0585 create mode 100644 test/scripts/0000-Basic/0585 create mode 100644 test/stderr/0585 (limited to 'test') diff --git a/test/confs/0533 b/test/confs/0533 index 7c2ca9dc2..290d5e68a 100644 --- a/test/confs/0533 +++ b/test/confs/0533 @@ -24,7 +24,7 @@ r2: local_part_prefix = pipe- local_part_suffix = =* caseful_local_part = true - data = |${substr_1:$local_part_suffix} + data = |${bless:${substr_1:$local_part_suffix}} pipe_transport = t2 diff --git a/test/confs/0585 b/test/confs/0585 new file mode 100644 index 000000000..a0b35e7cf --- /dev/null +++ b/test/confs/0585 @@ -0,0 +1,33 @@ +# Exim test configuration 0585 + +.include DIR/aux-var/std_conf_prefix + +primary_hostname = myhost.test.ex + +# ----- Main settings ----- + + + +# ----- Routers ----- + +begin routers + +r2: + driver = redirect + local_part_prefix = pipe- + local_part_suffix = =* + caseful_local_part = true + data = |${substr_1:$local_part_suffix} + pipe_transport = t2 + + +# ----- Transports ----- + +begin transports + +t2: + driver = pipe + user = CALLER + batch_max = 10 + +# End diff --git a/test/log/0585 b/test/log/0585 new file mode 100644 index 000000000..db6a92e39 --- /dev/null +++ b/test/log/0585 @@ -0,0 +1,2 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 == |TESTSUITE/bin/iefbr14 R=r2 T=t2 defer (0): Tainted 'TESTSUITE/bin/iefbr14' (command for t2 transport) not permitted diff --git a/test/paniclog/0585 b/test/paniclog/0585 new file mode 100644 index 000000000..dc309d8a3 --- /dev/null +++ b/test/paniclog/0585 @@ -0,0 +1 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 == |TESTSUITE/bin/iefbr14 R=r2 T=t2 defer (0): Tainted 'TESTSUITE/bin/iefbr14' (command for t2 transport) not permitted diff --git a/test/scripts/0000-Basic/0585 b/test/scripts/0000-Basic/0585 new file mode 100644 index 000000000..5fbc9319c --- /dev/null +++ b/test/scripts/0000-Basic/0585 @@ -0,0 +1,4 @@ +# tainted data for pipe transport command +exim -odi pipe-userx=DIR/bin/iefbr14@test.ex +A test message. +**** diff --git a/test/stderr/0585 b/test/stderr/0585 new file mode 100644 index 000000000..dc309d8a3 --- /dev/null +++ b/test/stderr/0585 @@ -0,0 +1 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 == |TESTSUITE/bin/iefbr14 R=r2 T=t2 defer (0): Tainted 'TESTSUITE/bin/iefbr14' (command for t2 transport) not permitted -- cgit v1.2.3