From 65865cb9cc53b97e6cb0d0ce932328ad558784fa Mon Sep 17 00:00:00 2001 From: Patrick Steuer Date: Mon, 12 Mar 2018 12:53:21 +0000 Subject: [PATCH] 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 Reviewed-by: Bernd Edlinger Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5595) --- test/recipes/15-test_out_option.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);