summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French2016-09-22 07:39:34 +0200
committerSteve French2016-10-12 19:08:32 +0200
commitfa70b87cc6641978b20e12cc5d517e9ffc0086d4 (patch)
treec5ef0b1540ee5c4ed891ff2ecc0d95aa216039f7 /fs/cifs/connect.c
parentSet previous session id correctly on SMB3 reconnect (diff)
downloadkernel-qcow2-linux-fa70b87cc6641978b20e12cc5d517e9ffc0086d4.tar.gz
kernel-qcow2-linux-fa70b87cc6641978b20e12cc5d517e9ffc0086d4.tar.xz
kernel-qcow2-linux-fa70b87cc6641978b20e12cc5d517e9ffc0086d4.zip
SMB3: GUIDs should be constructed as random but valid uuids
GUIDs although random, and 16 bytes, need to be generated as proper uuids. Signed-off-by: Steve French <steve.french@primarydata.com> Reviewed-by: Aurelien Aptel <aaptel@suse.com> Reported-by: David Goebels <davidgoe@microsoft.com> CC: Stable <stable@vger.kernel.org>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 2e4f4bad8b1e..c841244a954d 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2163,7 +2163,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
memcpy(&tcp_ses->dstaddr, &volume_info->dstaddr,
sizeof(tcp_ses->dstaddr));
#ifdef CONFIG_CIFS_SMB2
- get_random_bytes(tcp_ses->client_guid, SMB2_CLIENT_GUID_SIZE);
+ generate_random_uuid(tcp_ses->client_guid);
#endif
/*
* at this point we are the only ones with the pointer