Skip to content

Commit 2171b0a

Browse files
committed
pkg/hostagent: Fix setupMount() to avoid changing HostAgent.sshConfig
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
1 parent 44cc362 commit 2171b0a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/hostagent/mount.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ func (a *HostAgent) setupMount(ctx context.Context, m limatype.Mount) (*mount, e
6262
}
6363

6464
sshAddress, sshPort := a.sshAddressPort()
65+
// Create a copy of sshConfig to avoid
66+
// modifying HostAgent's sshConfig in case of Windows
67+
sshConfig := *a.sshConfig
6568
rsf := &reversesshfs.ReverseSSHFS{
6669
Driver: *m.SSHFS.SFTPDriver,
67-
SSHConfig: a.sshConfig,
70+
SSHConfig: &sshConfig,
6871
LocalPath: resolvedLocation,
6972
Host: sshAddress,
7073
Port: sshPort,

0 commit comments

Comments
 (0)