Commit Graph

962 Commits

Author SHA1 Message Date
Cassondra Foesch 1d73fd92d5 fix typo, error message is now two-way greppable 2021-02-22 12:04:43 +00:00
Cassondra Foesch c6f90f0596 polishing done? 2021-02-22 12:04:43 +00:00
Cassondra Foesch fc15699691 fixed concurrent writes, mid-polish 2021-02-22 12:04:43 +00:00
Cassondra Foesch 0be6950c0e fix comments and variable names to reflect Write instead of Read 2021-02-22 12:04:43 +00:00
Cassondra Foesch 64bc1f82e3 WriteTo better, but not best, version 2021-02-22 12:04:43 +00:00
Cassondra Foesch 29c556e3a6 WriteTo benchmarks 2021-02-22 12:04:43 +00:00
Cassondra Foesch 5d0d479f46 The SSH_FX_CONNECTION_LOST exists precisely for this 2021-02-22 12:04:43 +00:00
Cassondra Foesch cdedb55a3b implement ReadFrom, normalize code patterns 2021-02-22 12:04:43 +00:00
Cassondra Foesch 79ae5c2d53 a new server disconnect error point rather than EOF 2021-02-22 12:04:43 +00:00
Cassondra Foesch 59de31242c more robust tests, fix typos 2021-02-22 12:04:43 +00:00
Cassondra Foesch 89afa8096c more concurrency, more overhead, but sometimes more throughput? 2021-02-22 12:04:43 +00:00
Cassondra Foesch ac6027de63 numerous subtle race conditions resolved in clientConn 2021-02-22 12:04:43 +00:00
Cassondra Foesch a66e205b29 chan is already available via closure 2021-02-22 12:04:43 +00:00
Cassondra Foesch 5e8f9f4960 MarshalBinary now gives a 4-byte header for length, marshalPacket gives a two-stage write 2021-02-22 12:04:43 +00:00
Cassondra Foesch afc8d7b11a no need to double type switch 2021-02-22 12:04:43 +00:00
Cassondra Foesch fef2628887 remove write/read race condition 2021-02-22 12:04:43 +00:00
Cassondra Foesch e3d9bf1123 early return error, happy path straight 2021-02-22 12:04:43 +00:00
Cassondra Foesch c6aaae51f9 cleanup a t.Fatalf 2021-02-22 12:04:43 +00:00
Cassondra Foesch 0314349ddc more data to debug test failure 2021-02-22 12:04:43 +00:00
Cassondra Foesch d4ff5aeb4f remove unnecessary append()s 2021-02-22 12:04:43 +00:00
Cassondra Foesch d178e4730e avoid panic if double call to Close 2021-02-22 12:04:43 +00:00
Cassondra Foesch 27538347e7 defers in a for loop don't execute until the end of the function 2021-02-22 12:04:43 +00:00
Cassondra Foesch 4f2503d286 using sftp-server these tests hang without this close 2021-02-22 12:04:43 +00:00
Nicola Murino 3326b42284
Merge pull request #406 from pkg/statvfs
request-server: add StatVFS support
2021-02-10 20:00:51 +01:00
Nicola Murino 14bb577288 client statVFS: normalize the returned error
added a test case for the request server to check os.IsNotExist error
2021-02-10 19:35:30 +01:00
Nicola Murino 5dbfeffd12 request-server: add StatVFS support 2021-02-10 19:13:19 +01:00
Nicola Murino 1cc6c514bd update deps
Fixes CVE-2020-29652
2021-01-20 13:57:40 +01:00
Nicola Murino fa54a9ef5d update documentation links 2021-01-20 13:52:30 +01:00
Nicola Murino 821e052fa0
Merge pull request #402 from drakkan/ghactions
CI: switch to GitHub Actions
2021-01-20 13:38:12 +01:00
Nicola Murino 67898c181d CI: use Makefile for tests 2021-01-20 13:35:58 +01:00
Nicola Murino ae8947fdf9
Merge pull request #401 from drakkan/client_perm
Client perm
2020-12-08 17:32:11 +01:00
Nicola Murino c811ca3a25 Remove: permission denied is now os.ErrPermission
fix TestClientRemoveDir test case on macOS
2020-12-08 14:43:19 +01:00
Nicola Murino 39d0113ba7 CI macOS: exclude previous go version 2020-12-08 13:56:08 +01:00
Nicola Murino 02474239ba CI: switch to GitHub Actions 2020-12-08 13:43:26 +01:00
Nicola Murino f5fd2fb058 normalise permission denied error as file not found error 2020-12-08 12:14:21 +01:00
Nicola Murino 7230c61342
Merge pull request #392 from drakkan/transfereof
request-server: don't return EOF if there is an unexpected error
2020-11-18 12:51:23 +01:00
Nicola Murino 75eca30139 request-server test: set size for the error channel to 1
This way even if we do not read from this channel, there is not a
blocked goroutine left hanging
2020-11-18 08:57:15 +01:00
Nicola Murino 863783342b request-server: add test cases for server errors 2020-11-16 17:38:12 +01:00
Nicola Murino 6af3f0a271 request-server: don't return EOF if there is an unexpected error
io.EOF means no error so convert to ErrUnexpectedEOF if we detect
a transfer error
2020-11-16 17:38:12 +01:00
Nicola Murino c30c93e44e
Merge pull request #393 from drakkan/rsleak
request server: fix handles leak in error case
2020-11-16 16:19:26 +01:00
Nicola Murino 732b2a30fb request server: fix handles leak in error case
For open/opendir requests we create a new handle and close it
when the client sends an SSH_FXP_CLOSE but if we return an error the
client will never send the close packet so we have to close the handle
ourselves
2020-11-16 14:34:09 +01:00
Nicola Murino 4bca1e2f41
Merge pull request #391 from greatroar/disconnect-no-eof
Detect remote disconnect in File methods
2020-11-07 16:10:10 +01:00
greatroar 06d60c4c06 Test disconnect handling in open files 2020-11-04 10:17:06 +01:00
Cassondra Foesch 2aa3f7e910 don't broadcast anything other than disconnect to clients 2020-11-04 10:02:59 +01:00
Cassondra Foesch 796f65a59c
Merge pull request #389 from greatroar/short-packet
Don't crash when the packet length is zero
2020-11-03 11:23:01 +00:00
greatroar cb1556337d Don't crash when the packet length is zero 2020-11-02 17:07:10 +01:00
Cassondra Foesch dbde925516
Merge pull request #387 from greatroar/tmp-clean
Clean up after Client tests + some minor stuff
2020-10-31 14:30:09 +00:00
greatroar 7f43671909 Rename remaining temps in client integration test 2020-10-31 14:34:16 +01:00
greatroar 360f7af3e6 {assert,require}.Nil(t, err) => NoError, NotNil => Error 2020-10-29 16:02:25 +01:00
greatroar 4c4fa330bb First check for uid 0, then lookup daemon's uid 2020-10-29 16:00:27 +01:00