Commit Graph

1127 Commits

Author SHA1 Message Date
Cassondra Foesch c8fe1f6964
Merge pull request #588 from emar-kar/lemarkar/update-read-docs
update ReadFrom and ReadFromWithConcurrency docs
2024-06-05 14:22:45 +00:00
Leonid Emar-Kar 1988803cae update docs with suggested improvements 2024-06-05 10:53:34 +01:00
Leonid Emar-Kar 1629551c5e update ReadFrom and ReadFromWithConcurrency docs 2024-06-04 12:32:01 +01:00
Cassondra Foesch 54946566af
Merge pull request #584 from peterverraedt/configure-maxTxPacket
Add WithMaxTxPacket server option
2024-04-26 23:33:39 +00:00
Peter Verraedt c1f47ba1b9
Add WithMaxTxPacket server option
Add the WithMaxTxPacket and WithRSMaxTxPacket server options to increase
the maximum tx packet size to a value above 32K. This allows to send
bigger chunks of data to the client as response to a read request. As
the client specifies the wanted length, it should be safe to increase
the server maximum value.

This in particular allows the implemented Client with the
MaxPacketUnchecked option to retrieve data in larger chunks.

Signed-off-by: Peter Verraedt <peter@verraedt.be>
2024-04-26 09:04:33 +02:00
Cassondra Foesch 06342e8b90
Merge pull request #583 from peterverraedt/marshal-extended-client
Add SetExtendedAttrs to Client
2024-04-26 00:54:39 +00:00
Peter Verraedt 478aa2e956
Add fsetstat variant of SetExtendedData
Signed-off-by: Peter Verraedt <peter@verraedt.be>
2024-04-25 16:20:01 +02:00
Peter Verraedt 0814039fdf
Add SetExtendedData to Client
Add function to set extended attributes in the sftp client.

Signed-off-by: Peter Verraedt <peter@verraedt.be>

Add longer comment

