diff options
author | Noel Power <noel.power@suse.com> | 2015-05-27 09:22:10 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-10-07 09:24:57 +0200 |
commit | 6428ec0701124942012e7641f342373043b9417c (patch) | |
tree | 7e4aa4d5dcbff0f3bcdc57956bec94b1233f2841 /fs/cifs | |
parent | 3640b336b042649a807b0b642515bf8bdaeb8532 (diff) | |
download | lwn-6428ec0701124942012e7641f342373043b9417c.tar.gz lwn-6428ec0701124942012e7641f342373043b9417c.zip |
client MUST ignore EncryptionKeyLength if CAP_EXTENDED_SECURITY is set
commit f291095f340db986271e951e3891bb95624a93ea upstream.
[MS-SMB] 2.2.4.5.2.1 states:
"ChallengeLength (1 byte): When the CAP_EXTENDED_SECURITY bit is set,
the server MUST set this value to zero and clients MUST ignore this
value."
Signed-off-by: Noel Power <noel.power@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifssmb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 5f1f3285479e..ea938a8bf240 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -629,9 +629,8 @@ CIFSSMBNegotiate(const unsigned int xid, struct cifs_ses *ses) server->negflavor = CIFS_NEGFLAVOR_UNENCAP; memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey, CIFS_CRYPTO_KEY_SIZE); - } else if ((pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC || - server->capabilities & CAP_EXTENDED_SECURITY) && - (pSMBr->EncryptionKeyLength == 0)) { + } else if (pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC || + server->capabilities & CAP_EXTENDED_SECURITY) { server->negflavor = CIFS_NEGFLAVOR_EXTENDED; rc = decode_ext_sec_blob(ses, pSMBr); } else if (server->sec_mode & SECMODE_PW_ENCRYPT) { |