]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: add support for SSH server variant specific transfer paths
authorMarc Hoersken <info@marc-hoersken.de>
Sun, 26 Apr 2020 16:31:00 +0000 (18:31 +0200)
committerMarc Hoersken <info@marc-hoersken.de>
Sat, 2 May 2020 14:56:55 +0000 (16:56 +0200)
OpenSSH for Windows requires paths in the format of /C:/
instead of the pseudo-POSIX paths /cygdrive/c/ or just /c/

Reviewed-by: Daniel Stenberg
Closes #5298

51 files changed:
tests/FILEFORMAT.md
tests/data/test1446
tests/data/test2004
tests/data/test582
tests/data/test583
tests/data/test600
tests/data/test601
tests/data/test602
tests/data/test603
tests/data/test604
tests/data/test605
tests/data/test606
tests/data/test607
tests/data/test608
tests/data/test609
tests/data/test610
tests/data/test611
tests/data/test612
tests/data/test613
tests/data/test614
tests/data/test615
tests/data/test616
tests/data/test617
tests/data/test618
tests/data/test619
tests/data/test620
tests/data/test621
tests/data/test622
tests/data/test623
tests/data/test624
tests/data/test625
tests/data/test626
tests/data/test628
tests/data/test629
tests/data/test630
tests/data/test631
tests/data/test632
tests/data/test633
tests/data/test634
tests/data/test635
tests/data/test636
tests/data/test637
tests/data/test638
tests/data/test639
tests/data/test640
tests/data/test641
tests/data/test642
tests/data/test656
tests/data/test664
tests/data/test665
tests/runtests.pl [changed mode: 0755->0644]

index 034b1a73c10cfdceac526a2de487fcf3e4830088..872c6e676cf86839acc10facf80b35b3b3706976 100644 (file)
@@ -381,6 +381,7 @@ Available substitute variables include:
 - `%SRCDIR` - Full path to the source dir
 - `%SSHPORT` - Port number of the SCP/SFTP server
 - `%SSHSRVMD5` - MD5 of SSH server's public key
+- `%SSH_PWD` - Current directory friendly for the SSH server
 - `%TFTP6PORT` - IPv6 port number of the TFTP server
 - `%TFTPPORT` - Port number of the TFTP server
 - `%USER` - Login ID of the user running the test
index 96d634e1c21ec9d02fa87d965e30114572e234f3..637df583fe159fd1ed105a0a396044c04cd483e7 100644 (file)
@@ -24,7 +24,7 @@ perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test1446.dir
 SFTP with --remote-time
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test1446.dir/rofile.txt --insecure --remote-time
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test1446.dir/rofile.txt --insecure --remote-time
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test1446.dir && \
index 5b3b68d0c0febcf921b84587f2cb503614f2521c..f9add83d5699c169ff5a94a81e2b65d2bb3ad9df 100644 (file)
@@ -30,7 +30,7 @@ sftp
 TFTP RRQ followed by SFTP retrieval followed by FILE followed by SCP retrieval then again in reverse order
  </name>
 <command option="no-include">
---key curl_client_key --pubkey curl_client_key.pub -u %USER: tftp://%HOSTIP:%TFTPPORT//2004 sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test2004.txt file://localhost%FILE_PWD/log/test2004.txt scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test2004.txt file://localhost%FILE_PWD/log/test2004.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test2004.txt tftp://%HOSTIP:%TFTPPORT//2004 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: tftp://%HOSTIP:%TFTPPORT//2004 sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test2004.txt file://localhost%FILE_PWD/log/test2004.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/test2004.txt file://localhost%FILE_PWD/log/test2004.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test2004.txt tftp://%HOSTIP:%TFTPPORT//2004 --insecure
 </command>
 <file name="log/test2004.txt">
 This is test data
index 65d85b2323277b33ab6c529a7d3d6a81862fef48..8ac6bc86a19d6ec730f329d2aaf657bc175e5e6a 100644 (file)
@@ -24,7 +24,7 @@ lib582
 SFTP upload using multi interface
  </name>
  <command>
-Sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/upload582.txt %PWD/log/file582.txt %USER:
+Sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload582.txt %PWD/log/file582.txt %USER:
 </command>
 <file name="log/file582.txt">
 Moooooooooooo
