cifs: fix workstation_name for multiuser mounts
authorRyan Bair <ryandbair@gmail.com>
Wed, 22 Dec 2021 16:04:05 +0000 (11:04 -0500)
committerSteve French <stfrench@microsoft.com>
Thu, 3 Feb 2022 06:16:37 +0000 (00:16 -0600)
commit5c2e7e43afdfeb1ab3881518717713edbaa32dda
treebbbbfff67f0f4f0b29de3ca02cff16f72f34b722
parentc73dc66cb24dc062b9a1689625949f77893cb929
cifs: fix workstation_name for multiuser mounts

Set workstation_name from the master_tcon for multiuser mounts.

Just in case, protect size_of_ntlmssp_blob against a NULL workstation_name.

Fixes: 27e2b9c1c834 ("cifs: send workstation name during ntlmssp session setup")
Cc: stable@vger.kernel.org # 5.16
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Ryan Bair <ryandbair@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/sess.c