slirp: samba, set 'server min protocol' to NT1
PATCH 1/1 slirp: samba, set 'server min protocol' to NT1
Samba changed the default of server min protocol from LANMAN1 (very old protocol) to SMB2_02 (only Vista and newer) in commit 840b8501b436 (docs-xml: change "server min protocol" to SMB2_02).
WXP guests cannot use the samba shares since then as it uses a protocol newer than LANMAN1, but older than SMB2_02: NT1 protocol. So set 'server min protocol' in the samba config used in qemu to NT1. This restores support for WinNT and newer (WXP including).
--- net/slirp.c | 1 + 1 file changed, 1 insertion(+)
net/slirp.c +1 -0
@@ -887,6 +887,7 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,"printing = bsd\n" "disable spoolss = yes\n" "usershare max shares = 0\n" +"server min protocol = NT1\n" "[qemu]\n" "path=%s\n" "read only=no\n"
Signature · 1 line
2.25.1
Quoted 19 lines · Jiri Slaby
Samba changed the default of server min protocol from LANMAN1 (very old protocol) to
SMB2_02(only Vista and newer) in commit840b8501b436(docs-xml: change "server min protocol" toSMB2_02).WXP guests cannot use the samba shares since then as it uses a protocol newer than LANMAN1, but older than
SMB2_02: NT1 protocol. So set 'server min protocol' in the samba config used in qemu to NT1. This restores support for WinNT and newer (WXP including).Signed-off-by Jiri Slaby <[email protected]>--- net/slirp.c | 1 + 1 file changed, 1 insertion(+)net/slirp.c +0
-0
net/slirp.c static int slirp_smb(SlirpState* s, const char *exported_dir, · line 893
Quoted 7 lines
net/slirp.c +1
-0@@ -887,6 +887,7 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,"printing = bsd\n" "disable spoolss = yes\n" "usershare max shares = 0\n" +"server min protocol = NT1\n" "[qemu]\n" "path=%s\n" "read only=no\n"
IIUC, the older protocol version has a number of downsides, both security and performance related, which is why Samba has removed it from the default config. Do we really want to revert this defaults change that Samba maintainers made, in order to cope with a guest OS which was end-of-life 11 years ago ? It feels questionable to me.
Maybe QEMU's command line needs to include an option to set the min protocol version, so that we don't need to hardcode this obsolete protocol version in the source.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 15 lines · Daniel P. Berrangé
Quoted 14 lines · Jiri Slaby
Samba changed the default of server min protocol from LANMAN1 (very old protocol) to
SMB2_02(only Vista and newer) in commit840b8501b436(docs-xml: change "server min protocol" toSMB2_02).WXP guests cannot use the samba shares since then as it uses a protocol newer than LANMAN1, but older than
SMB2_02: NT1 protocol. So set 'server min protocol' in the samba config used in qemu to NT1. This restores support for WinNT and newer (WXP including).Signed-off-by Jiri Slaby <[email protected]>--- net/slirp.c | 1 + 1 file changed, 1 insertion(+)
Quoted 16 lines
net/slirp.c static int slirp_smb(SlirpState* s, const char *exported_dir, · line 893
Quoted 12 lines
net/slirp.c +1
-0@@ -887,6 +887,7 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,"printing = bsd\n" "disable spoolss = yes\n" "usershare max shares = 0\n" +"server min protocol = NT1\n" "[qemu]\n" "path=%s\n" "read only=no\n" IIUC, the older protocol version has a number of downsides, both security and performance related, which is why Samba has removed it from the default config.
Sure, but is it that relevant for a VM? I mean, it's "min" protocol, newer Win will negotiate the latest.
Quoted 3 lines
Do we really want to revert this defaults change that
Samba maintainers made, in order to cope with a guest OS which was end-of-life 11 years ago ? It feels questionable to me.
It's 6 years, Vista is 3. (The current default still allows Vista.)
Quoted 3 lines
Maybe QEMU's command line needs to include an option to set the min protocol version, so that we don't need to hardcode this obsolete protocol version in the source.
That would be great. Though I have no idea how to add one :). Something like "-net user,smb=/home/smb,smbminproto=NT1" would be perfect by me.
thanks,
Signature · 2 lines
js suse labs