]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: fix permissions of ssh keys in WSL
authorMarc Hoersken <info@marc-hoersken.de>
Sat, 18 May 2019 21:28:09 +0000 (23:28 +0200)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 10 Dec 2019 00:32:35 +0000 (19:32 -0500)
Keys created on Windows Subsystem for Linux (WSL) require it for some
reason.

(This is one of several commits to support use of WSL for the tests.)

Ref: https://github.com/curl/curl/pull/3899

tests/sshserver.pl

index bcb2f1b3aba338ab8e8d187e2e417efe0b9274b1..197e8b872ee9ce4f52a71499a8e5c4bccc9ebc77 100644 (file)
@@ -371,6 +371,9 @@ if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) ||
         logmsg 'Could not generate client key';
         exit 1;
     }
+    # Make sure that permissions are restricted so openssh doesn't complain
+    system "chmod 600 $hstprvkeyf";
+    system "chmod 600 $cliprvkeyf";
 }