index 2c41ca1d229872406975120dada754cd2e96e9f9..e7d95960b99bb6991e087ccdd3ed8749c035960a 100644 (file)
@@ -29,7 +29,7 @@ SFTP with multi interface, remove handle early
 # name resolve will cause it to return rather quickly and thus we could trigger
 # the problem we're looking to verify.
  <command>
-sftp://localhost:%SSHPORT%POSIX_PWD/log/upload583.txt %USER:
+sftp://localhost:%SSHPORT%SSH_PWD/log/upload583.txt %USER:
 </command>
 </client>
 
index 2a139b81730bb8350fbe8c3e562b13c73798fbb7..f9415e0e0544cba29c7cabfbcc43934f576db7ec 100644 (file)
@@ -24,7 +24,7 @@ sftp
 SFTP retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file600.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file600.txt --insecure
 </command>
 <file name="log/file600.txt">
 Test data
index 544a88068db907706487052cfb342d0427e99bf3..c89b645356312648ea7cdeaca8960e4bbf9c6714 100644 (file)
@@ -24,7 +24,7 @@ scp
 SCP retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file601.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file601.txt --insecure
 </command>
 <file name="log/file601.txt">
 Test data
index 6bb0df3f422b0e8ddd33cce62d142e4f1a5f3c49..dd300c74d651d5f7d61f65d32a5fa7cae803d9a0 100644 (file)
@@ -21,7 +21,7 @@ sftp
 SFTP put
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file602.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/upload.602 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file602.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.602 --insecure
 </command>
 <file name="log/file602.txt">
 Test data
index 879e4c0f78c61f7225c091ce4f144cf0d28245db..b96c4057fd710a96e270e401ab5c5e4498043453 100644 (file)
@@ -21,7 +21,7 @@ scp
 SCP upload
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file603.txt scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/upload.603 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file603.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.603 --insecure
 </command>
 <file name="log/file603.txt">
 Test data
index f76a7fb23277315e0591f4cb2cb4299f21a50135..f503e669e7b6e71391674f19ea6b9de599da5e25 100644 (file)
@@ -16,7 +16,7 @@ sftp
 SFTP retrieval of nonexistent file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/not-a-valid-file-moooo --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/not-a-valid-file-moooo --insecure
 </command>
 </client>
 
index a18ab2997afddb53f37cb25c830c655fa8f1874e..29555fa824cfe642dfc951609f3991c5c4667fa7 100644 (file)
@@ -16,7 +16,7 @@ scp
 SCP retrieval of nonexistent file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/not-a-valid-file-moooo --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/not-a-valid-file-moooo --insecure
 </command>
 </client>
 
index 37e21086cdc9bbf67e4f11168bb910414791d38c..c790bd685cc2c793f1120ebc45e87c246071687b 100644 (file)
@@ -16,7 +16,7 @@ sftp
 SFTP invalid user login
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u not-a-valid-user: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/not-a-valid-file-moooo --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u not-a-valid-user: sftp://%HOSTIP:%SSHPORT%SSH_PWD/not-a-valid-file-moooo --insecure
 </command>
 </client>
 
index e422451513cc46daa750be4cb7488c2720d85ccf..8c13e5844cd6ccc712aa55c6e2aaacebaaaf2ca7 100644 (file)
@@ -16,7 +16,7 @@ scp
 SCP invalid user login
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u not-a-valid-user: scp://%HOSTIP:%SSHPORT%POSIX_PWD/not-a-valid-file-moooo --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u not-a-valid-user: scp://%HOSTIP:%SSHPORT%SSH_PWD/not-a-valid-file-moooo --insecure
 </command>
 </client>
 
index 86391f085c3226f31a68b3280ed27107407adb9f..b4d010556e9658168a2b683d2dabcec12d23fa76 100644 (file)
@@ -24,7 +24,7 @@ sftp
 SFTP post-quote rename
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/file608.txt %PWD/log/file608-renamed.txt" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file608.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/file608.txt %PWD/log/file608-renamed.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file608.txt --insecure
 </command>
 # Verify that the file was renamed properly, then rename the file back to what
 # it was so the verify section works and the file can be cleaned up.
index 4a9da1a949b8f4dea7aede5917bbf54452d14d03..5aa9eecfc0f8b8c2993b8939298aff6689d2934f 100644 (file)
@@ -25,7 +25,7 @@ sftp
 SFTP post-quote mkdir failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-mkdir %PWD/log/file609.txt" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file609.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-mkdir %PWD/log/file609.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file609.txt --insecure
 </command>
 <file name="log/file609.txt">
 Test file for mkdir test
