Remote machine architecture detection cannotrecognizeWin7/Win8/Win10

Tom Talpey ttalpey at
Thu Nov 17 15:41:28 UTC 2016

I’ll see if we can find some resources to help.

From: zhangzujian.7 [mailto:zhangzujian.7 at]
Sent: Wednesday, November 16, 2016 8:31 PM
To: Tom Talpey <ttalpey at>; samba-technical <samba-technical at>
Subject: RE: Remote machine architecture detection cannotrecognizeWin7/Win8/Win10

Thanks a lot for the list. I think I will try to update the mappings.

A trouble for me is that I cannot test my fix on all Windows versions.
What I have are some RTM releases including Win7, Win8 and Win10.

Zhang Zujian

Sent from YoMail<>

< Tom Talpey<mailto:ttalpey at>> 2016-11-17 02:20:05 wrote:
Well, given the pre-existing recognition being quite inaccurate, maybe this %a not needed at all? If you do decide to bring it up to date, I’d suggest some more precision on non-Samba, non-Windows recognizers.

For your Windows reference, the MS-SMB2 document has a list of supported SMB2 dialects, and you can use these to map to client negotiate recognizers, if you wish:
>> The following table illustrates the support of SMB 2 protocol on various Windows operating system versions.
>> Operating System SMB 2 dialects supported
>> Windows 10, Windows Server 2016 SMB 3.1.1, SMB 3.0.2, SMB 3.0, SMB 2.1, SMB 2.0.2
>> Windows 8.1,  Windows Server 2012 R2 SMB 3.0.2, SMB 3.0, SMB 2.1, SMB 2.0.2
>> Windows 8, Windows Server 2012 SMB 3.0, SMB 2.1, SMB 2.0.2
>> Windows 7, Windows Server 2008 R2 SMB 2.1, SMB 2.0.2
>> Windows Vista operating system with Service Pack 1 (SP1), Windows Server 2008 SMB 2.0.2
>> Previous versions of Windows None. They support the SMB Protocol, as specified in
>> Windows Vista RTM implemented dialect 2.000, which was not interoperable and was obsoleted by Windows Vista SP1.


From: zhangzujian.7 [mailto:zhangzujian.7 at<mailto:zhangzujian.7 at>]
Sent: Tuesday, November 15, 2016 8:58 PM
To: Tom Talpey <ttalpey at<mailto:ttalpey at>>; samba-technical <samba-technical at<mailto:samba-technical at>>
Subject: RE: Remote machine architecture detection cannot recognizeWin7/Win8/Win10

Yeah, I didn't consider much and ingored many Windows versions.

In my understading, the main purpose of the detection is to offer a flexible method of configuration.
For expample, if the path of a share is configured as /SOME/PATH/%a, Win7 clients and Win10 clients will see different contents.
(In smb.conf, %a refers to the architecture of the remote machine.)


< mailto:ttalpey at<mailto:ttalpey at>> 2016-11-15 20:56:39 wrote:
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:mailto:samba-technical-bounces at<mailto:samba-technical-bounces at>] On Behalf Of zhangzujian.7
Sent: Tuesday, November 15, 2016 2:00 AM
To: samba-technical <mailto:samba-technical at<mailto: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