Commit Graph

1184 Commits

Author SHA1 Message Date
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
greatroar 7c0f7eea70 Comment out path matching test that breaks on Go tip 2020-10-29 14:47:28 +01:00
greatroar eb20cfe9bc Clean up temporary files in client tests 2020-10-23 22:14:32 +02:00
greatroar 83e0eb8f30 Fix typos in clients tests 2020-10-23 22:14:05 +02:00
Cassondra Foesch 3c22ebff33
Merge pull request #385 from greatroar/list-extensions
New method Client.Extensions to list server extensions
2020-10-23 19:04:51 +00:00
Cassondra Foesch 293dca5b18
Merge pull request #386 from greatroar/fsync
Add Client.Sync method
2020-10-23 19:03:32 +00:00
greatroar d352a1d176 Add Client.Sync method
This uses the fsync@openssh.com extension:
https://github.com/openssh/openssh-portable/blob/master/PROTOCOL, §3.6.
2020-10-23 13:09:54 +02:00
greatroar 265b8168fd New method Client.Extensions to list server extensions 2020-10-23 11:16:44 +02:00
Nicola Murino fcaa492add
Merge pull request #384 from pkg/refactor/request-example-openfile
Refactor: request-example openfile
2020-10-02 15:20:22 +02:00
Cassondra Foesch c46216738b symlink loop testing 2020-09-29 17:39:30 +00:00
Cassondra Foesch d696bdb2ff add PosixRename optional support same as Lstat 2020-09-25 16:16:01 +00:00
Cassondra Foesch a0a2273fde Test that Rename does not overwrite, and PosixRename does 2020-09-25 16:13:45 +00:00
Cassondra Foesch 78524b582a more specification polishing, document specification points better 2020-09-25 16:13:10 +00:00
Cassondra Foesch 6f2abc6af1 O_CREAT|O_EXCL can go through a directory symlink, but cannot create a dangling symlink target 2020-09-25 14:01:02 +00:00
Cassondra Foesch 12db74fbb4 move endpoint symlink resolution to openfile rather than newfile 2020-09-25 13:34:03 +00:00
Cassondra Foesch 8279444a65 oops mkdir on a dangling symlink SHOULD NOT work 2020-09-25 13:33:06 +00:00
Cassondra Foesch 4e715d5625 rename vs PosixRename 2020-09-25 12:35:15 +00:00
Cassondra Foesch 8ae3feeb9f add NOTEs everywhere symlink target/linkpath vs sftp.Request.Filepath and sfftp.Request.Target come up 2020-09-24 15:20:10 +00:00
Cassondra Foesch 42f3825de9 corner-cases, better spec conformance 2020-09-24 15:03:10 +00:00
Cassondra Foesch f1495003d3 github not showing any diff of changes for move and change of file 2020-09-24 14:52:30 +00:00
Cassondra Foesch 550559efd0 symlink corner cases 2020-09-24 14:50:14 +00:00
Cassondra Foesch e88bf659ad we should return back unsupported errors if given a request method we don't recognize 2020-09-24 13:43:18 +00:00
Cassondra Foesch de5de7e076 extract rename() to a function 2020-09-24 13:37:46 +00:00
Cassondra Foesch 6fdb06ac0d changed mind, let's avoid exporting functions that take arbitrary Request objects 2020-09-24 12:42:23 +00:00
Cassondra Foesch f65bb33137 export some Filecmd functions 2020-09-21 16:59:47 +00:00
Cassondra Foesch 2ac0d4ad11 more require over assert found during coding 2020-09-21 14:29:50 +00:00
Cassondra Foesch 73e2701eff sanity checks 2020-09-21 13:46:42 +00:00
Cassondra Foesch 317dc93068 simplify opening files 2020-09-21 13:45:59 +00:00
Cassondra Foesch cb6d5adfda restore adding modtime, remove factory 2020-09-21 12:42:29 +00:00