summaryrefslogtreecommitdiff
path: root/test/recipes/15-test_out_option.t
diff options
context:
space:
mode:
authorPatrick Steuer <patrick.steuer@de.ibm.com>2018-03-12 12:53:21 +0000
committerRichard Levitte <levitte@openssl.org>2018-03-14 18:37:08 +0100
commit65865cb9cc53b97e6cb0d0ce932328ad558784fa (patch)
tree9543f7bca9e5b94417fc5f00e760fb9d20d81fd3 /test/recipes/15-test_out_option.t
parentd35b2c72487dd07ca4e88a9c6bf4031a34e92dc1 (diff)
downloadopenssl-new-65865cb9cc53b97e6cb0d0ce932328ad558784fa.tar.gz
Fix test_out_option
Random path generation code in test/recipes/15-test_out_option.t does not work: The code sets rand_path to "/test.pem". I.e. the test will fail as expected for unprivileged user but will pass for root user. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5595)
Diffstat (limited to 'test/recipes/15-test_out_option.t')
-rw-r--r--test/recipes/15-test_out_option.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/recipes/15-test_out_option.t b/test/recipes/15-test_out_option.t
index 018ff3d00d..f50001d48b 100644
--- a/test/recipes/15-test_out_option.t
+++ b/test/recipes/15-test_out_option.t
@@ -36,7 +36,8 @@ test_illegal_path('../');
# Test for trying to create a file in a non-exist directory
my @chars = ("A".."Z", "a".."z", "0".."9");
-my $rand_path = $chars[rand @chars] for 1..32;
+my $rand_path = "";
+$rand_path .= $chars[rand @chars] for 1..32;
$rand_path .= "/test.pem";
test_illegal_path($rand_path);