index 179146419d93f5b23d3eedf1cf0f0795ea1216f1..d097421517c884b11e24e636cdeafbb62b0c1559 100644 (file)
@@ -27,7 +27,7 @@ perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test610.dir
 SFTP post-quote rmdir
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rmdir %PWD/log/test610.dir" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file610.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rmdir %PWD/log/test610.dir" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file610.txt --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test610.pl gone %PWD/log/test610.dir
index f40a4bda39f0fa4acd4774bd6005d32daa2d4b02..6362002e346ebe057b78a33a60589ba0dbbcc3ea 100644 (file)
@@ -27,7 +27,7 @@ perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test611.dir
 SFTP post-quote rename
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/test611.dir %PWD/log/test611.new" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file611.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-rename %PWD/log/test611.dir %PWD/log/test611.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file611.txt --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test611.new
index 4fed660d7497dac23d0dc8f857bec3699dd7a9b0..ae18afbc14a8c5f29833fade9f87a05d8beab928 100644 (file)
@@ -24,7 +24,7 @@ sftp
 SFTP post-quote remove file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file612.txt -Q "-rm %PWD/log/file612.txt" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/upload.612  --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file612.txt -Q "-rm %PWD/log/file612.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/upload.612  --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test610.pl gone %PWD/log/test612.txt
index c4d82fbf0d913c7f43c048daea6e2333841a0aed..fcb9837711328cb70e3ff952098a2b3d4bcb104c 100644 (file)
@@ -31,7 +31,7 @@ perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test613.dir
 SFTP directory retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test613.dir/ --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test613.dir/ --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test613.dir %PWD/log/curl613.out
index bcc07275ecdf9291ba6f305ccba370bb6b537e90..95a86c5620c880905e0a2774e5f60cb5c841bcd2 100644 (file)
@@ -32,7 +32,7 @@ perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test614.dir
 SFTP pre-quote chmod
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "chmod 444 %PWD/log/test614.dir/plainfile.txt" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test614.dir/ --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "chmod 444 %PWD/log/test614.dir/plainfile.txt" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test614.dir/ --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test614.dir %PWD/log/curl614.out
index 7c50a28b15720e2fb6afc03f21329b4681465960..5f4859c2f6078582d363af0a2e06bd6770179728 100644 (file)
@@ -20,7 +20,7 @@ perl %SRCDIR/libtest/test613.pl prepare %PWD/log/test615.dir
 SFTP put remote failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file615.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test615.dir/rofile.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file615.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test615.dir/rofile.txt --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test613.pl postprocess %PWD/log/test615.dir
index 5b464b06dec4c306757caa5d81d5d4f697a50a33..14c3d3376e3977dc27b49f5d9935e2a20f179c64 100644 (file)
@@ -23,7 +23,7 @@ sftp
 SFTP retrieval of empty file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file616.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file616.txt --insecure
 </command>
 <file name="log/file616.txt">
 </file>
index 21c1e3b3ecaae593fbad6e1a952b78b732f36e1b..67f0c9a16d059dab82cd2b13b0ecb921378fdec8 100644 (file)
@@ -23,7 +23,7 @@ scp
 SCP retrieval of empty file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file617.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file617.txt --insecure
 </command>
 <file name="log/file617.txt">
 </file>
index 23f03ac6862fb91f7cec32fa88ff80452de7e507..feb095ebeb959895a6d5df41f4fb5e028f1e8056 100644 (file)
@@ -15,7 +15,7 @@ sftp
 SFTP retrieval of two files
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file618.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file618.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file618.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file618.txt --insecure
 </command>
 <file name="log/file618.txt">
 Test data
index 3397c1f1a403da7b6e063c3185933495f55a2ce5..6c1273c0484dc727cc311dea0368789650fd05e6 100644 (file)
@@ -15,7 +15,7 @@ scp
 SCP retrieval of two files
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file619.txt scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file619.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file619.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file619.txt --insecure
 </command>
 <file name="log/file619.txt">
 Test data
