summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-09-11 16:36:47 -0700
committerJeremy Allison <jra@samba.org>2017-09-14 14:48:19 +0200
commitf0a90a1287a8f4c4114919a32afaff52e3c69a9b (patch)
tree79c76ac451a898e1fa7443aac3617209cb4ed8b6 /libcli
parent1b6aa39fac0825b1f25fd62a6c67994b5c491170 (diff)
downloadsamba-f0a90a1287a8f4c4114919a32afaff52e3c69a9b.tar.gz
libcli: SMB2: NetApps negotiate SMB3_11 but also set the SMB2_CAP_ENCRYPTION flag.
This is a SHOULD not, not a MUST not. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13009 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Steve French <sfrench@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 14 14:48:20 CEST 2017 on sn-devel-144
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smbXcli_base.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index d73949b90d7..54939546d0e 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -4916,10 +4916,19 @@ static void smbXcli_negprot_smb2_done(struct tevent_req *subreq)
return;
}
+ /*
+ * Here we are now at SMB3_11, so encryption should be
+ * negotiated via context, not capabilities.
+ */
+
if (conn->smb2.server.capabilities & SMB2_CAP_ENCRYPTION) {
- tevent_req_nterror(req,
- NT_STATUS_INVALID_NETWORK_RESPONSE);
- return;
+ /*
+ * Server set SMB2_CAP_ENCRYPTION capability,
+ * but *SHOULD* not, not *MUST* not. Just mask it off.
+ * NetApp seems to do this:
+ * BUG: https://bugzilla.samba.org/show_bug.cgi?id=13009
+ */
+ conn->smb2.server.capabilities &= ~SMB2_CAP_ENCRYPTION;
}
negotiate_context_offset = IVAL(body, 60);