From ed5ff9c5cc4b318b2b0a1b868bc3e95ecf65d0b7 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Wed, 20 Nov 2024 18:28:15 +0100 Subject: [PATCH] sftpd: remove allocator Signed-off-by: Nicola Murino --- internal/sftpd/server.go | 2 +- internal/sftpd/subsystem.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/sftpd/server.go b/internal/sftpd/server.go index 5370bbb6..e201d566 100644 --- a/internal/sftpd/server.go +++ b/internal/sftpd/server.go @@ -694,7 +694,7 @@ func (c *Configuration) handleSftpConnection(channel ssh.Channel, connection *Co defer common.Connections.Remove(connection.GetID()) // Create the server instance for the channel using the handler we created above. - server := sftp.NewRequestServer(channel, c.createHandlers(connection), sftp.WithRSAllocator(), + server := sftp.NewRequestServer(channel, c.createHandlers(connection), sftp.WithStartDirectory(connection.User.Filters.StartDirectory)) defer server.Close() diff --git a/internal/sftpd/subsystem.go b/internal/sftpd/subsystem.go index cda0ecdc..b17bd62e 100644 --- a/internal/sftpd/subsystem.go +++ b/internal/sftpd/subsystem.go @@ -80,7 +80,7 @@ func ServeSubSystemConnection(user *dataprovider.User, connectionID string, read FilePut: connection, FileCmd: connection, FileList: connection, - }, sftp.WithRSAllocator()) + }) defer server.Close() return server.Serve()