From: Justin Maggard Date: Wed, 2 Mar 2016 18:19:56 +0000 (-0800) Subject: s3:smbd: add negprot remote arch detection for OSX X-Git-Tag: samba-4.2.12~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffccce57263390a74f56bda6fd03b3ee33ae9d89;p=thirdparty%2Fsamba.git s3:smbd: add negprot remote arch detection for OSX Remote arch detection for OSX clients has been broken for some time, since both Samba and OSX started supporting SMB2. Fix it by adding modern OSX client detection support to the negprot remote arch detection routine. Signed-off-by: Justin Maggard Reviewed-by: Jeremy Allison Reviewed-by: Ralph Boehme Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Mar 3 09:03:53 CET 2016 on sn-devel-144 (cherry picked from commit d7ca174744001fabdc32e1c334dad347bb985756) Autobuild-User(v4-2-test): Karolin Seeger Autobuild-Date(v4-2-test): Mon Mar 14 15:26:25 CET 2016 on sn-devel-104 --- diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 1cfdb59a0c6..2ea74450732 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -443,26 +443,33 @@ protocol [XENIX CORE] protocol [LANMAN1.0] protocol [LM1.2X002] protocol [LANMAN2.1] + +OSX: +protocol [NT LM 0.12] +protocol [SMB 2.002] +protocol [SMB 2.???] */ /* * Modified to recognize the architecture of the remote machine better. * * This appears to be the matrix of which protocol is used by which - * MS product. - Protocol WfWg Win95 WinNT Win2K OS/2 Vista - PC NETWORK PROGRAM 1.0 1 1 1 1 1 1 - XENIX CORE 2 2 - MICROSOFT NETWORKS 3.0 2 2 - DOS LM1.2X002 3 3 - MICROSOFT NETWORKS 1.03 3 - DOS LANMAN2.1 4 4 - LANMAN1.0 4 2 3 2 - Windows for Workgroups 3.1a 5 5 5 3 3 - LM1.2X002 6 4 4 4 - LANMAN2.1 7 5 5 5 - NT LM 0.12 6 8 6 6 - SMB 2.001 7 + * product. + Protocol WfWg Win95 WinNT Win2K OS/2 Vista OSX + PC NETWORK PROGRAM 1.0 1 1 1 1 1 1 + XENIX CORE 2 2 + MICROSOFT NETWORKS 3.0 2 2 + DOS LM1.2X002 3 3 + MICROSOFT NETWORKS 1.03 3 + DOS LANMAN2.1 4 4 + LANMAN1.0 4 2 3 2 + Windows for Workgroups 3.1a 5 5 5 3 3 + LM1.2X002 6 4 4 4 + LANMAN2.1 7 5 5 5 + NT LM 0.12 6 8 6 6 6 1 + SMB 2.001 7 + SMB 2.002 2 + SMB 2.??? 3 * * tim@fsg.com 09/29/95 * Win2K added by matty 17/7/99 @@ -496,6 +503,7 @@ protocol [LANMAN2.1] #define ARCH_VISTA ( ARCH_WIN2K | PROT_SMB_2_001 ) #define ARCH_SAMBA ( PROT_SAMBA ) #define ARCH_CIFSFS ( PROT_POSIX_2 ) +#define ARCH_OSX ( PROT_NT_LM_0_12 | PROT_SMB_2_002 | PROT_SMB_2_FF ) /* List of supported protocols, most desired first */ static const struct { @@ -661,6 +669,9 @@ void reply_negprot(struct smb_request *req) case ARCH_OS2: set_remote_arch(RA_OS2); break; + case ARCH_OSX: + set_remote_arch(RA_OSX); + break; default: set_remote_arch(RA_UNKNOWN); break;