From: Viktor Szakats Date: Fri, 28 Mar 2025 14:21:00 +0000 (+0100) Subject: sshserver.pl: use Perl `chmod` X-Git-Tag: curl-8_13_0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25eb2dbfbf945c763dbb000efee829dc9e5e2866;p=thirdparty%2Fcurl.git sshserver.pl: use Perl `chmod` Instead of relying on the external/shell command. For portability. Follow-up to 213c5aca7bfc74a6ae02b065c5f38a1e9ff54d62 #3899 Closes #16859 --- diff --git a/tests/sshserver.pl b/tests/sshserver.pl index 8576a27dd2..8763bfd6c1 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -436,8 +436,8 @@ if((! -e pp($hstprvkeyf)) || (! -s pp($hstprvkeyf)) || } display_file_top(pp($cliprvkeyf)); # Make sure that permissions are restricted so openssh doesn't complain - system "chmod 600 " . pp($hstprvkeyf); - system "chmod 600 " . pp($cliprvkeyf); + chmod 0600, pp($hstprvkeyf); + chmod 0600, pp($cliprvkeyf); if(($^O eq 'cygwin' || $^O eq 'msys') && -e "/bin/setfacl") { # https://cygwin.com/cygwin-ug-net/setfacl.html system "/bin/setfacl --remove-all " . pp($hstprvkeyf);