index 28019e792a0d24a9004b4d1eb550b013ebaca906..4638255133d28eb64535966dfdc9ffebd7c39ffe 100644 (file)
@@ -16,7 +16,7 @@ sftp
 SFTP retrieval of missing file followed by good file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/not-a-valid-file-moooo sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file620.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/not-a-valid-file-moooo sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file620.txt --insecure
 </command>
 <file name="log/file620.txt">
 Test data
index 2b39e9f7d7144ea8bc08f703c6f7ddb9fd780b48..f0ac9b728476c4be7b31a3a0e30187bfde400a29 100644 (file)
@@ -16,7 +16,7 @@ scp
 SCP retrieval of missing file followed by good file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/not-a-valid-file-moooo scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file621.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/not-a-valid-file-moooo scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file621.txt --insecure
 </command>
 <file name="log/file621.txt">
 Test data
index 8f1a6e46c054b5c4130958686261c7283c1790fe..7b5fd5b2ee27dc606c2e2ee109160c2380c4d6b4 100644 (file)
@@ -22,7 +22,7 @@ sftp
 SFTP put failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file622.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/nonexistent-directory/nonexistent-file --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file622.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/nonexistent-directory/nonexistent-file --insecure
 </command>
 <file name="log/file622.txt">
 Test data
index 2c6a4381d2f37bd1895287461d40ddc188196efb..e2914c9d04d8aba5a69f4ebd2f400c965847ace5 100644 (file)
@@ -22,7 +22,7 @@ scp
 SCP upload failure
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file623.txt scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/nonexistent-directory/nonexistent-file --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file623.txt scp://%HOSTIP:%SSHPORT%SSH_PWD/log/nonexistent-directory/nonexistent-file --insecure
 </command>
 <file name="log/file623.txt">
 Test data
index 15b65a8dac9e3d2bea5d384135afc8cf6c015dff..8aaf527e5a1e6c55e283424b5171d6ddd264bdb0 100644 (file)
@@ -22,7 +22,7 @@ sftp
 SFTP put with --ftp-create-dirs
  </name>
  <command>
---ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file624.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test624.dir/upload.624 --insecure
+--ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file624.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test624.dir/upload.624 --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test610.pl move %PWD/log/test624.dir/upload.624 %PWD/log/upload.624 rmdir %PWD/log/test624.dir
index 8a5a2ae39dd8876cf9f2ec3b6afe70cb00caa60a..1fe9b55c0ca632e0a0b3420146c496e9923e8ded 100644 (file)
@@ -22,7 +22,7 @@ sftp
 SFTP put with --ftp-create-dirs twice
  </name>
  <command>
---ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file625.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test625.a/upload.625 -T log/file625.txt sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/test625.b/upload.625 --insecure
+--ftp-create-dirs --key curl_client_key --pubkey curl_client_key.pub -u %USER: -T log/file625.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test625.a/upload.625 -T log/file625.txt sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/test625.b/upload.625 --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test610.pl move %PWD/log/test625.a/upload.625 %PWD/log/upload.625 rmdir %PWD/log/test625.a rm %PWD/log/test625.b/upload.625 rmdir %PWD/log/test625.b
index fd955692bc70ef9b61c099bcf3fc1f0158611c80..edf2aa52087411ee995b363423758726e9c26a63 100644 (file)
@@ -22,7 +22,7 @@ sftp
 SFTP invalid quote command
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "invalid-command foo bar" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file626.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "invalid-command foo bar" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file626.txt --insecure
 </command>
 <file name="log/file626.txt">
 Test file for rename test
index b5aaec6a8a0db63a500343c74baa34e697d14085..86c00f16d722a27c66288508bdf8a88d2d58e624 100644 (file)
@@ -16,7 +16,7 @@ sftp
 SFTP invalid user login (password authentication)
  </name>
  <command>
--u not-a-valid-user: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/irrelevant-file  --insecure
+-u not-a-valid-user: sftp://%HOSTIP:%SSHPORT%SSH_PWD/irrelevant-file  --insecure
 </command>
 </client>
 
index 7ce5e300541fc1c1611a36bf68c28684bd257146..07ac767ab24b97dae843609e3af47444849961b8 100644 (file)
@@ -16,7 +16,7 @@ scp
 SCP invalid user login (password authentication)
  </name>
  <command>
