add memory data provider and use it for portable mode

This commit is contained in:
Nicola Murino
2019-10-25 18:37:12 +02:00
parent a4cddf4f7f
commit 8cd0aec417
7 changed files with 317 additions and 11 deletions

View File

@@ -277,8 +277,7 @@ func (c Configuration) AcceptInboundConnection(conn net.Conn, config *ssh.Server
if err := ssh.Unmarshal(req.Payload, &msg); err == nil {
name, scpArgs, err := parseCommandPayload(msg.Command)
connection.Log(logger.LevelDebug, logSender, "new exec command: %#v args: %v user: %v, error: %v",
name, scpArgs,
connection.User.Username, err)
name, scpArgs, connection.User.Username, err)
if err == nil && name == "scp" && len(scpArgs) >= 2 {
ok = true
connection.protocol = protocolSCP