diff --git a/docs-xml/manpages/smb.conf.5.xml b/docs-xml/manpages/smb.conf.5.xml index 10c1fb4..dac603c 100644 --- a/docs-xml/manpages/smb.conf.5.xml +++ b/docs-xml/manpages/smb.conf.5.xml @@ -488,15 +488,19 @@ chmod 1770 /usr/local/samba/lib/usershares The architecture of the remote machine. It currently recognizes Samba (Samba), - the Linux CIFS file system (CIFSFS), OS/2, (OS2), + the Linux CIFS file system (CIFSFS), OS/2 (OS2), Mac OS X (OSX), Windows for Workgroups (WfWg), Windows 9x/ME (Win95), Windows NT (WinNT), Windows 2000 (Win2K), Windows XP (WinXP), - Windows XP 64-bit(WinXP64), - Windows 2003 including - 2003R2 (Win2K3), and Windows - Vista (Vista). Anything else will be known as + Windows XP 64-bit (WinXP64), + Windows 2003 including 2003R2 (Win2K3), + Windows Vista (Vista), + Windows 7 (Win7), + Windows 8 (Win8), + Windows 8.1 (Win8.1), + and Windows 10 (Win10). + Anything else will be known as UNKNOWN. diff --git a/source3/include/smb.h b/source3/include/smb.h index 75fcb02..3377ab7 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -528,6 +528,7 @@ http://msdn.microsoft.com/en-us/library/cc246334(PROT.13).aspx /* Remote architectures we know about, keep in sync with remote_arch_strings */ enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA, + RA_WIN7, RA_WIN8, RA_WIN81, RA_WIN10, RA_SAMBA, RA_CIFSFS, RA_WINXP64, RA_OSX}; /* diff --git a/source3/lib/util.c b/source3/lib/util.c index bab3998..2629139 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1271,6 +1271,10 @@ static const char *remote_arch_strings[] = { [RA_WINXP] = "WinXP", [RA_WIN2K3] = "Win2K3", [RA_VISTA] = "Vista", + [RA_WIN7] = "Win7", + [RA_WIN8] = "Win8", + [RA_WIN81] = "Win8.1", + [RA_WIN10] = "Win10", [RA_SAMBA] = "Samba", [RA_CIFSFS] = "CIFSFS", [RA_WINXP64] = "WinXP64", diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c index 6cfa64f..b73cf30 100644 --- a/source3/smbd/smb2_negprot.c +++ b/source3/smbd/smb2_negprot.c @@ -195,6 +195,8 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req) dialect_count, &dialect); + enum protocol_types protocol_max = protocol; + for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) { if (lp_server_max_protocol() < PROTOCOL_SMB2_10) { break; @@ -273,13 +275,22 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req) } switch (get_remote_arch()) { - case RA_VISTA: case RA_SAMBA: case RA_CIFSFS: case RA_OSX: break; default: - set_remote_arch(RA_VISTA); + 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; }