Commit Graph

34 Commits

Author SHA1 Message Date
Dave Cheney f3fc26f1c3 General server cleanups (#103)
- no need to initalise mutexes, their zero value is valid
- make NewServer simpler, 90% of use cases already had an
  io.ReadWriteCloser, in the single case that it it is easy to provide a
  simple wrapper.
2016-05-29 16:32:05 +10:00
Dave Cheney dfb5f84e82 Use pkg/errors for error handling (#101) (#102) 2016-05-23 20:54:08 +10:00
Dave Cheney 5e9ad277fc Use pkg/errors for error handling (#101) 2016-05-19 15:16:48 +10:00
Dave Cheney ca0111c37f server: fix ignored error handling in server (#100) 2016-05-19 15:04:32 +10:00
Dave Cheney bd4f7a70da server: refactor packet decoding and read only handling 2016-05-19 14:49:23 +10:00
Matt Layher 8e47c759f5 server: remote rootDir parameter, as it does nothing 2016-01-16 12:41:01 -05:00
Matt Layher 7d53b6d4ab server: return ServerOption for godoc documentation 2016-01-11 12:21:15 -05:00
Matt Layher d396b1b4cb Merge pull request #80 from pkg/functional-options
server: use functional options for NewServer
2016-01-11 11:56:30 -05:00
Matt Layher 403657b31e server: use functional options for NewServer 2016-01-11 11:52:51 -05:00
Matt Layher 167a495725 packet, server: use a single read-only check 2016-01-11 11:50:10 -05:00
Matt Layher 9374ae613d *: golint: add and fix up comments on exported types 2016-01-07 15:16:34 -05:00
Matt Layher b348482b1a *: golint (part 1) 2016-01-07 12:10:24 -05:00
Dave Cheney 94fb4ddd0c Add -testserver permutation
Fixes #69

io.Pipe is unbuffered and provides a poor replacement for a net.Conn, use an os.Pipe instead.

Also skip some tests which don't work under the Go server as it runs in process.
2016-01-02 10:28:56 +01:00
Matt Layher 7b7864c7f4 server: simplify code and improve readability 2015-12-30 12:56:52 -05:00
Mark Sheahan d7309968cd add more tests; bug setting S_IFREG caused openssh sftp to refuse to get the file 2015-09-08 17:03:18 -07:00
Mark Sheahan bce43f23ac Address review comments; alter server test to allow the user / group words to be different 2015-09-07 22:50:46 -07:00
Mark Sheahan c69ab311ab all tests invoking external binaries considered integration tests to satisfy wercker 2015-09-07 02:28:33 -07:00
Mark Sheahan cbd08aeb80 implement setstat & fsetstat 2015-09-07 02:13:07 -07:00
Mark Sheahan d80ae36051 rmdir and symlink packet handling 2015-09-07 01:05:16 -07:00
Mark Sheahan 7bb2083ca9 Address review comments; about to change decodePacket() 2015-09-06 23:55:15 -07:00
Mark Sheahan c36e806e57 runLs output matching openssh for some stuff 2015-09-06 21:37:33 -07:00
Mark Sheahan 0d8e136458 removing sftp server to client layer; using straight os.* calls 2015-09-06 19:36:47 -07:00
Mark Sheahan f9e831be30 proper ssh closing sequence 2015-08-05 23:24:33 -07:00
Mark Sheahan 4325c3654b fix format of 'name' packets (shortname, longname, attrs), add Stat 2015-08-05 12:57:28 -07:00
Mark Sheahan 2f3ef8b897 Merge branch 'master' into server 2015-08-04 21:11:01 -07:00
Mark Sheahan 0f2bc1aa17 server is passing the client integration tests now. I don't understand the ATTRs field, it has a name in it. 2015-07-31 23:09:51 -07:00
Mark Sheahan 435f753792 readdir, rename, remove 2015-07-31 15:46:13 -07:00
Mark Sheahan 7ab0966023 readonly (only for open right now) 2015-07-30 23:43:00 -07:00
Mark Sheahan bf6b5bce28 fstat 2015-07-30 09:21:59 -07:00
Mark Sheahan c9cee8ac6f implement write 2015-07-29 17:37:58 -07:00
Mark Sheahan 2888b4a6b1 implement read 2015-07-29 17:24:24 -07:00
Mark Sheahan 058e1bee58 open & close 2015-07-26 01:32:19 -07:00
Mark Sheahan 91d0c9e68a mkdir 2015-07-25 19:07:33 -07:00
Mark Sheahan 5b6348f034 version, lstat 2015-07-25 01:19:29 -07:00