--u not-a-valid-user: scp://%HOSTIP:%SSHPORT%POSIX_PWD/irrelevant-file --insecure
+-u not-a-valid-user: scp://%HOSTIP:%SSHPORT%SSH_PWD/irrelevant-file --insecure
 </command>
 </client>
 
index ffde8ea54ddbdc77329ed45ed74f2ef4a3ca0983..f678528b0e54fa8e28ad7f4ebf098bc6fb423ce5 100644 (file)
@@ -17,7 +17,7 @@ sftp
 SFTP incorrect host key
  </name>
  <command>
---hostpubmd5 00000000000000000000000000000000 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/irrelevant-file --insecure
+--hostpubmd5 00000000000000000000000000000000 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/irrelevant-file --insecure
 </command>
 </client>
 
index ddb7d280d76df73b2a7cb83e53101d73cc29d0f5..720f3716ff7c2f6ef50dc6138e53cc76d2a8745b 100644 (file)
@@ -17,7 +17,7 @@ scp
 SCP incorrect host key
  </name>
  <command>
---hostpubmd5 00000000000000000000000000000000 --key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/irrelevant-file --insecure
+--hostpubmd5 00000000000000000000000000000000 --key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/irrelevant-file --insecure
 </command>
 </client>
 
index 456adc604c4634ce8176bfae4bd1c361bfc91bdf..70cfe515afcfb67fe45802637e10f496430e2431 100644 (file)
@@ -20,7 +20,7 @@ sftp
 SFTP syntactically invalid host key
  </name>
  <command>
---hostpubmd5 00 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%NOLISTENPORT%POSIX_PWD/log/irrelevant-file --insecure
+--hostpubmd5 00 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%NOLISTENPORT%SSH_PWD/log/irrelevant-file --insecure
 </command>
 </client>
 
index d87bfb9915c96cf755c2036e6f518800af47d3f0..913d981f5fe064ca72a38e671650fe717e657164 100644 (file)
@@ -24,7 +24,7 @@ sftp
 SFTP retrieval with byte range
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file633.txt -r 5-9 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file633.txt -r 5-9 --insecure
 </command>
 <file name="log/file633.txt">
 Test data
index c93e09e5c93b9aa2de6dcd2bf7269a9e44577c1c..fc250f9c90a60ab8644b4b1696794c78947b13ad 100644 (file)
@@ -25,7 +25,7 @@ sftp
 SFTP retrieval with byte range past end of file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file634.txt -r 5-99 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file634.txt -r 5-99 --insecure
 </command>
 <file name="log/file634.txt">
 Test data
index e572567f17db7eadabf7164ddf3ed9224921faee..16ef66c0fae1983b9f70a30836dfb6e6c1927702 100644 (file)
@@ -24,7 +24,7 @@ sftp
 SFTP retrieval with byte range relative to end of file
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file635.txt -r -9 --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file635.txt -r -9 --insecure
 </command>
 <file name="log/file635.txt">
 Test data
index 29f165710378caa20f9a4ead11f4e67d27eb6910..0ea350904f98039cb6aaca9065cf3cf9691496ae 100644 (file)
@@ -25,7 +25,7 @@ sftp
 SFTP retrieval with X- byte range
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file636.txt -r 5- --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file636.txt -r 5- --insecure
 </command>
 <file name="log/file636.txt">
 Test data
index c0f760fecb769c161377e0ef70532e338005c164..71b81268b937f504c42759a49fd77f9a58205079 100644 (file)
@@ -23,7 +23,7 @@ sftp
 SFTP retrieval with invalid X- range
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file637.txt -r 99- --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file637.txt -r 99- --insecure
 </command>
 <file name="log/file637.txt">
 Test data
index 1e42596a5bbab2a132bf67bb009dba97ed927c26..fdc140c6fef24db84fca37c14c0bc5cb5e7d6d65 100644 (file)
@@ -29,7 +29,7 @@ perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test638.dir
 SFTP post-quote rename * asterisk accept-fail
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test638.dir %PWD/log/test638.new" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file638.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test638.dir %PWD/log/test638.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file638.txt --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test638.new
index bb06be756bcf50ddf61cc98ea54062f942eaf244..d80c8c14ca6eff3fc4800fdd05a876ee1d5a85bf 100644 (file)
@@ -29,7 +29,7 @@ perl %SRCDIR/libtest/test610.pl mkdir %PWD/log/test639.dir
 SFTP post-quote rename * asterisk accept-fail
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test639-not-exists-dir %PWD/log/test639.new" sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file639.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: -Q "-*rename %PWD/log/test639-not-exists-dir %PWD/log/test639.new" sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file639.txt --insecure
 </command>
 <postcheck>
 perl %SRCDIR/libtest/test610.pl rmdir %PWD/log/test639.dir
