提交 e187e44e 编写于 作者: J Jeff Layton 提交者: Steve French

[CIFS] parse server_GUID in SPNEGO negProt response

SPNEGO NegProt response also contains a server_GUID. Parse it as we
would for RawNTLMSSP.
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 7111d214
...@@ -621,22 +621,26 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) ...@@ -621,22 +621,26 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
if ((pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC) && if ((pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC) &&
(server->capabilities & CAP_EXTENDED_SECURITY)) { (server->capabilities & CAP_EXTENDED_SECURITY)) {
count = pSMBr->ByteCount; count = pSMBr->ByteCount;
if (count < 16) if (count < 16) {
rc = -EIO; rc = -EIO;
else if (count == 16) { goto neg_err_exit;
server->secType = RawNTLMSSP; }
if (server->socketUseCount.counter > 1) {
if (memcmp(server->server_GUID, if (server->socketUseCount.counter > 1) {
pSMBr->u.extended_response. if (memcmp(server->server_GUID,
GUID, 16) != 0) { pSMBr->u.extended_response.
cFYI(1, ("server UID changed")); GUID, 16) != 0) {
memcpy(server->server_GUID, cFYI(1, ("server UID changed"));
pSMBr->u.extended_response.GUID,
16);
}
} else
memcpy(server->server_GUID, memcpy(server->server_GUID,
pSMBr->u.extended_response.GUID, 16); pSMBr->u.extended_response.GUID,
16);
}
} else
memcpy(server->server_GUID,
pSMBr->u.extended_response.GUID, 16);
if (count == 16) {
server->secType = RawNTLMSSP;
} else { } else {
rc = decode_negTokenInit(pSMBr->u.extended_response. rc = decode_negTokenInit(pSMBr->u.extended_response.
SecurityBlob, SecurityBlob,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册