Remote machine architecture detection cannot recognizeWin7/Win8/Win10

Tom Talpey ttalpey at microsoft.com
Wed Nov 16 18:20:05 UTC 2016


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:

https://msdn.microsoft.com/en-us/library/cc246491.aspx#Appendix_A_Target_1
>> 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 https://msdn.microsoft.com/en-us/library/cc246231.aspx
>>
>> Windows Vista RTM implemented dialect 2.000, which was not interoperable and was obsoleted by Windows Vista SP1.

Tom.


From: zhangzujian.7 [mailto:zhangzujian.7 at gmail.com] 
Sent: Tuesday, November 15, 2016 8:58 PM
To: Tom Talpey <ttalpey at microsoft.com>; samba-technical <samba-technical at lists.samba.org>
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.)


________________________________________
http://www.yomail.com/?utm_source=signature

< mailto:ttalpey at microsoft.com> 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 lists.samba.org] On Behalf Of zhangzujian.7
Sent: Tuesday, November 15, 2016 2:00 AM
To: samba-technical <mailto:samba-technical at lists.samba.org>
Subject: Remote machine architecture detection cannot recognize Win7/Win8/Win10

Hi,

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

Bugzilla:  https://bugzilla.samba.org/show_bug.cgi?id=12425

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


More information about the samba-technical mailing list