index 979ac2ba7e75d5b4b31f0115c8f87462e0d8fe42..9d1ade4c09d67869cfeea9eebdb5480120f19fce 100644 (file)
@@ -23,7 +23,7 @@ sftp
 SFTP --head retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file640.txt --insecure --head
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file640.txt --insecure --head
 </command>
 <file name="log/file640.txt">
 Test data
index cc1da944ef6fce8f1cd451ab58730da7bbd3ec69..9f168aaef43b20c1cd52202dd5d6225104d0da22 100644 (file)
@@ -23,7 +23,7 @@ scp
 SCP --head retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file641.txt --insecure --head
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file641.txt --insecure --head
 </command>
 <file name="log/file641.txt">
 Test data
index 084626f04dd1c76639aa08cca734ebb8eb8b4826..6ae52bb82fc20c73569a74f0f0ef5135b793b244 100644 (file)
@@ -24,7 +24,7 @@ sftp
 SFTP retrieval
  </name>
  <command>
---key curl_client_key --pubkey curl_client_key.pub -u %USER: --compressed-ssh sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file642.txt --insecure
+--key curl_client_key --pubkey curl_client_key.pub -u %USER: --compressed-ssh sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file642.txt --insecure
 </command>
 <file name="log/file642.txt">
 Test data
index 8591490ed11e8df6ca126771d50c13da4527ddd2..fb0f27fb954df97834b874060130280b02868d70 100644 (file)
@@ -16,7 +16,7 @@ sftp
 SFTP retrieval with nonexistent private key file
  </name>
  <command>
---key DOES_NOT_EXIST --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/not-a-valid-file-moooo --insecure --connect-timeout 8
+--key DOES_NOT_EXIST --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/not-a-valid-file-moooo --insecure --connect-timeout 8
 </command>
 </client>
 
index cb73b248bb0fab6f53fac50e7b317499b7528954..6bea4ed1a0e8978b66671cf21319c9cedd3f0c60 100644 (file)
@@ -24,7 +24,7 @@ sftp
 SFTP correct host key
  </name>
  <command>
---hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file664.txt
+--hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SSH_PWD/log/file664.txt
 </command>
 <file name="log/file664.txt">
 test
index 830adb8f62d4cf5119992d9ba9aa79e26b8ca8fd..689fa31b68143a4dc7e24e3dbb01c3140eaad15f 100644 (file)
@@ -24,7 +24,7 @@ scp
 SCP correct host key
  </name>
  <command>
---hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%POSIX_PWD/log/file665.txt
+--hostpubmd5 %SSHSRVMD5 --key curl_client_key --pubkey curl_client_key.pub -u %USER: scp://%HOSTIP:%SSHPORT%SSH_PWD/log/file665.txt
 </command>
 <file name="log/file665.txt">
 test
old mode 100755 (executable)
new mode 100644 (file)
index f38e21e..d074de9
@@ -2152,6 +2152,12 @@ sub runsshserver {
     if ($doesntrun{$pidfile}) {
         return (0,0);
     }
+
+    my $sshd = find_sshd();
+    if($sshd) {
+        ($sshdid,$sshdvernum,$sshdverstr,$sshderror) = sshversioninfo($sshd);
+    }
+
     my $pid = processexists($pidfile);
     if($pid > 0) {
         stopserver($server, "$pid");
@@ -3294,8 +3300,13 @@ sub subVariables {
     if($file_pwd !~ /^\//) {
         $file_pwd = "/$file_pwd";
     }
+    my $ssh_pwd = $posix_pwd;
+    if ($sshdid && $sshdid =~ /OpenSSH-Windows/) {
+        $ssh_pwd = $file_pwd;
+    }
 
     $$thing =~ s/${prefix}FILE_PWD/$file_pwd/g;
+    $$thing =~ s/${prefix}SSH_PWD/$ssh_pwd/g;
     $$thing =~ s/${prefix}SRCDIR/$srcdir/g;
     $$thing =~ s/${prefix}USER/$USER/g;