diff options
author | Steve French <smfrench@gmail.com> | 2014-05-14 00:37:45 +0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2014-05-21 21:18:06 +0400 |
commit | 3c5f9be108783c05cade918d29c8711b236acb1d (patch) | |
tree | 78e60278c4cb26d37edb886e56d0c8aa55b07a13 /fs/cifs/smb2pdu.c | |
parent | 39552ea8120a699dbd0360848c4d949f9f0e6deb (diff) | |
download | linux-3c5f9be108783c05cade918d29c8711b236acb1d.tar.xz |
Do not send ClientGUID on SMB2.02 dialect
ClientGUID must be zero for SMB2.02 dialect. See section 2.2.3
of MS-SMB2. For SMB2.1 and later it must be non-zero.
Signed-off-by: Steve French <smfrench@gmail.com>
CC: Sachin Prabhu <sprabhu@redhat.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index dc44610fdc0d..0feb743894b8 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -375,7 +375,12 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses) req->Capabilities = cpu_to_le32(ses->server->vals->req_capabilities); - memcpy(req->ClientGUID, server->client_guid, SMB2_CLIENT_GUID_SIZE); + /* ClientGUID must be zero for SMB2.02 dialect */ + if (ses->server->vals->protocol_id == SMB20_PROT_ID) + memset(req->ClientGUID, 0, SMB2_CLIENT_GUID_SIZE); + else + memcpy(req->ClientGUID, server->client_guid, + SMB2_CLIENT_GUID_SIZE); iov[0].iov_base = (char *)req; /* 4 for rfc1002 length field */ |