This commit is contained in:
Viktor Liu
2025-07-02 21:04:58 +02:00
parent 96084e3a02
commit 0d5408baec
8 changed files with 234 additions and 67 deletions

View File

@@ -77,12 +77,6 @@ func sftpMain(cmd *cobra.Command, _ []string) error {
os.Exit(sshserver.ExitCodeShellExecFail)
}
defer func() {
if err := sftpServer.Close(); err != nil {
cmd.PrintErrf("SFTP server close error: %v\n", err)
}
}()
log.Tracef("starting SFTP server with dropped privileges")
if err := sftpServer.Serve(); err != nil && !errors.Is(err, io.EOF) {
cmd.PrintErrf("SFTP server error: %v\n", err)