stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CIFS: Remove encryption from the capabilities flags
@ 2017-02-27 23:20 Pavel Shilovsky
  2017-02-27 23:32 ` Steve French
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Shilovsky @ 2017-02-27 23:20 UTC (permalink / raw)
  To: stable; +Cc: Steve French

Currently the client claims to support encryption but it doesn't.
This results in rejecting TreeConnect requests by a server that expects
them to be encrypted. Fix it by removing encryption from the capabilities
flags. This problem affects kernels from v4.5 to v4.10.

Cc: Steve French <smfrench@gmail.com>
Cc: Stable <stable@vger.kernel.org> # v4.5-v4.10
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
---
 fs/cifs/smb2ops.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 5d456eb..87a58f0 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1925,7 +1925,9 @@ struct smb_version_values smb21_values = {
 struct smb_version_values smb30_values = {
 	.version_string = SMB30_VERSION_STRING,
 	.protocol_id = SMB30_PROT_ID,
-	.req_capabilities = SMB2_GLOBAL_CAP_DFS | SMB2_GLOBAL_CAP_LEASING | SMB2_GLOBAL_CAP_LARGE_MTU | SMB2_GLOBAL_CAP_PERSISTENT_HANDLES | SMB2_GLOBAL_CAP_ENCRYPTION,
+	.req_capabilities = SMB2_GLOBAL_CAP_DFS | SMB2_GLOBAL_CAP_LEASING
+			| SMB2_GLOBAL_CAP_LARGE_MTU
+			| SMB2_GLOBAL_CAP_PERSISTENT_HANDLES,
 	.large_lock_type = 0,
 	.exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK,
 	.shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK,
@@ -1945,7 +1947,9 @@ struct smb_version_values smb30_values = {
 struct smb_version_values smb302_values = {
 	.version_string = SMB302_VERSION_STRING,
 	.protocol_id = SMB302_PROT_ID,
-	.req_capabilities = SMB2_GLOBAL_CAP_DFS | SMB2_GLOBAL_CAP_LEASING | SMB2_GLOBAL_CAP_LARGE_MTU | SMB2_GLOBAL_CAP_PERSISTENT_HANDLES | SMB2_GLOBAL_CAP_ENCRYPTION,
+	.req_capabilities = SMB2_GLOBAL_CAP_DFS | SMB2_GLOBAL_CAP_LEASING
+			| SMB2_GLOBAL_CAP_LARGE_MTU
+			| SMB2_GLOBAL_CAP_PERSISTENT_HANDLES,
 	.large_lock_type = 0,
 	.exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK,
 	.shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-11  4:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-27 23:20 [PATCH] CIFS: Remove encryption from the capabilities flags Pavel Shilovsky
2017-02-27 23:32 ` Steve French
2017-04-10 21:29   ` Pavel Shilovskiy
2017-04-11  3:41     ` Greg Kroah-Hartman
2017-04-11  4:04       ` Steve French
2017-04-11  4:15         ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).