Remote machine architecture detection cannot recognize Win7/Win8/Win10

Tom Talpey ttalpey at
Tue Nov 15 12:56:39 UTC 2016

This patch is incorrect for many Windows versions.

Vista RTM offered SMB2.001, but this was never intended for production. Vista SP1 was the first usable SMB2 implementation; it offers SMB2.002. SMB2.001 should never be processed, in fact it's vanishingly unlikely to ever be seen.

SMB2.2 was offered only in Windows 8 Technical Preview releases, it was renamed SMB3.00 at release (Windows 8). SMB2.2 should not be processed, and the test should be for SMB3_00.

SMB3.1.0 does not exist, it was basically skipped. The test should be for 3.1.1 - SMB3_11.

Your tests for "<" on 3_00, 3_02 and 3_11 should be "<=", or the version will be assigned to older SKUs.

You should consider the possibility that new dialects will appear in future. As proposed, all such clients will be considered to be "Windows 10".

Finally, what about non-Windows, non-Samba, non-OSX clients, such as Solaris? For my information, what is this detection used for?

+	switch (get_remote_arch()) {
+	case RA_SAMBA:
+	case RA_CIFSFS:
+	case RA_OSX:
+		break;
+	default:
+		if (protocol_max < PROTOCOL_SMB2_10) {
+			set_remote_arch(RA_VISTA);
+		} else if (protocol_max < PROTOCOL_SMB2_22) {
+			set_remote_arch(RA_WIN7);
+		} else if (protocol_max < PROTOCOL_SMB3_02) {
+			set_remote_arch(RA_WIN8);
+		} else if (protocol_max < PROTOCOL_SMB3_10) {
+			set_remote_arch(RA_WIN81);
+		} else {
+			set_remote_arch(RA_WIN10);
+		}
+		break;

-----Original Message-----
From: samba-technical [mailto:samba-technical-bounces at] On Behalf Of zhangzujian.7
Sent: Tuesday, November 15, 2016 2:00 AM
To: samba-technical <samba-technical at>
Subject: Remote machine architecture detection cannot recognize Win7/Win8/Win10


The remote machine architecture detection does not work with Win7/Win8/Win8.1/Win10.
These versions of Windows are all recognized as Vista.


The attachments are patches for v4.4, v4.5 

More information about the samba-technical mailing list