The Samba-Bugzilla – Attachment 12668 Details for
Bug 12425
Remote machine architecture detection cannot recognize Win7/Win8/Win10
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for master
ra_detect_master.patch (text/plain), 3.57 KB, created by
Zhang Zujian
on 2016-11-16 02:40:50 UTC
(
hide
)
Description:
patch for master
Filename:
MIME Type:
Creator:
Zhang Zujian
Created:
2016-11-16 02:40:50 UTC
Size:
3.57 KB
patch
obsolete
>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 > <listitem><para> > The architecture of the remote > machine. It currently recognizes Samba (<constant>Samba</constant>), >- the Linux CIFS file system (<constant>CIFSFS</constant>), OS/2, (<constant>OS2</constant>), >+ the Linux CIFS file system (<constant>CIFSFS</constant>), OS/2 (<constant>OS2</constant>), > Mac OS X (<constant>OSX</constant>), Windows for Workgroups (<constant>WfWg</constant>), Windows 9x/ME > (<constant>Win95</constant>), Windows NT (<constant>WinNT</constant>), > Windows 2000 (<constant>Win2K</constant>), > Windows XP (<constant>WinXP</constant>), >- Windows XP 64-bit(<constant>WinXP64</constant>), >- Windows 2003 including >- 2003R2 (<constant>Win2K3</constant>), and Windows >- Vista (<constant>Vista</constant>). Anything else will be known as >+ Windows XP 64-bit (<constant>WinXP64</constant>), >+ Windows 2003 including 2003R2 (<constant>Win2K3</constant>), >+ Windows Vista (<constant>Vista</constant>), >+ Windows 7 (<constant>Win7</constant>), >+ Windows 8 (<constant>Win8</constant>), >+ Windows 8.1 (<constant>Win8.1</constant>), >+ and Windows 10 (<constant>Win10</constant>). >+ Anything else will be known as > <constant>UNKNOWN</constant>.</para> > </listitem> > </varlistentry> >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; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12425
:
12658
|
12659
|
12660
| 12668