Signed-off-by: Peter Verraedt <peter@verraedt.be>
2024-04-25 14:53:25 +02:00
Nicola Murino 6370888833
Merge pull request #577 from drakkan/lister-close
add CloserListerAt
2024-04-10 08:35:31 +02:00
Cassondra Foesch c194b63c4b
Update the S_IFMT godoc. 2024-04-08 18:34:16 +00:00
Nicola Murino 3c39a36b26
Merge pull request #582 from dustin-ward/master
Add support for zos/s390x
2024-04-06 11:56:07 +02:00
dustin-ward 3588ee80db fix godoc comment 2024-04-05 22:11:36 -04:00
dustin-ward 8411183d33 address review set 2 2024-04-05 16:07:40 -04:00
dustin-ward 96b29c55dd address review set 1 2024-04-05 12:37:27 -04:00
dustin-ward 9b553ccfda Add support for zos/s390x 2024-04-04 16:26:47 -04:00
Cassondra Foesch dbd01653d6
Merge pull request #580 from pkg/support-zos-s390x
Add support for z/OS
2024-03-20 08:09:24 +00:00
Cassondra Foesch 104c0f6593 try support zos s390x 2024-03-15 01:07:06 +00:00
Nicola Murino fbb0b8bdb3 request server: call Close() on ListerAt if it implements io.Closer
The ListerAt is stored in the Request state and reused across requests.
Some implementations don't store the entire []os.FileInfo buffer in the
ListerAt implementation but instead return an open file and get/return
[]os.FileInfo on request. For these implementation calling Close is
required
2024-02-14 11:48:40 +01:00
Cassondra Foesch 46d90e3f96
Merge pull request #574 from pkg/ISSUE-572-safer-double-close
Rework client to prevent after-Close usage, and support perm at Open
2024-02-12 14:58:53 +00:00
Cassondra Foesch 159d28655b populate Attrs in requestFromPacket 2024-02-12 07:44:23 +00:00
Nicola Murino bae544b7f4 CI: update actions and Go versions 2024-02-09 10:46:32 +01:00
Cassondra Foesch 5d66cdeb9a better cascading 2024-02-06 15:02:43 +00:00
Cassondra Foesch 3ce4d4e6e2 one more race-condition causing return 2024-02-06 08:51:12 +00:00
Cassondra Foesch 72aa4039a1 more short-circuits 2024-02-06 08:41:41 +00:00
Cassondra Foesch ba3d6ab7c6 explain mechanics of use-after-close protection 2024-02-06 08:34:51 +00:00
Cassondra Foesch e808920da0 remove unnecessary block, and explain why the one added is necessary 2024-02-06 08:31:27 +00:00
Cassondra Foesch 6c7c0da80c remove warnings about aberrent race detection, I think it was real 2024-02-06 08:27:28 +00:00
Cassondra Foesch 4cd7ff45fc testing an idea 2024-02-06 08:12:54 +00:00
Cassondra Foesch 3df3035b74 new race condition warning, yay 2024-01-19 01:56:44 +00:00
Cassondra Foesch e21cd94805 move setting times to the last operation so chown doesn't have a chance to alter atime or mtime 2024-01-19 01:27:16 +00:00
Cassondra Foesch f3501dc6ba address code review 2024-01-19 01:23:22 +00:00
Cassondra Foesch d1903fbd46 rework client to prevent after-close usage, and support perm at open 2024-01-19 00:20:23 +00:00
Cassondra Foesch 22452ea54d
Merge pull request #568 from pkg/dependabot/go_modules/golang.org/x/crypto-0.17.0
Bump golang.org/x/crypto from 0.1.0 to 0.17.0
2023-12-19 12:12:36 +00:00
dependabot[bot] 3bb9a5a1ca
Bump golang.org/x/crypto from 0.1.0 to 0.17.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.1.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.1.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 22:59:13 +00:00
Cassondra Foesch 5bdc2b0e67
Merge pull request #565 from ungerik/master
Cancelable ReadDirContext
2023-11-20 08:53:49 +00:00
Erik Unger 3aa53a572f sendPacket with context 2023-11-13 09:13:33 +01:00
Erik Unger 273341d347 added Client.ReadDirContext 2023-11-10 16:46:49 +01:00
Cassondra Foesch 1c8cffaef5
Merge pull request #564 from wwcd/master
fix: sftp client hang when exit in sftp server example
2023-11-09 14:18:46 +00:00
wsl d45e538f7a fix: sftp client hang when exit in sftp server example 2023-11-09 19:32:53 +08:00
Cassondra Foesch b0487bc4a6
Merge pull request #560 from urko-b/fix-server-example
fix: remove ioutil and use io/os libraries
2023-10-24 17:20:27 +00:00
Urko. d6dd372d9c fix: remove ioutil and use io/os libraries 2023-10-23 17:56:45 +02:00
Cassondra Foesch 3a25fef2f1
Merge pull request #558 from Lilja/patch-1
Fix typo in request-interfaces.go
2023-10-02 07:46:21 +00:00
Erik Lilja b2b4a87c83
Fix typo in request-interfaces.go 2023-10-02 08:12:40 +02:00
Cassondra Foesch 669003cef4
Merge pull request #554 from dsnet/master
Properly handle io.EOF error conditions when reading
2023-08-12 07:03:37 +00:00
Joe Tsai e9377c8373 Properly handle io.EOF error conditions when reading
Previously, the Server.Serve method would never return nil,
because the infinite for-loop handling request packets would
only break if reading a packet reported an error.
A common termination condition is when the underlying connection
is closed and recvPacket returns io.EOF.
In which case Serve should ignore io.EOF and
treat it as a normal shutdown.

However, this means that recvPacket must correctly handle io.EOF
such that it never reports io.EOF if a packet is partially read.
There are two calls to io.ReadFull in recvPacket.
The first call correctly forwards an io.EOF error
if no additional bytes of the next packet are read.
However, the second call incorrectly forwards io.EOF
when no bytes of the payload could be read.
This is incorrect since we already read the length and
should convert the io.EOF into an io.ErrUnexpectedEOF.
2023-08-09 16:35:43 -07:00
Cassondra Foesch ec1c8caca6
Merge pull request #553 from peterverraedt/marshal-extended
Marshal extended data if file info supports it
2023-07-14 14:58:05 +00:00
Peter Verraedt c632ce6285
Marshal extended data if file info supports it
If the file information returned by ListAt supports the
FileInfoExtendedData interface, use it to retrieve extended data and
pass it back to the client. In similar fashion, we add the
FileInfoUidGid interface to allow for implementations to return uid and
gid data, even if the os lacks support in syscall.Stat_t.

Signed-off-by: Peter Verraedt <peter@verraedt.be>
2023-07-14 15:52:44 +02:00
Cassondra Foesch 72a484f090
Merge pull request #550 from tanishqsinghal7/ts-deleteallresources
Implemented Delete All Resources Function
2023-05-19 15:57:53 +00:00
tanishq.singhal 78e49babba Check 2023-05-19 11:38:25 +05:30
tanishq.singhal d17dfb25ab Resolve Comments 2023-05-18 22:57:23 +05:30