From cb6609e4689e087982e65ce3b2e6a31ec59c9673 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Thu, 21 Nov 2024 07:54:48 +0100 Subject: [PATCH] sftpd: disable 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 3b694e40..fdad2d0f 100644 --- a/internal/sftpd/server.go +++ b/internal/sftpd/server.go @@ -693,7 +693,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()