From 779401cc4594ad1519fbbf35175bff3e7e678633 Mon Sep 17 00:00:00 2001 From: AlexSSD7 Date: Fri, 1 Sep 2023 14:41:35 +0100 Subject: [PATCH] SMB touchups on macOS --- share/smb.go | 4 ++-- vm/filemanager.go | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/share/smb.go b/share/smb.go index 7a112a0..954db88 100644 --- a/share/smb.go +++ b/share/smb.go @@ -67,12 +67,12 @@ func (b *SMBBackend) Apply(ctx context.Context, sharePWD string, vc *VMShareCont var shareURL string if b.sharePort != nil { - shareURL = "smb://" + net.JoinHostPort(b.listenIP.String(), fmt.Sprint(*b.sharePort)) + shareURL = "smb://" + net.JoinHostPort(b.listenIP.String(), fmt.Sprint(*b.sharePort)) + "/linsk" } else if vc.NetTapCtx != nil { if runtime.GOOS == "windows" { shareURL = `\\` + strings.ReplaceAll(vc.NetTapCtx.Net.GuestIP.String(), ":", "-") + ".ipv6-literal.net" + `\linsk` } else { - shareURL = "smb://" + net.JoinHostPort(vc.NetTapCtx.Net.GuestIP.String(), fmt.Sprint(smbPort)) + shareURL = "smb://" + net.JoinHostPort(vc.NetTapCtx.Net.GuestIP.String(), fmt.Sprint(smbPort)) + "/linsk" } } else { return "", fmt.Errorf("no port forwarding and net tap configured") diff --git a/vm/filemanager.go b/vm/filemanager.go index ff83ec2..edf2a71 100644 --- a/vm/filemanager.go +++ b/vm/filemanager.go @@ -266,6 +266,8 @@ func (fm *FileManager) StartSMB(pwd string) error { workgroup = WORKGROUP dos charset = cp866 unix charset = utf-8 +client min protocol = SMB2 +client max protocol = SMB3 read raw = yes write raw = yes @@ -275,7 +277,7 @@ use sendfile = true aio read size = 16384 aio write size = 16384 server signing = no - + [linsk] browseable = yes writeable = yes